ibm: bios for auto poweron control

On IBM systems, the host firmware can control the auto power on logic.
Map a new pvm_auto_poweron_restart BIOS value to the corresponding
D-Bus property.

Tested:
- Enabled test - verify enabling bios value sets AlwaysOn to d-bus prop
root@p10bmc:~# pldmtool bios SetBIOSAttributeCurrentValue -a pvm_auto_poweron_restart -d "Enabled"
{
    "Response": "SUCCESS"
}
root@p10bmc:~# busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/power_restore_policy xyz.openbmc_project.Conrol.Power.RestorePolicy PowerRestorePolicy
s "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn"

- Disabled test - verify disabling bios value sets None to d-bus prop
root@p10bmc:~# pldmtool bios SetBIOSAttributeCurrentValue -a pvm_auto_poweron_restart -d "Disabled"
{
    "Response": "SUCCESS"
}
root@p10bmc:~# busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/power_restore_policy xyz.openbmc_project.Conrol.Power.RestorePolicy PowerRestorePolicy
s "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.None"

- Verify setting d-bus prop is reflected in bios
root@p10bmc:~# pldmtool bios  GetBIOSAttributeCurrentValueByHandle -a pvm_auto_poweron_restart
{
    "CurrentValue": "Enabled"
}
root@p10bmc:~# busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/power_restore_policy xyz.openbmc_project.Conrol.Power.RestorePolicy PowerRestorePolicy s "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.None"
root@p10bmc:~# pldmtool bios  GetBIOSAttributeCurrentValueByHandle -a pvm_auto_poweron_restart
{
    "CurrentValue": "Disabled"
}

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5df3ec9826adc56737ff9fb72844b0a65964087b
diff --git a/oem/ibm/configurations/bios/enum_attrs.json b/oem/ibm/configurations/bios/enum_attrs.json
index fae89ef..003bc00 100644
--- a/oem/ibm/configurations/bios/enum_attrs.json
+++ b/oem/ibm/configurations/bios/enum_attrs.json
@@ -458,6 +458,26 @@
          ],
          "helpText" : "Specifies if Host USB is disabled or enabled for security reasons. Do not set this attribute directly; set hb_host_usb_enablement instead.",
          "displayName" : "Host USB Enablement (current)"
-      }
+     },
+     {
+        "attribute_name":"pvm_auto_poweron_restart",
+        "possible_values":[
+           "Disabled",
+           "Enabled"
+        ],
+        "default_values":[
+           "Disabled"
+        ],
+        "helpText" : "Select auto poweron policy. Disabled: Instructs server not to activate any auto poweron logic, Enabled: The system will boot automatically once power is restored after a power disturbance.",
+        "displayName" : "pvm_auto_poweron_restart",
+        "dbus":
+           {
+              "object_path" : "/xyz/openbmc_project/control/host0/power_restore_policy",
+              "interface" : "xyz.openbmc_project.Control.Power.RestorePolicy",
+              "property_name" : "PowerRestorePolicy",
+              "property_type" : "string",
+              "property_values" : ["xyz.openbmc_project.Control.Power.RestorePolicy.Policy.None", "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn"]
+           }
+     }
    ]
 }