From b0da5312bac172bdea608371f647fd1bafb87bce Mon Sep 17 00:00:00 2001 From: crgeddes Date: Mon, 14 Aug 2017 16:39:58 -0500 Subject: Use keyAddr stash chipop to pass rsv mem addr through SBE for MPIPL Previously we were relying on the reservedMem section to be a certain address for the attrrp to find after an MPIPL. With this change the address is passed through the SBE so the reservedMem data can be anywhere RTC: 165369 Change-Id: I06521c049088c4a53a8c0a51fa07e5200da09483 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44624 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Brian E. Bakke Reviewed-by: Martin Gloff Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/targeting/attrrp.C | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/usr/targeting/attrrp.C') diff --git a/src/usr/targeting/attrrp.C b/src/usr/targeting/attrrp.C index 2c9f0b6fe..b4d5ce155 100755 --- a/src/usr/targeting/attrrp.C +++ b/src/usr/targeting/attrrp.C @@ -53,6 +53,9 @@ #include #include #include +#include +#include +#include using namespace INITSERVICE; using namespace ERRORLOG; @@ -377,8 +380,25 @@ namespace TARGETING uint64_t l_attr_data_size = 0; // Setup physical TOC address - uint64_t l_toc_addr = cpu_spr_value(CPU_SPR_HRMOR) + - VMM_HB_DATA_TOC_START_OFFSET; + uint64_t l_toc_addr = 0; + + Bootloader::keyAddrPair_t l_keyAddrPairs = + g_BlToHbDataManager.getKeyAddrPairs(); + + for (uint8_t keyIndex = 0; keyIndex < MAX_ROW_COUNT; keyIndex++) + { + if(l_keyAddrPairs.key[keyIndex] == SBEIO::RSV_MEM_ATTR_ADDR) + { + l_toc_addr = l_keyAddrPairs.addr[keyIndex]; + } + } + + if(!l_toc_addr) + { + // Setup physical TOC address to hardcoded value + l_toc_addr = cpu_spr_value(CPU_SPR_HRMOR) + + VMM_HB_DATA_TOC_START_OFFSET; + } // Now map the TOC to find the ATTR label address & size Util::hbrtTableOfContents_t * l_toc_ptr = -- cgit v1.2.1