From 81abe97b78b39d20bb31e29535885a99ac4a8122 Mon Sep 17 00:00:00 2001 From: Dean Sanner Date: Fri, 25 Jan 2019 10:24:36 -0600 Subject: Support direct load of POWERVM from BOOTKERNEL partition PowerVM doesn't fit in the PAYLOAD section of PNOR. To enable a common PNOR layout instead put PowerVM into BOOTKERNEL partition, and if PHYP payload, load BOOTKERNEL instead of PAYLOAD PNOR partition Change-Id: Id19f3ce708b537a19256c22aab3cc1b3e83d4ab1 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71677 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Daniel M Crowell Reviewed-by: MURULIDHAR NATARAJU Reviewed-by: William G Hoffa --- src/include/usr/pnor/pnor_const.H | 1 + src/usr/isteps/istep20/call_host_load_payload.C | 8 +++++++- src/usr/pnor/pnor_utils.C | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/include/usr/pnor/pnor_const.H b/src/include/usr/pnor/pnor_const.H index 0b6b5e9ab..c975c684c 100644 --- a/src/include/usr/pnor/pnor_const.H +++ b/src/include/usr/pnor/pnor_const.H @@ -75,6 +75,7 @@ enum SectionId HDAT, /**< HDAT data */ EECACHE, OCMBFW, /**< OCMB image */ + BOOTKERNEL, /**< Bootkernel -- HB uses for PHYP */ #endif NUM_SECTIONS, /**< Number of defined sections */ diff --git a/src/usr/isteps/istep20/call_host_load_payload.C b/src/usr/isteps/istep20/call_host_load_payload.C index b0b9f3e5c..5190649c9 100644 --- a/src/usr/isteps/istep20/call_host_load_payload.C +++ b/src/usr/isteps/istep20/call_host_load_payload.C @@ -120,7 +120,13 @@ void* call_host_load_payload (void *io_pArgs) // Load payload data in PHYP mode or in Sapphire mode if(is_sapphire_load() || is_phyp_load()) { - l_err = load_pnor_section( PNOR::PAYLOAD, payloadBase ); + PNOR::SectionId l_secID = PNOR::PAYLOAD; + if (is_phyp_load()) + { + l_secID = PNOR::BOOTKERNEL; + } + + l_err = load_pnor_section( l_secID, payloadBase ); if ( l_err ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, diff --git a/src/usr/pnor/pnor_utils.C b/src/usr/pnor/pnor_utils.C index e09b85e6c..83ff90450 100644 --- a/src/usr/pnor/pnor_utils.C +++ b/src/usr/pnor/pnor_utils.C @@ -344,6 +344,7 @@ bool PNOR::isEnforcedSecureSection(const uint32_t i_section) i_section == HB_DATA || i_section == SBE_IPL || i_section == PAYLOAD || + i_section == BOOTKERNEL || i_section == SBKT || i_section == OCC || i_section == HCODE || @@ -426,6 +427,7 @@ const char * PNOR::SectionIdToString( uint32_t i_secIdIndex ) "HDAT", /**< PNOR::HDAT : Hdat Data */ "EECACHE", /**< PNOR::EECACHE : Cached data from various EEPROMs */ "OCMBFW", /**< PNOR::OCMBFW : OCMB image */ + "BOOTKERNEL", /**< PNOR::BOOTKERNEL : OPAL == petitboot,PHYP == PowerVM */ #endif }; -- cgit v1.2.1