summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2018-02-07 10:08:45 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-08 14:21:57 -0500
commitb1d0900ad706cd8e2a91a1acab016f5b681e23ef (patch)
treef881039f56e4ed423401bd54d3f10fb90800d10e /src/usr/isteps
parent03de84e713fb21f0e091ff29f05a77fec9e240b3 (diff)
downloadtalos-hostboot-b1d0900ad706cd8e2a91a1acab016f5b681e23ef.tar.gz
talos-hostboot-b1d0900ad706cd8e2a91a1acab016f5b681e23ef.zip
Find location of HDAT relocation dynamically from PAYLOAD
This commit looks at the NACA structure in the Primary PAYLOAD lid to determine the final destination of the HDAT structure that the FSP loaded into a temporary memory space using TCEs. Change-Id: I82b94f5fc133e4222d4efdcc7444012d7bcb5166 RTC:168745 Backport:release-fips910 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53564 Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Marshall J. Wilks <mjwilks@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: Nicholas E. Bofferding <bofferdn@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/usr/isteps')
-rw-r--r--src/usr/isteps/istep21/call_host_runtime_setup.C33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/usr/isteps/istep21/call_host_runtime_setup.C b/src/usr/isteps/istep21/call_host_runtime_setup.C
index b91e83fd3..056de3191 100644
--- a/src/usr/isteps/istep21/call_host_runtime_setup.C
+++ b/src/usr/isteps/istep21/call_host_runtime_setup.C
@@ -258,18 +258,9 @@ errlHndl_t verifyAndMovePayload(void)
payload_tmp_virt_addr,
payload_size);
- // Move HDAT temporarily put into HDAT_TMP_ADDR (HDAT_TMP_SIZE) into
- // its proper place
- // @TODO RTC 168745 - Update hdatservices calls to return Spira-S offset
- // Currently just using this known offset 80MB=0x5000000 used in current
- // PHYP images and then adding 1 PAGESIZE since our virtual address starts
- // at the secure header of PAYLOAD before PAYLOAD_BASE
- size_t hdat_cpy_offset = 0x5001000;
- if (!is_phyp)
- {
- hdat_cpy_offset = 0x31200000;
- }
+ // Move HDAT into its proper place after it was temporarily put into
+ // HDAT_TMP_ADDR (HDAT_TMP_SIZE) by the FSP via TCEs
hdat_tmp_virt_addr = mm_block_map(
reinterpret_cast<void*>(HDAT_TMP_ADDR),
HDAT_TMP_SIZE);
@@ -286,6 +277,26 @@ errlHndl_t verifyAndMovePayload(void)
break;
}
+ // Determine location of HDAT from NACA section of PAYLOAD
+ uint64_t hdat_cpy_offset = 0;
+
+ // Convert the move payloadBase_va to after secure header for PHYP
+ uint64_t payloadBase_va = reinterpret_cast<uint64_t>(payloadBase_virt_addr);
+ payloadBase_va += (is_phyp ? PAGESIZE : 0 );
+
+ RUNTIME::findHdatLocation(payloadBase_va, hdat_cpy_offset);
+
+ // PHYP images require adding 1 PAGESIZE since our virtual address starts
+ // at the secure header of PAYLOAD before PAYLOAD_BASE
+ if (is_phyp)
+ {
+ hdat_cpy_offset += PAGESIZE;
+ }
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "verifyAndMovePayload(): hdat_copy_offset = 0x%X",
+ hdat_cpy_offset);
+
hdat_final_virt_addr = mm_block_map(
reinterpret_cast<void*>(payloadBase +
hdat_cpy_offset),
OpenPOWER on IntegriCloud