diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-02-24 15:08:57 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-04-10 13:48:29 -0400 |
commit | 5bdb1f8ec34124c68db869dbb46b27e5a5fc24b5 (patch) | |
tree | 84ccf175a63ea0c362d2221cc12b59669ec0a51f /src/usr/runtime/hdatservice.C | |
parent | d85536ac35dd97a666b7b8de090f255b1a33c7d8 (diff) | |
download | talos-hostboot-5bdb1f8ec34124c68db869dbb46b27e5a5fc24b5.tar.gz talos-hostboot-5bdb1f8ec34124c68db869dbb46b27e5a5fc24b5.zip |
Populate HDAT TPM Info
Populate TPM Info during the secureboot runtime routine.
Change-Id: I02b960c175d51dc9b5941e15a529bd1587747444
RTC:166834
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37187
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime/hdatservice.C')
-rw-r--r-- | src/usr/runtime/hdatservice.C | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C index 32b266788..ab306c381 100644 --- a/src/usr/runtime/hdatservice.C +++ b/src/usr/runtime/hdatservice.C @@ -819,6 +819,34 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section, o_dataAddr = internal_data_ptrs[0].hdatOffset + base_addr; o_dataSize = internal_data_ptrs[0].hdatSize; } + else if( RUNTIME::NODE_TPM_RELATED == i_section ) + { + // Find the right tuple and verify it makes sense + hdat5Tuple_t* tuple = nullptr; + if( iv_spiraS ) + { + tuple = &(iv_spiraS->hdatDataArea[SPIRAS_TPM_DATA]); + } + else if( unlikely(iv_spiraL != nullptr) ) + { + tuple = &(iv_spiraL->hdatDataArea[SPIRAL_TPM_DATA]); + } + TRACUCOMP( g_trac_runtime, "NODE_TPM_DATA tuple=%p", tuple ); + + errhdl = check_tuple( i_section, tuple ); + if( errhdl ) { break; } + + uint64_t base_addr = 0; + errhdl = getSpiraTupleVA(tuple, base_addr); + if( errhdl ) { break; } + + TRACUCOMP( g_trac_runtime, "tpm_data=%p", base_addr ); + + // set the base address and size for the section + record_size = tuple->hdatAllocSize; + o_dataSize = record_size; + o_dataAddr = base_addr + i_instance * o_dataSize; + } // MS DUMP Source Table - MDST else if( RUNTIME::MS_DUMP_SRC_TBL == i_section ) { |