From f536c9066b398a3cf374db570d9d41db4ed14eef Mon Sep 17 00:00:00 2001 From: Tom Joseph Date: Mon, 25 Sep 2017 18:08:15 +0530 Subject: boot policy: Support boot parameter #4 (boot info) Resolves openbmc/openbmc#2356 Change-Id: If775a01a97f29a60575c03f26d32bba0315af920 Signed-off-by: Tom Joseph --- chassishandler.cpp | 11 +++++++++-- chassishandler.h | 1 + 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(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 }; -- cgit v1.2.1