diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-04-19 08:53:03 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-05-23 11:01:28 -0400 |
commit | 096ef9048330813def6681fb0f45271cb3c24259 (patch) | |
tree | 720e1aa4b99dfa1b5f7f8befa4d0248a9abc63a1 /src/include | |
parent | 8a22766d0c63f6dd86b1cfefb624c8645becdab3 (diff) | |
download | talos-hostboot-096ef9048330813def6681fb0f45271cb3c24259.tar.gz talos-hostboot-096ef9048330813def6681fb0f45271cb3c24259.zip |
Add TPM Presence Info to HDAT
Populate HDAT TPM Section with TPM Presence Info by refering to
link IDs in HDAT PCRD section and verify that the PRCD section's
list of link IDs are unique and valid.
Change-Id: I49956aae129b325f55a6358caa0af4da1951b58c
RTC:170638
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39658
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@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/include')
-rw-r--r-- | src/include/usr/runtime/runtime.H | 16 | ||||
-rw-r--r-- | src/include/usr/runtime/runtime_reasoncodes.H | 71 |
2 files changed, 54 insertions, 33 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index bdbcf20a8..04c727409 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -137,7 +137,8 @@ enum SectionId SPIRA_L, //< Legacy SPIRA NACA, //< NACA HBRT, //< Hostboot Runtime - HBRT_DATA, //< Hostboot Runtime Data + HBRT_DATA, //< Hostboot Runtime Data + PCRD, //< Processor Chip Related Data IPMI_DATA, //< IPMI Sensor Mapping Data NODE_TPM_RELATED, //< Node TPM Related Data RESERVED_MEM, //< Hostboot's Reserved Mainstore Memory @@ -165,6 +166,19 @@ errlHndl_t get_host_data_section( SectionId i_section, const size_t DATA_SIZE_UNKNOWN = 0xFFFFFFFFFFFFFFFF; /** + * @brief Get the number of instances in a given section. + * + * @param[in] i_section The section for which the instance count is desired + * + * @param[out] o_count The number of instances in this section + * + * @return errlHndl_t Returns nullptr on success. Returns an error if the + * section id used is invalid or has no concept of instances. Also, can + * return an error if the n-tuple is either corrupt or unavailable. + */ +errlHndl_t get_instance_count( RUNTIME::SectionId i_section, uint64_t& o_count); + +/** * @brief Store the actual count of a section in local memory. * * @param[in] i_section Chunk of data to update diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H index f287a5d97..6570e78fe 100644 --- a/src/include/usr/runtime/runtime_reasoncodes.H +++ b/src/include/usr/runtime/runtime_reasoncodes.H @@ -43,6 +43,7 @@ namespace RUNTIME MOD_HDATSERVICE_FINDSPIRA = 0x09, /** hdatservice.C */ MOD_HDATSERVICE_UPDATE_SECTION_ACTUAL = 0x0A, /**< hdatservice.C */ MOD_HDATSERVICE_MAPREGION = 0x0B, /**< hdatservice.C */ + MOD_HDATSERVICE_GETINSTANCECOUNT = 0x0C, /**< hdatservice.C */ // customize_attrs_for_payload.C MOD_CUST_COMP_NON_PHYP_RT_TARGET = 0x12, @@ -52,43 +53,49 @@ namespace RUNTIME MOD_PM_RT_HCODE_UPDATE = 0x16, /**< rt_pm.C */ MOD_MAP_PHYS_ADDR = 0x17, /**< populate_hbruntime.C */ MOD_UNMAP_VIRT_ADDR = 0x18, /**< populate_hbruntime.C */ + MOD_POPULATE_TPMINFOBYNODE = 0x19, /**< populate_hbruntime.C */ }; enum RuntimeReasonCode { - RC_DO_NOT_USE_THIS = RUNTIME_COMP_ID | 0x00, - RC_ATTR_GET_FAIL = RUNTIME_COMP_ID | 0x01, - RC_BAD_HDAT_HEADER = RUNTIME_COMP_ID | 0x02, - RC_BAD_HDAT_TUPLE = RUNTIME_COMP_ID | 0x03, - RC_INVALID_STANDALONE = RUNTIME_COMP_ID | 0x04, - RC_CANNOT_MAP_MEMORY = RUNTIME_COMP_ID | 0x05, - //RC_XXX = RUNTIME_COMP_ID | 0x06, - RC_CANNOT_MAP_MEMORY2 = RUNTIME_COMP_ID | 0x07, - RC_INVALID_PAYLOAD_KIND = RUNTIME_COMP_ID | 0x08, - RC_NO_HSVC_NODE_DATA_FOUND = RUNTIME_COMP_ID | 0x09, - RC_BAD_NACA = RUNTIME_COMP_ID | 0x0A, - RC_INVALID_ADDRESS = RUNTIME_COMP_ID | 0x0B, - RC_INVALID_SECTION = RUNTIME_COMP_ID | 0x0C, - RC_CANNOT_MAP_MEMORY3 = RUNTIME_COMP_ID | 0x0D, - RC_TCE_INVALID_SIZE = RUNTIME_COMP_ID | 0x0E, - RC_TCE_ADDR_NOT_ALIGNED = RUNTIME_COMP_ID | 0x0F, - RC_TCE_INIT_NOT_RUN = RUNTIME_COMP_ID | 0x10, - RC_TCE_DEV_MAP_FAIL = RUNTIME_COMP_ID | 0x11, - RC_TCE_DEV_UNMAP_FAIL = RUNTIME_COMP_ID | 0x12, - RC_TCE_NO_ACTIVE_PSI = RUNTIME_COMP_ID | 0x13, + RC_DO_NOT_USE_THIS = RUNTIME_COMP_ID | 0x00, + RC_ATTR_GET_FAIL = RUNTIME_COMP_ID | 0x01, + RC_BAD_HDAT_HEADER = RUNTIME_COMP_ID | 0x02, + RC_BAD_HDAT_TUPLE = RUNTIME_COMP_ID | 0x03, + RC_INVALID_STANDALONE = RUNTIME_COMP_ID | 0x04, + RC_CANNOT_MAP_MEMORY = RUNTIME_COMP_ID | 0x05, + //RC_XXX = RUNTIME_COMP_ID | 0x06, + RC_CANNOT_MAP_MEMORY2 = RUNTIME_COMP_ID | 0x07, + RC_INVALID_PAYLOAD_KIND = RUNTIME_COMP_ID | 0x08, + RC_NO_HSVC_NODE_DATA_FOUND = RUNTIME_COMP_ID | 0x09, + RC_BAD_NACA = RUNTIME_COMP_ID | 0x0A, + RC_INVALID_ADDRESS = RUNTIME_COMP_ID | 0x0B, + RC_INVALID_SECTION = RUNTIME_COMP_ID | 0x0C, + RC_CANNOT_MAP_MEMORY3 = RUNTIME_COMP_ID | 0x0D, + RC_TCE_INVALID_SIZE = RUNTIME_COMP_ID | 0x0E, + RC_TCE_ADDR_NOT_ALIGNED = RUNTIME_COMP_ID | 0x0F, + RC_TCE_INIT_NOT_RUN = RUNTIME_COMP_ID | 0x10, + RC_TCE_DEV_MAP_FAIL = RUNTIME_COMP_ID | 0x11, + RC_TCE_DEV_UNMAP_FAIL = RUNTIME_COMP_ID | 0x12, + RC_TCE_NO_ACTIVE_PSI = RUNTIME_COMP_ID | 0x13, RC_TCE_NOT_ENOUGH_FREE_ENTRIES = RUNTIME_COMP_ID | 0x14, - RC_TCE_ENTRY_NOT_CONTIGUOUS = RUNTIME_COMP_ID | 0x15, - RC_NO_SPIRA = RUNTIME_COMP_ID | 0x16, - RC_CANNOT_MAP_HDAT = RUNTIME_COMP_ID | 0x17, - RC_NOT_ENOUGH_SPACE = RUNTIME_COMP_ID | 0x18, - RT_UNIT_TARGET_NOT_FOUND = RUNTIME_COMP_ID | 0x19, - RT_TARGET_TYPE_NOT_SUPPORTED = RUNTIME_COMP_ID | 0x1A, - RT_NO_PROC_TARGET = RUNTIME_COMP_ID | 0x1B, - RC_UNMAP_FAIL = RUNTIME_COMP_ID | 0x1C, - RC_PM_RT_UNKNOWN_MODE = RUNTIME_COMP_ID | 0x1D, - RC_PM_RT_INTERFACE_ERR = RUNTIME_COMP_ID | 0x1E, - RC_PM_RT_HCODE_UPDATE_ERR = RUNTIME_COMP_ID | 0x1F, - RC_INVALID_RHB_INSTANCE = RUNTIME_COMP_ID | 0x20, + RC_TCE_ENTRY_NOT_CONTIGUOUS = RUNTIME_COMP_ID | 0x15, + RC_NO_SPIRA = RUNTIME_COMP_ID | 0x16, + RC_CANNOT_MAP_HDAT = RUNTIME_COMP_ID | 0x17, + RC_NOT_ENOUGH_SPACE = RUNTIME_COMP_ID | 0x18, + RT_UNIT_TARGET_NOT_FOUND = RUNTIME_COMP_ID | 0x19, + RT_TARGET_TYPE_NOT_SUPPORTED = RUNTIME_COMP_ID | 0x1A, + RT_NO_PROC_TARGET = RUNTIME_COMP_ID | 0x1B, + RC_UNMAP_FAIL = RUNTIME_COMP_ID | 0x1C, + RC_PM_RT_UNKNOWN_MODE = RUNTIME_COMP_ID | 0x1D, + RC_PM_RT_INTERFACE_ERR = RUNTIME_COMP_ID | 0x1E, + RC_PM_RT_HCODE_UPDATE_ERR = RUNTIME_COMP_ID | 0x1F, + RC_INVALID_RHB_INSTANCE = RUNTIME_COMP_ID | 0x20, + RC_DUPLICATE_I2C_LINK_IDS = RUNTIME_COMP_ID | 0x21, + RC_I2C_DEVICE_NOT_IN_MRW = RUNTIME_COMP_ID | 0x22, + RC_INSTANCES_UNSUPPORTED = RUNTIME_COMP_ID | 0x23, + RC_I2C_DEVICE_DUPLICATE_IN_MRW = RUNTIME_COMP_ID | 0x24, + RC_EXTRA_I2C_DEVICE_IN_MRW = RUNTIME_COMP_ID | 0x25, }; enum UserDetailsTypes |