From 3d3d39d62a94da9dc9bc2da73474c9c3400762c4 Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Thu, 3 May 2018 09:02:02 -0500 Subject: Get Final HDAT Size from PAYLOAD's SPIRA section This commit retrieves the amount of space the PAYLOAD has reserved for the HDAT content in its SPIRA section. It then uses this size when copying the HDAT from the temporary location (where the FSP put it with DMAs-via-TCEs) to its final location. Change-Id: I430a78a1655db85f448b3f5c30e6a83f5be4b1f6 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58261 Reviewed-by: ILYA SMIRNOV Reviewed-by: Nicholas E. Bofferding Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/runtime/hdatservice.C | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'src/usr/runtime') diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C index 88e80e9a0..c2721fd68 100644 --- a/src/usr/runtime/hdatservice.C +++ b/src/usr/runtime/hdatservice.C @@ -1800,9 +1800,10 @@ errlHndl_t clear_host_data_section(const RUNTIME::SectionId i_section) } -void findHdatLocation(const uint64_t i_payloadBase_va, uint64_t& o_hdat_offset) +void findHdatLocation(const uint64_t i_payloadBase_va, + uint64_t& o_hdat_offset, + size_t& o_hdat_size) { - TRACFCOMP( g_trac_runtime, ENTER_MRK"findHdatLocation> i_payloadBase_va = 0x%.16llX", i_payloadBase_va); do { @@ -1814,22 +1815,27 @@ void findHdatLocation(const uint64_t i_payloadBase_va, uint64_t& o_hdat_offset) (HDAT_NACA_OFFSET + i_payloadBase_va); TRACFCOMP( g_trac_runtime, "findHdatLocation> NACA=0x%.X->0x%p", HDAT_NACA_OFFSET, naca ); - // Find SpiraH information in NACA - const hdatSpira_t* spiraH = reinterpret_cast + // Find SpiraH information in NACA + const hdatSpira_t* spiraH = reinterpret_cast (naca->spiraH + i_payloadBase_va); - TRACFCOMP( g_trac_runtime, "findHdatLocation> SPIRA-H=0x%X->0x%p", naca->spiraH, spiraH ); + TRACFCOMP( g_trac_runtime, "findHdatLocation> SPIRA-H=0x%X->0x%p", naca->spiraH, spiraH ); - // SPIRA-S is at the beginning of the Host Data Area Tuple of SpiraH - const hdat5Tuple_t* tuple = reinterpret_cast - (&(spiraH->hdatDataArea[SPIRAH_HOST_DATA_AREAS])); - TRACFCOMP( g_trac_runtime, "findHdatLocation> SPIRA-S tuple at 0x%p, tuple->hdatAbsAddr=0x%X", tuple, tuple->hdatAbsAddr ); + // SPIRA-S is at the beginning of the Host Data Area Tuple of SpiraH + const hdat5Tuple_t* tuple = reinterpret_cast + (&(spiraH->hdatDataArea[SPIRAH_HOST_DATA_AREAS])); + TRACFCOMP( g_trac_runtime, "findHdatLocation> SPIRA-S tuple at 0x%p: " + "hdatAbsAddr=0x%X, hdatAllocCnt=0x%X, hdatAllocSize=0x%X", + tuple, tuple->hdatAbsAddr, tuple->hdatAllocCnt, + tuple->hdatAllocSize ); o_hdat_offset = tuple->hdatAbsAddr; + o_hdat_size = tuple->hdatAllocCnt * tuple->hdatAllocSize; } while (0); - TRACFCOMP( g_trac_runtime, EXIT_MRK"findHdatLocation> o_hdat_offset = 0x%X", o_hdat_offset); - + TRACFCOMP( g_trac_runtime, EXIT_MRK"findHdatLocation> " + "o_hdat_offset = 0x%X, o_hdat_size=0x%X", + o_hdat_offset, o_hdat_size); } -- cgit v1.2.1