From b1d0900ad706cd8e2a91a1acab016f5b681e23ef Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Wed, 7 Feb 2018 10:08:45 -0600 Subject: 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 Reviewed-by: Marshall J. Wilks Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Nicholas E. Bofferding Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/usr/runtime/runtime.H | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/include/usr/runtime') diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index 798b15807..855ef86ac 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -264,6 +264,18 @@ void rediscover_hdat( void ); */ errlHndl_t openUntrustedSpCommArea(); +/** + * @brief Locates the offset of the HDAT structure as directed by the PAYLOAD + * + * Walks the NACA in the PAYLOAD to find the SpiraH structure. The SpiraH + * structure contains the offset to the SpiraS structure which is where the + * PAYLOAD expects the HDAT structure to be placed. + * + * @param[in] payloadBase_va - Virtual Address pointing to start of PAYLOAD + * @param[out] o_hdat_offset - Offset of HDAT Location from start of PAYLOAD + */ +void findHdatLocation(uint64_t payloadBase_va, uint64_t& o_hdat_offset); + } #endif -- cgit v1.2.3