From b37f41b2c08cf48413acbaef5f914ea43c89e427 Mon Sep 17 00:00:00 2001 From: Nick Bofferding Date: Wed, 27 Jun 2018 17:09:43 -0500 Subject: Secure Boot: Copy PHyp secure header into standard reserved memory area This change alters where Hostboot copies the Phyp secure header; instead of placing it in front of PHYP (PHyp HRMOR-4k), it instead redirects it to the standard reserved memory area. By doing this, we prevent it from unintentionally ending up in mirrored memory. Change-Id: I0b228b4a748310eba2b580efe2f191adca0d05e3 CQ: SW435712 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61525 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa --- src/include/usr/runtime/preverifiedlidmgr.H | 44 ++++++++++++++++------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'src/include/usr/runtime') diff --git a/src/include/usr/runtime/preverifiedlidmgr.H b/src/include/usr/runtime/preverifiedlidmgr.H index 4b087e102..c5c335ce0 100644 --- a/src/include/usr/runtime/preverifiedlidmgr.H +++ b/src/include/usr/runtime/preverifiedlidmgr.H @@ -67,22 +67,26 @@ class PreVerifiedLidMgr const size_t i_size); /** - * @brief Load PNOR section into HB reserved memory + * @brief Load LID into HB reserved memory * - * @param[in] i_sec - PNOR section ID - * @param[in] i_addr - Virtual Address of PNOR section - * @param[in] i_size - Size of PNOR section - * @param[in] i_isPhypComp - Indicates if PHYP lids - * NOTE: PHYP lids go to address HRMOR - 4K - * @param[out] o_resvMemAddr - Mainstore address Lid was put in + * @param[in] i_lidId ID of LID to load + * @param[in] i_addr Virtual address of LID data + * @param[in] i_size Size of LID data + * @param[in] i_isPhypComp Whether LID is part of the PHyp component + * NOTE: PHYP LIDs (other than signature LID) will be loaded to + * an area anchored at PHyp's HRMOR + * @param[in] i_firstLid Whether this is the first LID of a component + * @param[out] o_resvMemAddr Mainstore address LID was loaded to * - * @return Error handle if error + * @return errlHndl_t Error log handle on failure, else nullptr */ - static errlHndl_t loadFromMCL(const uint32_t i_lidId, - const uint64_t i_addr, - const size_t i_size, - const bool i_isPhypComp, - uint64_t &o_resvMemAddr); + static errlHndl_t loadFromMCL( + uint32_t i_lidId, + uint64_t i_addr, + size_t i_size, + bool i_isPhypComp, + bool i_firstLid, + uint64_t& o_resvMemAddr); protected: @@ -127,11 +131,13 @@ class PreVerifiedLidMgr /** * @brief Internal implementation of loadFromMCL function. */ - errlHndl_t _loadFromMCL(const uint32_t i_lidId, - const uint64_t i_addr, - const size_t i_size, - const bool i_isPhypComp, - uint64_t &o_resvMemAddr); + errlHndl_t _loadFromMCL( + uint32_t i_lidId, + uint64_t i_addr, + size_t i_size, + bool i_isPhypComp, + bool i_firstLid, + uint64_t& o_resvMemAddr); // Private Members/Variables @@ -233,4 +239,4 @@ class PreVerifiedLidMgr }; -#endif \ No newline at end of file +#endif -- cgit v1.2.1