forked from openbmc/openbmc
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-ampere: Support chassis bootdev clear-cmos
Implement the set/get the CMOS clear data 2 of the boot option parameters boot flags(0x05). Tested: 1. Set the clear-cmos to yes # ipmitool chassis bootdev none clear-cmos=yes 2. Get the bootparam 0x05 # ipmitool chassis bootparam get 5 Boot parameter version: 1 Boot parameter 5 is valid/unlocked Boot parameter data: a080000000 Boot Flags : - Boot Flag Valid - Options apply to only next boot - BIOS EFI boot - CMOS Clear - Boot Device Selector : No override - BIOS verbosity : System Default - Console Redirection control : Console redirection occurs per BIOS configuration setting (default) - BIOS Mux Control Override : BIOS uses recommended setting of the mux at the end of POST Signed-off-by: Hieu Huynh <[email protected]>
- Loading branch information
1 parent
5f13ee1
commit 1ec2e5d
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...de/recipes-phosphor/ipmi/phosphor-ipmi-host/0009-Support-chassis-bootdev-clear-cmos.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 1279ea34e9436eb7a33b8561eaf1dd9646de5a91 Mon Sep 17 00:00:00 2001 | ||
From: Hieu Huynh <[email protected]> | ||
Date: Wed, 22 Sep 2021 05:55:46 +0000 | ||
Subject: [PATCH] Support chassis bootdev clear-cmos | ||
|
||
Implement the set/get the CMOS clear data 2 of the boot option | ||
parameters boot flags(0x05). | ||
|
||
Signed-off-by: Hieu Huynh <[email protected]> | ||
Change-Id: I6f9a4870036c7965fbfa9031661a411af27ab790 | ||
--- | ||
chassishandler.cpp | 7 ++++--- | ||
1 file changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/chassishandler.cpp b/chassishandler.cpp | ||
index 580ccc0..25fb9d6 100644 | ||
--- a/chassishandler.cpp | ||
+++ b/chassishandler.cpp | ||
@@ -1676,6 +1676,7 @@ static constexpr uint8_t setComplete = 0x0; | ||
static constexpr uint8_t setInProgress = 0x1; | ||
static uint8_t transferStatus = setComplete; | ||
static uint5_t bootInitiatorAckData = 0x0; | ||
+static bool cmosClear = false; | ||
|
||
/** @brief implements the Get Chassis system boot option | ||
* @param bootOptionParameter - boot option parameter selector | ||
@@ -1794,8 +1795,9 @@ ipmi::RspType<ipmi::message::Payload> | ||
? setParmBootFlagsValidOneTime | ||
: setParmBootFlagsValidPermanent; | ||
response.pack(bootOptionParameter, reserved1, bootOptionParam, | ||
- uint2_t{}, uint4_t{bootOption}, uint2_t{}, uint8_t{}, | ||
- uint8_t{}, uint8_t{}); | ||
+ uint2_t{}, uint4_t{bootOption}, uint1_t{}, | ||
+ uint1_t{cmosClear}, uint8_t{}, uint8_t{}, | ||
+ uint8_t{}); | ||
return ipmi::responseSuccess(std::move(response)); | ||
} | ||
catch (InternalFailure& e) | ||
@@ -1885,7 +1887,6 @@ ipmi::RspType<> ipmiChassisSetSysBootOptions(ipmi::Context::ptr ctx, | ||
bool screenBlank; | ||
uint4_t bootDeviceSelector; | ||
bool lockKeyboard; | ||
- bool cmosClear; | ||
uint8_t data3; | ||
uint4_t biosInfo; | ||
uint4_t rsvd1; | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters