summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2017-11-10 14:29:19 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-11-14 21:05:19 -0500
commit43b86b565ad7cffec7b903dbe84c3a72954700a9 (patch)
tree14b0f9b28b69ddb1f89e544f8455d1cc7fc7a37f /src
parent70c697000c8a24f3d777eefcc1d632164fe6e7f5 (diff)
downloadtalos-hostboot-43b86b565ad7cffec7b903dbe84c3a72954700a9.tar.gz
talos-hostboot-43b86b565ad7cffec7b903dbe84c3a72954700a9.zip
During MPIPL check if SBE has set Hyp HRMOR in blComm area
It is possible for the Hypervisor to move the HRMOR during runtime If this occurs, then we trigger an MPIPL, hostboot needs to be sure to set the PAYLOAD_BASE attribute to whatever the Hypervisor had the HRMOR set to before mpipling. The HRMOR is read out by the SBE during its MPIPL steps and written to the bootloader which the bootloader passes up to hostboot. Change-Id: I415b4a0465020f89f95fcde974123362067cbbca RTC:180959 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49562 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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/sbeio/sbeioif.H1
-rwxr-xr-xsrc/usr/targeting/targetservicestart.C25
2 files changed, 26 insertions, 0 deletions
diff --git a/src/include/usr/sbeio/sbeioif.H b/src/include/usr/sbeio/sbeioif.H
index 357a29a95..a951fe4a4 100644
--- a/src/include/usr/sbeio/sbeioif.H
+++ b/src/include/usr/sbeio/sbeioif.H
@@ -32,6 +32,7 @@ namespace SBEIO
enum KeyAddrStashKeys
{
RSV_MEM_ATTR_ADDR = 0x01, //Start at non-zero
+ HYPERVISOR_HRMOR = 0x02,
//On SBE side struct is defaulted so that
//Keys are 0xFF and Vals are 0xFFFFFFFFFFFFFFFF
//So a key w/ FF means its empty or at its default val
diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C
index 4c06c6f52..5eb625d52 100755
--- a/src/usr/targeting/targetservicestart.C
+++ b/src/usr/targeting/targetservicestart.C
@@ -64,6 +64,7 @@
#include <lpc/lpcif.H>
#include <xscom/xscomif.H>
#include <bootloader/bootloaderif.H>
+#include <sbeio/sbeioif.H>
#ifdef CONFIG_DRTM
#include <secureboot/drtm.H>
@@ -379,6 +380,30 @@ static void initializeAttributes(TargetService& i_targetService,
l_pTopLevel->setAttr<ATTR_HB_RSV_MEM_NEXT_SECTION>(0);
l_pTopLevel->setAttr<ATTR_ATTN_CHK_ALL_PROCS>(1);
+ //It is possible that the hypervisor moved the HRMOR
+ //The SBE should have read the HRMOR value from the master
+ //core prior to stopping its clocks and passed that
+ //value to the bootloader. The bootloader passes this to
+ //HB via the BlToHbDataManager
+ // Setup physical TOC address
+ uint64_t l_hyp_hrmor = 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::HYPERVISOR_HRMOR)
+ {
+ l_hyp_hrmor = l_keyAddrPairs.addr[keyIndex];
+ }
+ }
+
+ if(l_hyp_hrmor)
+ {
+ l_pTopLevel->setAttr<ATTR_PAYLOAD_BASE>(l_hyp_hrmor);
+ }
+
TARGETING::PredicateCTM l_chipFilter(CLASS_CHIP, TYPE_PROC);
TARGETING::PredicateIsFunctional l_functional;
TARGETING::PredicatePostfixExpr l_functionalChips;
OpenPOWER on IntegriCloud