diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2017-10-23 12:43:03 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-12-21 14:04:22 -0500 |
commit | 779a1c3444a348e7eccbf587ded6041cc3bbd13d (patch) | |
tree | 5b0db854286915626363b73ce82123227286ffe5 /src/usr/targeting/attrrp.C | |
parent | 51d3eeea8b3a43ee443a4a92dd4d134056f7557f (diff) | |
download | talos-hostboot-779a1c3444a348e7eccbf587ded6041cc3bbd13d.tar.gz talos-hostboot-779a1c3444a348e7eccbf587ded6041cc3bbd13d.zip |
Read the hb/hyp comm area to see if hyp moved hrmor
During MPIPL it is possible that the hrmor was moved while the
hypervisor was running. Before this commit if the hrmor was moved
then hostboot would fail when we tried to collect dump information.
With this commit hostboot will read the hyp/hb comm area to see if
the hypervisor has moved the hrmor and told HB, if the hyp has then
hostboot will set the ATTR_PAYLOAD_BASE attribute on the system
target during the target service initialization
Change-Id: I89b76913ffa106656f188364a2a077f982474084
RTC: 180959
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48699
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/attrrp.C')
-rwxr-xr-x | src/usr/targeting/attrrp.C | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/src/usr/targeting/attrrp.C b/src/usr/targeting/attrrp.C index b4d5ce155..432a2481a 100755 --- a/src/usr/targeting/attrrp.C +++ b/src/usr/targeting/attrrp.C @@ -334,6 +334,33 @@ namespace TARGETING } } + uint64_t AttrRP::getHbDataTocAddr() + { + // Setup physical TOC address + 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]; + break; + } + } + + 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; + } + + // return the vaddr found from the mapping + return l_toc_addr; + } + errlHndl_t AttrRP::parseAttrSectHeader() { errlHndl_t l_errl = NULL; @@ -372,39 +399,17 @@ namespace TARGETING //Create a block map of the address space we used to store //attribute information on the initial IPL //Account HRMOR (non 0 base addr) - - /////////////////////////////////////////////////////////////// - // This should change to get address from SBE. Currently hack - // to the start of ATTR data section on FSP systems uint64_t l_phys_attr_data_addr = 0; uint64_t l_attr_data_size = 0; // Setup physical TOC address - 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; - } + uint64_t l_toc_addr = AttrRP::getHbDataTocAddr(); // Now map the TOC to find the ATTR label address & size Util::hbrtTableOfContents_t * l_toc_ptr = - reinterpret_cast<Util::hbrtTableOfContents_t *>( - mm_block_map(reinterpret_cast<void*>(l_toc_addr), - sizeof(Util::hbrtTableOfContents_t))); + reinterpret_cast<Util::hbrtTableOfContents_t *>( + mm_block_map(reinterpret_cast<void*>(l_toc_addr), + sizeof(Util::hbrtTableOfContents_t))); if (l_toc_ptr != 0) { |