summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-05-31 17:03:24 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-06-04 17:32:40 -0400
commit41daed137d2f31ba125a1ada241755e42f36868c (patch)
tree5067edb244a9ed4bd0bc7a04b792df15c0a93619 /src/kernel
parentcbacafbc508accc492c63d4f18e509a6082e8f45 (diff)
downloadtalos-hostboot-41daed137d2f31ba125a1ada241755e42f36868c.tar.gz
talos-hostboot-41daed137d2f31ba125a1ada241755e42f36868c.zip
Write Hostboot HRMOR into core scratch reg 1
Hostboot code will write the current HRMOR value into core scratch reg 1 (scom=xx010A87, spr=0x08) at initial boot. This data is ORed into the memory size data that was already present. The bootloader code will do the same. Also updated the debug tools to key off of this data if it is available to avoid any HRMOR hardcoding. The purpose of this change is to provide a method for the FSP code to handle various memory remapping scenarios that are currently in plan without needing any explicit communication from Hostboot. Change-Id: Ia3c81980ebd780ae182956cddae785dd408fbed9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59699 Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/misc.C16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/misc.C b/src/kernel/misc.C
index 3ab2a7a57..b602ed707 100644
--- a/src/kernel/misc.C
+++ b/src/kernel/misc.C
@@ -591,22 +591,22 @@ namespace KernelMisc
namespace KernelMemState
{
void setMemScratchReg(MemLocation i_location,
- MemSize i_size)
+ MemSize i_size)
{
- mem_location l_MemData;
+ MemState_t l_MemData;
- l_MemData.memMode = i_location;
- l_MemData.reserved = 0;
- l_MemData.memSize = i_size;
+ l_MemData.location = i_location;
+ l_MemData.hrmor = getHRMOR();
+ l_MemData.size = i_size;
+ kassert( i_size < KernelMemState::MAX_MEMORY );
isync();
- kernel_hbDescriptor.kernelMemoryState = l_MemData.Scratch6Data;
+ kernel_hbDescriptor.kernelMemoryState = l_MemData.fullData;
KernelMisc::updateScratchReg(MMIO_SCRATCH_MEMORY_STATE,
- l_MemData.Scratch6Data);
+ l_MemData.fullData);
lwsync();
}
-
};
const char* ProcessorCoreTypeStrings[]
OpenPOWER on IntegriCloud