diff options
Diffstat (limited to 'src/usr/runtime')
-rw-r--r-- | src/usr/runtime/customize_attrs_for_payload.C | 283 | ||||
-rw-r--r-- | src/usr/runtime/hdatstructs.H | 7 | ||||
-rw-r--r-- | src/usr/runtime/populate_hbruntime.C | 155 | ||||
-rw-r--r-- | src/usr/runtime/test/makefile | 2 | ||||
-rw-r--r-- | src/usr/runtime/test/testpreverifiedlidmgr.H | 10 |
5 files changed, 337 insertions, 120 deletions
diff --git a/src/usr/runtime/customize_attrs_for_payload.C b/src/usr/runtime/customize_attrs_for_payload.C index 1846512b7..273596b12 100644 --- a/src/usr/runtime/customize_attrs_for_payload.C +++ b/src/usr/runtime/customize_attrs_for_payload.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -36,10 +36,10 @@ #include <targeting/common/target.H> #include <targeting/common/targetservice.H> #include <targeting/common/utilFilter.H> +#include <targeting/runtime/rt_targeting.H> #include <runtime/runtime_reasoncodes.H> #include <runtime/runtime.H> #include <errl/errlmanager.H> -#include <runtime/rt_targeting.H> #include <arch/pirformat.H> #include <targeting/common/util.H> #include <errl/errludtarget.H> @@ -78,7 +78,8 @@ errlHndl_t createProcNotFoundError( * @reasoncode RUNTIME::RT_NO_PROC_TARGET * @userdata1 Input targeting target's HUID * @devdesc No processor targeting target was found for the given - * targeting target + * targeting target + * @custdesc Unexpected internal firmware error */ pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, @@ -86,7 +87,7 @@ errlHndl_t createProcNotFoundError( RUNTIME::RT_NO_PROC_TARGET, huid, 0, - true); + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting target"). addToLog(pError); @@ -109,7 +110,7 @@ errlHndl_t createProcNotFoundError( */ errlHndl_t computeNonPhypRtTarget( const TARGETING::Target* i_pTarget, - RT_TARG::rtChipId_t& o_rtTargetId) + TARGETING::rtChipId_t& o_rtTargetId) { assert(i_pTarget != NULL); @@ -165,6 +166,7 @@ errlHndl_t computeNonPhypRtTarget( * @userdata1 MEMBUF targeting target's HUID * @devdesc No associated DMI targeting target(s) found for * given MEMBUF targeting target + * @custdesc Unexpected internal firmware error */ pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, @@ -172,7 +174,7 @@ errlHndl_t computeNonPhypRtTarget( RUNTIME::RT_UNIT_TARGET_NOT_FOUND, huid, 0, - true); + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target"). addToLog(pError); @@ -229,6 +231,80 @@ errlHndl_t computeNonPhypRtTarget( o_rtTargetId = PIR_t::createCoreId(o_rtTargetId,pos); o_rtTargetId |= HBRT_CORE_TYPE; } + else if( targetingTargetType == TARGETING::TYPE_OCMB_CHIP) + { + // OCMB (This layout mimics MEMBUF) + // 0b1000.0000.0000.0000.0000.0GGG.GCCC.UUUU + // where GGGG is group, CCC is chip, UUUU is OMI chip unit + // + TARGETING::TargetHandleList targetList; + + getParentAffinityTargets(targetList, + i_pTarget, + TARGETING::CLASS_UNIT, + TARGETING::TYPE_OMI, + TARGETING::UTIL_FILTER_ALL); + + if( targetList.empty() ) + { + auto huid = get_huid(i_pTarget); + TRACFCOMP(g_trac_runtime, ERR_MRK + "No associated OMI targeting target(s) found for OCMB_CHIP " + "targeting target with HUID of 0x%08X", + huid); + /*@ + * @error + * @moduleid RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET + * @reasoncode RUNTIME::RT_NO_OMI_TARGET_FOUND + * @userdata1 OCMB targeting target's HUID + * @devdesc No associated OMI targeting target(s) found for + * given OCMB targeting target + * @custdesc Unexpected internal firmware error + */ + pError = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET, + RUNTIME::RT_NO_OMI_TARGET_FOUND, + huid, + 0, + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); + + ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target"). + addToLog(pError); + + break; + } + + auto target = targetList[0]; + auto pos = target->getAttr<TARGETING::ATTR_CHIP_UNIT>(); + + targetList.clear(); + getParentAffinityTargets(targetList, + target, + TARGETING::CLASS_CHIP, + TARGETING::TYPE_PROC, + TARGETING::UTIL_FILTER_ALL); + + if(targetList.empty()) + { + pError = createProcNotFoundError(target); + break; + } + + auto procTarget = targetList[0]; + pError = computeNonPhypRtTarget(procTarget, o_rtTargetId); + if(pError) + { + break; + } + + // GGGG = 0 by default, CCC = o_rtTargetId, UUUU = pos + // HBRT_MEMBUF_TYPE distinguishes this target as a MEMBUF/OCMB + // Reusing MEMBUF for OCMB type as the two can't coexist + o_rtTargetId = (o_rtTargetId << RT_TARG::MEMBUF_ID_SHIFT); + o_rtTargetId += pos; // OMI chip unit acts as unique target position + o_rtTargetId |= HBRT_MEMBUF_TYPE; + } else { auto huid = get_huid(i_pTarget); @@ -246,6 +322,7 @@ errlHndl_t computeNonPhypRtTarget( * @userdata2 Targeting target's type * @devdesc The targeting type of the input targeting target is * not supported by runtime code + * @custdesc Unexpected internal firmware error */ pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, @@ -253,7 +330,7 @@ errlHndl_t computeNonPhypRtTarget( RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED, huid, targetingTargetType, - true); + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target"). addToLog(pError); @@ -277,7 +354,7 @@ errlHndl_t computeNonPhypRtTarget( */ errlHndl_t getRtTypeForTarget( const TARGETING::Target* i_pTarget, - RT_TARG::rtChipId_t& o_rtType) + TARGETING::rtChipId_t& o_rtType) { assert(i_pTarget != NULL); @@ -305,6 +382,10 @@ errlHndl_t getRtTypeForTarget( case TARGETING::TYPE_CORE: rtType = HBRT_CORE_TYPE; break; + case TARGETING::TYPE_OCMB_CHIP: + // reusing MEMBUF type as it is not present + rtType = HBRT_MEMBUF_TYPE; + break; default: found = false; break; @@ -325,6 +406,7 @@ errlHndl_t getRtTypeForTarget( * @userdata1 Target's HUID * @userdata2 Target's targeting type * @devdesc Targeting target's type not supported by runtime code + * @custdesc Unexpected internal firmware error */ pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, @@ -332,7 +414,7 @@ errlHndl_t getRtTypeForTarget( RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED, huid, targetingTargetType, - true); + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target"). addToLog(pError); @@ -355,13 +437,15 @@ errlHndl_t configureHbrtHypIds(const bool i_configForPhyp) TARGETING::CLASS_CHIP, TARGETING::TYPE_MEMBUF); TARGETING::PredicateCTM isaCore( TARGETING::CLASS_UNIT, TARGETING::TYPE_CORE); - TARGETING::PredicatePostfixExpr isaProcMembufOrCore; - isaProcMembufOrCore.push(&isaProc).push(&isaMembuf).Or() - .push(&isaCore).Or(); + TARGETING::PredicateCTM isanOcmbChip( + TARGETING::CLASS_CHIP, TARGETING::TYPE_OCMB_CHIP); + TARGETING::PredicatePostfixExpr isaProcMembufCoreorOcmb; + isaProcMembufCoreorOcmb.push(&isaProc).push(&isaMembuf).Or() + .push(&isaCore).Or().push(&isanOcmbChip).Or(); TARGETING::TargetRangeFilter pIt( TARGETING::targetService().begin(), TARGETING::targetService().end(), - &isaProcMembufOrCore); + &isaProcMembufCoreorOcmb); for (; pIt; ++pIt) { auto hbrtHypId = HBRT_HYP_ID_UNKNOWN; @@ -376,61 +460,128 @@ errlHndl_t configureHbrtHypIds(const bool i_configForPhyp) break; } - if( (*pIt)->getAttr<TARGETING::ATTR_TYPE>() - == TARGETING::TYPE_CORE) + switch ((*pIt)->getAttr<TARGETING::ATTR_TYPE>()) { - if(TARGETING::is_fused_mode()) + case TARGETING::TYPE_CORE: { - // If we're in fused core mode, all core ID's must - // match that of the parent EX - auto type = TARGETING::TYPE_EX; - const TARGETING::Target* pEx = - TARGETING::getParent(*pIt,type); - - // If this fails, everything is already hosed - assert(pEx != NULL); - - hbrtHypId = (pEx)->getAttr<TARGETING::ATTR_ORDINAL_ID>(); - }else + if(TARGETING::is_fused_mode()) + { + // If we're in fused core mode, all core ID's must + // match that of the parent EX + auto type = TARGETING::TYPE_EX; + const TARGETING::Target* pEx = + TARGETING::getParent(*pIt,type); + + // If this fails, everything is already hosed + assert(pEx != NULL); + + hbrtHypId = (pEx)->getAttr<TARGETING::ATTR_ORDINAL_ID>(); + } + else + { + hbrtHypId = (*pIt)->getAttr<TARGETING::ATTR_ORDINAL_ID>(); + } + break; + } + case TARGETING::TYPE_MEMBUF: + { + //MEMBUF + // 0b1000.0000.0000.0000.0000.0PPP.PPPP.MMMM + // where PP is the parent proc's id, MMMM is memory channel + // + TARGETING::TargetHandleList targetList; + + getParentAffinityTargets(targetList, + (*pIt), + TARGETING::CLASS_UNIT, + TARGETING::TYPE_DMI, false); + assert( !targetList.empty() ); + + auto dmi_target = targetList[0]; + auto pos = dmi_target->getAttr<TARGETING::ATTR_CHIP_UNIT>(); + + targetList.clear(); + getParentAffinityTargets(targetList, + dmi_target, + TARGETING::CLASS_CHIP, + TARGETING::TYPE_PROC, false); + assert( !targetList.empty() ); + + auto procTarget = targetList[0]; + hbrtHypId = procTarget->getAttr<TARGETING::ATTR_ORDINAL_ID>(); + hbrtHypId = (hbrtHypId << RT_TARG::MEMBUF_ID_SHIFT); + hbrtHypId += pos; + break; + } + case TARGETING::TYPE_OCMB_CHIP: + { + TRACDCOMP( g_trac_runtime, "configureHbrtHypIds> " + "Set ATTR_HBRT_HYP_ID attribute for OCMB target " + "with HUID of 0x%08X", TARGETING::get_huid(*pIt)); + + // TYPE_OCMB_CHIP (mimics MEMBUF layout) + // 0b1000.0000.0000.0000.0000.0PPP.PPPP.UUUU + // where PP is the parent proc's id, UUUU is OMI chip unit + // + TARGETING::TargetHandleList targetList; + + getParentAffinityTargets(targetList, + (*pIt), + TARGETING::CLASS_UNIT, + TARGETING::TYPE_OMI, false); + assert( !targetList.empty() ); + + auto omi_target = targetList[0]; + auto pos = omi_target->getAttr<TARGETING::ATTR_CHIP_UNIT>(); + + targetList.clear(); + getParentAffinityTargets(targetList, + omi_target, + TARGETING::CLASS_CHIP, + TARGETING::TYPE_PROC, false); + assert( !targetList.empty() ); + + auto procTarget = targetList[0]; + // Reusing MEMBUF for OCMB Chip communication + hbrtHypId = procTarget->getAttr<TARGETING::ATTR_ORDINAL_ID>(); + hbrtHypId = (hbrtHypId << RT_TARG::MEMBUF_ID_SHIFT); + hbrtHypId += pos; // Add OMI chip unit to end + break; + } + case TARGETING::TYPE_PROC: { hbrtHypId = (*pIt)->getAttr<TARGETING::ATTR_ORDINAL_ID>(); + break; } - } - else if( (*pIt)->getAttr<TARGETING::ATTR_TYPE>() - == TARGETING::TYPE_MEMBUF ) - { - //MEMBUF - // 0b1000.0000.0000.0000.0000.0PPP.PPPP.MMMM - // where PP is the parent proc's id, MMMM is memory channel - // - TARGETING::TargetHandleList targetList; - - getParentAffinityTargets(targetList, - (*pIt), - TARGETING::CLASS_UNIT, - TARGETING::TYPE_DMI, false); - assert( !targetList.empty() ); - - auto dmi_target = targetList[0]; - auto pos = dmi_target->getAttr<TARGETING::ATTR_CHIP_UNIT>(); - - targetList.clear(); - getParentAffinityTargets(targetList, - dmi_target, - TARGETING::CLASS_CHIP, - TARGETING::TYPE_PROC, false); - assert( !targetList.empty() ); - - auto procTarget = targetList[0]; - hbrtHypId = procTarget->getAttr<TARGETING::ATTR_ORDINAL_ID>(); - hbrtHypId = (hbrtHypId << RT_TARG::MEMBUF_ID_SHIFT); - hbrtHypId += pos; - } - else // just PROC - { - hbrtHypId = (*pIt)->getAttr<TARGETING::ATTR_ORDINAL_ID>(); - } - + default: + { + auto huid = get_huid(*pIt); + auto targetType = (*pIt)->getAttr<TARGETING::ATTR_TYPE>(); + TRACFCOMP(g_trac_runtime, ERR_MRK + "configureHbrtHypIds> 0x%08X is not a supported type. " + "HUID: 0x%08X", targetType, huid); + /*@ + * @errortype + * @moduleid RUNTIME::MOD_CONFIGURE_HBRT_HYP_IDS + * @reasoncode RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED + * @userdata1 Target's HUID + * @userdata2 Target's targeting type + * @devdesc Targeting target's type not supported by runtime code + * @custdesc Unexpected internal firmware error + */ + pError = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + RUNTIME::MOD_CONFIGURE_HBRT_HYP_IDS, + RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED, + huid, + targetType, + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); + + ERRORLOG::ErrlUserDetailsTarget(*pIt,"Targeting Target"). + addToLog(pError); + break; + } + } // end of ATTR_TYPE switch hbrtHypId |= rtType; } else @@ -442,6 +593,12 @@ errlHndl_t configureHbrtHypIds(const bool i_configForPhyp) } } + // Only set HBRT_HYP_ID attribute if no error found + if (pError) + { + break; + } + (*pIt)->setAttr<TARGETING::ATTR_HBRT_HYP_ID>(hbrtHypId); TRACDCOMP( g_trac_runtime, "configureHbrtHypIds> " "Set ATTR_HBRT_HYP_ID attribute to 0x%016llX on targeting target " diff --git a/src/usr/runtime/hdatstructs.H b/src/usr/runtime/hdatstructs.H index 94f4c1b71..46cde05f7 100644 --- a/src/usr/runtime/hdatstructs.H +++ b/src/usr/runtime/hdatstructs.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -453,7 +453,10 @@ typedef struct sysSecSets // NOTE: This bit is labeled "Platform Security Overrides Allowed" // in the section 6.1.1 of HDAT spec. uint16_t sbeSecBackdoor : 1; - uint16_t reserved : 13; + + // bit 3: "System Physical Presence has been asserted" + uint16_t physicalPresenceAsserted : 1; + uint16_t reserved : 12; } SysSecSets; #endif diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C index 371c3bee8..5ead63b3e 100644 --- a/src/usr/runtime/populate_hbruntime.C +++ b/src/usr/runtime/populate_hbruntime.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -56,7 +56,6 @@ #include <secureboot/trustedbootif.H> #include <secureboot/service.H> #include <hdat/hdat.H> -#include <config.h> #include "../hdat/hdattpmdata.H" #include "../hdat/hdatpcrd.H" #include "../secureboot/trusted/tpmLogMgr.H" @@ -854,9 +853,18 @@ errlHndl_t fill_RsvMem_hbData(uint64_t & io_start_address, } #ifdef CONFIG_SECUREBOOT - memcpy(reinterpret_cast<uint8_t*>(l_prevDataAddr), - reinterpret_cast<uint8_t *>(l_memd_info.vaddr), - l_memd_info.secureProtectedPayloadSize); + if (l_memd_info.hasHashTable) + { + memcpy(reinterpret_cast<uint8_t*>(l_prevDataAddr), + reinterpret_cast<uint8_t *>(l_memd_info.vaddr), + l_memd_info.size); + } + else + { + memcpy(reinterpret_cast<uint8_t*>(l_prevDataAddr), + reinterpret_cast<uint8_t *>(l_memd_info.vaddr), + l_memd_info.secureProtectedPayloadSize); + } #else memcpy(reinterpret_cast<uint8_t*>(l_prevDataAddr), reinterpret_cast<uint8_t *>(l_memd_info.vaddr), @@ -905,10 +913,15 @@ errlHndl_t fill_RsvMem_hbData(uint64_t & io_start_address, l_elog->collectTrace(RUNTIME_COMP_NAME); break; } + // break out of for-loop if + if(l_elog) + { + break; + } i++; } - // exit if we hit an error + // break out of do-while if we hit an error if(l_elog) { break; @@ -1009,7 +1022,16 @@ errlHndl_t hbResvLoadSecureSection (const PNOR::SectionId i_sec, if (i_secHdrExpected) { // If section is signed, only the protected size was loaded into memory - l_imgSize = l_info.secureProtectedPayloadSize; + if (!l_info.hasHashTable) + { + l_imgSize = l_info.secureProtectedPayloadSize; + } + else + { + // Need to expose header and hash table + l_pnorVaddr -= l_info.secureProtectedPayloadSize; + l_imgSize += l_info.secureProtectedPayloadSize; + } // Include secure header // NOTE: we do not preserve the header in virtual memory when SB // is compiled out. So "-PAGESIZE" only works when SB is compiled in @@ -1257,51 +1279,10 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId, bool i_master_node) break; } - //////////////////////////////////////////////////////////////////// - // Set the Architected Reserve area in OPAL and pass it down to SBE - uint64_t l_memBase = l_topMemAddr - - VMM_ALL_HOMER_OCC_MEMORY_SIZE - - VMM_ARCH_REG_DATA_SIZE_ALL_PROC; - - l_elog = setNextHbRsvMemEntry(HDAT::RHB_TYPE_HBRT, - i_nodeId, - l_memBase, - VMM_ARCH_REG_DATA_SIZE_ALL_PROC, - HBRT_RSVD_MEM__ARCH_REG); - if(l_elog) - { - break; - } - // Loop through all functional Procs - for (const auto & l_procChip: l_procChips) - { - uint32_t l_procNum = - l_procChip->getAttr<TARGETING::ATTR_POSITION>(); - l_homerAddr = l_memBase + - (l_procNum * VMM_ARCH_REG_DATA_PER_PROC_SIZE); - - //Pass start address down to SBE via chipop - l_elog = SBEIO::sendPsuStashKeyAddrRequest( - SBEIO::ARCH_REG_DATA_ADDR, - l_homerAddr, - l_procChip); - if (l_elog) - { - TRACFCOMP( g_trac_runtime, "sendPsuStashKeyAddrRequest " - "failed for target: %x",TARGETING::get_huid(l_procChip)); - break; - } - } - - if(l_elog) - { - break; - } - //////////////////////////////////////////////////////////////////// - #ifdef CONFIG_START_OCC_DURING_BOOT /////////////////////////////////////////////////// // OCC Common entry + /////////////////////////////////////////////////// if( !(TARGETING::is_phyp_load()) ) { TARGETING::Target * l_sys = nullptr; @@ -1324,6 +1305,69 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId, bool i_master_node) #endif } + /////////////////////////////////////////////////// + // Set the SBE Architected Dump area + // Note that this is right after HOMER areas + // PHYP goes up, OPAL goes down. Save this away + // Into targeting so dumpCollect can find later + // on the MPIPL + // + // Note that this works for PHYP multinode (as it + // grabs location from HRMOR), but OPAL only + // supports a single node style system (absolute + // address) + ////////////////////////////////////////////////// + uint64_t l_archAddr = 0; + if(TARGETING::is_phyp_load()) + { + l_archAddr = cpu_spr_value(CPU_SPR_HRMOR) + + l_mirrorBase + + VMM_ARCH_REG_DATA_START_OFFSET; + } + else if(TARGETING::is_sapphire_load()) + { + l_archAddr = l_topMemAddr + - VMM_ALL_HOMER_OCC_MEMORY_SIZE + - VMM_ARCH_REG_DATA_SIZE_ALL_PROC; + } + l_sys->setAttr<TARGETING::ATTR_SBE_ARCH_DUMP_ADDR>(l_archAddr); + + // SBE Architected Dump area is a single chunk of data + // to OPAL/PHYP -- so reserve once, but need to inform + // individual SBEs of their location + l_elog = setNextHbRsvMemEntry(HDAT::RHB_TYPE_HBRT, + i_nodeId, + l_archAddr, + VMM_ARCH_REG_DATA_SIZE_ALL_PROC, + HBRT_RSVD_MEM__ARCH_REG); + if(l_elog) + { + break; + } + + // Loop through all functional Procs + uint32_t l_procNum = 0; + for (const auto & l_procChip: l_procChips) + { + uint64_t l_addr = l_archAddr + + (l_procNum++ * VMM_ARCH_REG_DATA_PER_PROC_SIZE); + + //Pass start address down to SBE via chipop + l_elog = SBEIO::sendPsuStashKeyAddrRequest( + SBEIO::ARCH_REG_DATA_ADDR, + l_addr, + l_procChip); + if (l_elog) + { + TRACFCOMP( g_trac_runtime, "Arch dump sendPsuStashKeyAddrRequest " + "failed for target: %x",TARGETING::get_huid(l_procChip)); + break; + } + } + if(l_elog) + { + break; + } //////////////////////////////////////////////////// // HB Data area @@ -1856,6 +1900,13 @@ errlHndl_t populate_hbSecurebootData ( void ) // populate security override setting l_sysSecSets->sbeSecBackdoor = SECUREBOOT::getSbeSecurityBackdoor(); + // populate "System Physical Presence has been asserted" + TARGETING::Target* sys = nullptr; + TARGETING::targetService().getTopLevelTarget( sys ); + assert(sys != nullptr, "populate_hbSecurebootData() - Could not obtain top level target"); + l_sysSecSets->physicalPresenceAsserted = + sys->getAttr<TARGETING::ATTR_PHYS_PRES_ASSERTED>(); + // populate TPM config bits in hdat bool tpmRequired = false; #ifdef CONFIG_TPMDD @@ -2863,6 +2914,12 @@ errlHndl_t populate_hbTpmInfo() // if single node system if (!hb_images) { + // TODO RTC: 214260 Remove workaround skipping the population + // of the TPM info for runtime on single node on Axone systems + #ifdef CONFIG_AXONE_BRING_UP + TRACFCOMP( g_trac_runtime, "SKIPPING populate_hbTpmInfo: Single node system"); + break; + #endif TRACDCOMP( g_trac_runtime, "populate_hbTpmInfo: Single node system"); l_elog = populate_TpmInfoByNode(0); // 0 for single node if(l_elog != nullptr) diff --git a/src/usr/runtime/test/makefile b/src/usr/runtime/test/makefile index ec316244f..fbba18a7d 100644 --- a/src/usr/runtime/test/makefile +++ b/src/usr/runtime/test/makefile @@ -24,7 +24,7 @@ # IBM_PROLOG_END_TAG ROOTPATH = ../../../.. MODULE = testruntime -TESTS += $(if $(or $(CONFIG_EARLY_TESTCASES),${CONFIG_AXONE_BRING_UP}) ,,testpreverifiedlidmgr.H) +TESTS += $(if $(CONFIG_EARLY_TESTCASES) ,,testpreverifiedlidmgr.H) TESTS += test_checkHbResMemLimit.H #@TODO RTC 132750 #TESTS += hdatservicetest.H diff --git a/src/usr/runtime/test/testpreverifiedlidmgr.H b/src/usr/runtime/test/testpreverifiedlidmgr.H index 7b47bf98f..955550c8b 100644 --- a/src/usr/runtime/test/testpreverifiedlidmgr.H +++ b/src/usr/runtime/test/testpreverifiedlidmgr.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -118,12 +118,12 @@ class PreVerifiedLidMgrTest : public CxxTest::TestSuite // RINGOVD not permitted in secure mode. Meaning the Header and // Content lid will be missing. l_expectedLids -= 2; - - // VERSION is only an OpenPOWER partition so we need to adjust for - // it here since it doesn't exist for standalone. - l_expectedLids -= 2; } + // VERSION is only an OpenPOWER partition so we need to adjust for + // it here since it doesn't exist for standalone. + l_expectedLids -= 2; + // Ensure the expected number of lids were loaded. if (l_preVerLidMgr.cv_lidsLoaded.size() != l_expectedLids) { |