summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-09-25 18:08:15 +0530
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-10-04 02:18:05 +0000
commitf536c9066b398a3cf374db570d9d41db4ed14eef (patch)
tree7dd6b81537c4d24597176275cfa06bb1589fa394
parent8202432fd5fe630c28e023aaccc632624f5933cc (diff)
downloadphosphor-host-ipmid-f536c9066b398a3cf374db570d9d41db4ed14eef.tar.gz
phosphor-host-ipmid-f536c9066b398a3cf374db570d9d41db4ed14eef.zip
boot policy: Support boot parameter #4 (boot info)
Resolves openbmc/openbmc#2356 Change-Id: If775a01a97f29a60575c03f26d32bba0315af920 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
-rw-r--r--chassishandler.cpp11
-rw-r--r--chassishandler.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 5c0c8c1..b9d4290 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -1334,8 +1334,15 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
fprintf(stderr, "setHostNetworkData failed for set_sys_boot_options.\n");
rc = IPMI_CC_UNSPECIFIED_ERROR;
}
- }
- else {
+ } else if (reqptr->parameter ==
+ static_cast<uint8_t>(BootOptionParameter::BOOT_INFO)) {
+ // Handle parameter #4 and return command completed normally
+ // (IPMI_CC_OK). There is no implementation in OpenBMC for this
+ // parameter. This is added to support the ipmitool command `chassis
+ // bootdev` which sends set on parameter #4, before setting the boot
+ // flags.
+ rc = IPMI_CC_OK;
+ } else {
fprintf(stderr, "Unsupported parameter 0x%x\n", reqptr->parameter);
rc = IPMI_CC_PARM_NOT_SUPPORTED;
}
diff --git a/chassishandler.h b/chassishandler.h
index 451e232..528a05d 100644
--- a/chassishandler.h
+++ b/chassishandler.h
@@ -43,6 +43,7 @@ enum ipmi_chassis_control_cmds : uint8_t
};
enum class BootOptionParameter : size_t
{
+ BOOT_INFO = 0x4,
BOOT_FLAGS = 0x5,
OPAL_NETWORK_SETTINGS = 0x61
};
OpenPOWER on IntegriCloud