diff options
author | Mike Baiocchi <mbaiocch@us.ibm.com> | 2018-05-03 09:02:02 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-05-08 14:37:04 -0400 |
commit | 3d3d39d62a94da9dc9bc2da73474c9c3400762c4 (patch) | |
tree | d411a52560e6f8603b29ac60f47513793bf0a80e /src/usr/runtime | |
parent | d44dfb65fa5d66ca123b3d844c5aaf103f50e1d1 (diff) | |
download | talos-hostboot-3d3d39d62a94da9dc9bc2da73474c9c3400762c4.tar.gz talos-hostboot-3d3d39d62a94da9dc9bc2da73474c9c3400762c4.zip |
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 <ismirno@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@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/usr/runtime')
-rw-r--r-- | src/usr/runtime/hdatservice.C | 28 |
1 files changed, 17 insertions, 11 deletions
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<const hdatSpira_t*> + // Find SpiraH information in NACA + const hdatSpira_t* spiraH = reinterpret_cast<const hdatSpira_t*> (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<const hdat5Tuple_t*> - (&(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<const hdat5Tuple_t*> + (&(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); } |