From b8f4e5009a347a0201fbe09b3701ceeb6edd9bf2 Mon Sep 17 00:00:00 2001 From: Raja Das Date: Thu, 25 Oct 2018 11:26:25 +0530 Subject: OPAL/MPIPL: Processor Dump Area Table interfaces This patch adds support to collect processor architected register data. SBE <--> Hostboot : ------------------- During first boot, hostboot reserves memory to copy architected register data by SBE and sends address to each SBE (see commit 9f49d11b). During MPIPL SBE collects architected register data and copies to reserved memory. Hostboot <--> Hypervisor : -------------------------- HDAT/SPIRAH has new ntuple (Processor Dump Area) to pass various architected register data. During IPL/runtime hypervisor reserves memory for architected register data and updates SPIRAH. During MPIPL (istep 14.8), hostboot converts SBE formated architected registers data to HDAT format and copies to hypervisor reserved memory. It uses NACA/SPIRAH pointers to get hypervisor reserved memory details. Hostboot has to update SPIRAH ntuple after loading new LID to memory. Hence this patch introdues below new attributes: - PDA_CAPTURED_THREAD_REG_ARRAY_ADDR - PDA_CAPTURED_THREAD_REG_ARRAY_SIZE - PDA_THREAD_REG_ENTRY_SIZE - PDA_THREAD_REG_STATE_ENTRY_FORMAT Change-Id: Idc7489e8cf6fc68fe80f028ba6deb97aa72486bf CC: Sampa Misra CC: Daniel M. Crowell Signed-off-by: Vasant Hegde Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/61627 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- src/include/usr/runtime/runtime.H | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/include/usr/runtime') diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index b5e717e2b..9d22e387b 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -229,7 +229,8 @@ enum SectionId HRMOR_STASH, //< Pointer to address in reserved memory // where PHYP can write HRMOR CPU_CTRL, // Spira-H CPU controls area - LAST_SECTION = CPU_CTRL //< Placeholder for arrays + PROC_DUMP_AREA_TBL, //< Processor dump area table + LAST_SECTION = PROC_DUMP_AREA_TBL //< Placeholder for arrays }; /** @@ -305,6 +306,23 @@ void saveActualCount( SectionId i_id, */ errlHndl_t writeActualCount( SectionId i_id ); +/** + * @brief Write actual architected register detail to HDAT/SPIRAH + * + * @param[in] i_section Chunk of data to update + * @param[in] threadRegSize Architected reg data size per thread + * @param[in] threadRegVersion Data format version + * @param[in] capArrayAddr Actual destination address + * @param[in] capArraySize Actual destiantion size + * + * @return errlHndl_t NULL on success + */ +errlHndl_t updateHostProcDumpActual( SectionId i_section, + uint32_t threadRegSize, + uint8_t threadRegVersion, + uint64_t capArrayAddr, + uint32_t capArraySize); + /** * @brief Use relocated payload base address * -- cgit v1.2.1