From ed42128c7d25923a84469b93ade149f783bf38a2 Mon Sep 17 00:00:00 2001 From: Michael Baiocchi Date: Mon, 6 Apr 2020 15:54:42 -0500 Subject: [PATCH] Revert "Terminate the IPL for Physical Presence Detection Erros in Mnfg Mode" This reverts commit 74d68472d354af8e44bdb73f6893aac5c2e0c895. CQ: SW488759 Change-Id: I62187d75dd18f1d107cad5168aa0d4894770600d Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/94604 Reviewed-by: Daniel M Crowell Tested-by: Daniel M Crowell --- src/include/usr/ipmi/ipmisensor.H | 2 +- src/usr/ipmiext/ipmisensor.C | 4 +- src/usr/secureboot/ext/phys_presence.C | 61 ++++---------------------- 3 files changed, 11 insertions(+), 56 deletions(-) diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H index 761e103301f..aa76518d1d2 100644 --- a/src/include/usr/ipmi/ipmisensor.H +++ b/src/include/usr/ipmi/ipmisensor.H @@ -1069,7 +1069,7 @@ namespace SENSOR * maintained by the BMC. * * Usage: - * uint8_t key_clear_request_value = 0x01; //MSByte of Key Clear value + * uint8_t key_clear_request_value = 0x0100; * KeyClearRequestSensor l_sensor; * l_sensor.setKeyClearRequestValue( key_clear_request_value ); * diff --git a/src/usr/ipmiext/ipmisensor.C b/src/usr/ipmiext/ipmisensor.C index a158500f339..3c96fdbc956 100644 --- a/src/usr/ipmiext/ipmisensor.C +++ b/src/usr/ipmiext/ipmisensor.C @@ -1035,7 +1035,7 @@ namespace SENSOR // errlHndl_t KeyClearRequestSensor::setKeyClearRequest(const uint8_t i_value) { - // This is a threshold sensor that sets one byte of data in the + // This is a threshhhold sensor that sets one byte of data in the // iv_sensor_reading field iv_msg->iv_sensor_reading = i_value; @@ -1047,7 +1047,7 @@ namespace SENSOR // errlHndl_t KeyClearRequestSensor::getKeyClearRequest( uint8_t &o_value ) { - // This is a threshold sensor that returns one byte of data in + // This is a threshhhold sensor that returns one byte of data in // the sensor_status field getSensorReadingData l_data; diff --git a/src/usr/secureboot/ext/phys_presence.C b/src/usr/secureboot/ext/phys_presence.C index 9feae265e12..203fa84c97d 100644 --- a/src/usr/secureboot/ext/phys_presence.C +++ b/src/usr/secureboot/ext/phys_presence.C @@ -54,37 +54,6 @@ using namespace ERRORLOG; namespace SECUREBOOT { -/** - * @brief Local function returning if IPL is in Mnfg Mode - * - * @return Returns true if in manufactoring mode (based on MNFG_FLAG_SRC_TERM - * being enabled in ATTR_MNFG_FLAGS); otherwise, returns false - */ -bool isMnfgIpl(void) -{ - bool retVal = false; - - // Find out if in manufacturing mode - TARGETING::Target* pTopLevel = nullptr; - TARGETING::targetService().getTopLevelTarget(pTopLevel); - assert(pTopLevel != nullptr,"Top level target was nullptr"); - - auto mnfgFlags = pTopLevel->getAttr(); - - if (mnfgFlags & TARGETING::MNFG_FLAG_SRC_TERM) - { - retVal = true; - } - - return retVal; -} - -/** - * @brief Checks if the Physical Presence Window was opened and if - * Physical Presence was asserted. - * - * See src/include/usr/secureboot/phys_presence_if.H for details - */ errlHndl_t detectPhysPresence(void) { errlHndl_t err = nullptr; @@ -378,14 +347,11 @@ errlHndl_t detectPhysPresence(void) sys->setAttr(is_phys_pres_asserted); } - // If there is an error... - // 1) but there was not a key clear request requiring the assertion of - // physical presence --AND-- - // 2) it wasn't a mnfg mode IPL, then - // make the error informational and commit it here so as not to halt the IPL + // If there is an error, but there was not a key clear request requiring + // the assertion of physical presence, make the error informational and + // commit it here so as not to halt the IPL if ((err != nullptr) && - (doesKeyClearRequestPhysPres == false) && - (isMnfgIpl() == false)) + (doesKeyClearRequestPhysPres == false)) { err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL); SB_ERR("detectPhysPresence: Setting ERR to informational and " @@ -404,14 +370,6 @@ errlHndl_t detectPhysPresence(void) return err; } -/** - * @brief Handle Physical Presence Window first checks to see if a physical - * presence window should be opened. Then, if necessary, it sets up - * the physical presence detect circuit and then shuts down the - * system. - * - * See src/include/usr/secureboot/phys_presence_if.H for details - */ errlHndl_t handlePhysPresenceWindow(void) { errlHndl_t err = nullptr; @@ -688,14 +646,11 @@ errlHndl_t handlePhysPresenceWindow(void) } while (0); - // If there is an error... - // 1) but there was not a key clear request requiring the assertion of - // physical presence --AND-- - // 2) it wasn't a mnfg mode IPL, then - // make the error informational and commit it here so as not to halt the IPL + // If there is an error, but there was not a key clear request requiring + // the assertion of physical presence, make the error informational and + // commit it here so as not to halt the IPL if ((err != nullptr) && - (doesKeyClearRequestPhysPres == false) && - (isMnfgIpl() == false)) + (doesKeyClearRequestPhysPres == false)) { err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL); SB_ERR("handlePhysPresenceWindow: Setting ERR to informational and "