From 0420efec88bd2bdc4e23ebd0bac1659bf2ae8747 Mon Sep 17 00:00:00 2001 From: Raja Das Date: Fri, 11 Jan 2019 04:24:17 -0600 Subject: White/Black/Grey List Binary dump PSU Chip-op Support Change-Id: Ib540a55fb7e315954dd96428b7257ebffd23c99f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70361 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Srikantha S. Meesala Reviewed-by: RAJA DAS --- src/sbefw/app/common/sbecmdgeneric.C | 42 +++++++++++++++++++++++++++++++++++- src/sbefw/app/common/sbecmdgeneric.H | 11 +++++++++- src/sbefw/app/power/chipop_table.C | 5 +++++ src/sbefw/app/power/sbecmdgeneric.C | 3 ++- src/sbefw/core/sbe_host_intf.H | 4 +++- 5 files changed, 61 insertions(+), 4 deletions(-) (limited to 'src/sbefw') diff --git a/src/sbefw/app/common/sbecmdgeneric.C b/src/sbefw/app/common/sbecmdgeneric.C index 3aae2a2e..708249c4 100644 --- a/src/sbefw/app/common/sbecmdgeneric.C +++ b/src/sbefw/app/common/sbecmdgeneric.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -426,6 +426,46 @@ uint32_t sbeSetSystemFabricMap( uint8_t *i_pArg ) return l_rc; #undef SBE_FUNC } + +//---------------------------------------------------------------------------- +uint32_t sbeSecurityListBinDump( uint8_t *i_pArg ) +{ + #define SBE_FUNC "sbeSecurityListBinDump" + SBE_ENTER(SBE_FUNC); + uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL; + uint32_t fapiRc = FAPI2_RC_SUCCESS; + + do + { + uint64_t dumpAddr = 0; + rc = sbeReadPsu2SbeMbxReg(SBE_HOST_PSU_MBOX_REG1, + (sizeof(dumpAddr)/sizeof(uint64_t)), + &dumpAddr, true); + + if(SBE_SEC_OPERATION_SUCCESSFUL != rc) + { + SBE_ERROR(SBE_FUNC" Failed to extract SBE_HOST_PSU_MBOX_REG1"); + break; + } + + SBE_INFO(SBE_FUNC "Security Dump Addr [0x%08X][%08X]", + SBE::higher32BWord(dumpAddr), + SBE::lower32BWord(dumpAddr)); + + //////////////////////////////////////////////////////// + // Do your processing here with dumpAddr + //////////////////////////////////////////////////////// + + }while(0); + + // Send the response + sbePSUSendResponse(SBE_GLOBAL->sbeSbe2PsuRespHdr, fapiRc, rc); + + SBE_EXIT(SBE_FUNC); + return rc; + #undef SBE_FUNC +} + #endif //__SBEFW_SEEPROM__ #ifndef __SBEFW_SEEPROM__ diff --git a/src/sbefw/app/common/sbecmdgeneric.H b/src/sbefw/app/common/sbecmdgeneric.H index 633a6bad..cdbcf108 100644 --- a/src/sbefw/app/common/sbecmdgeneric.H +++ b/src/sbefw/app/common/sbecmdgeneric.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -196,3 +196,12 @@ uint32_t sbeReadMem(uint8_t *i_pArg); * @return Rc from the Psu access utility */ uint32_t sbePsuGetCapabilities(uint8_t *i_pArg); + +/** + * @brief SBE Psu Send Security List Binary Dump (0xD708) + * + * @param[in] i_pArg Buffer to be passed to the function (not used as of now) + * + * @return Rc from the Psu access utility + */ +uint32_t sbeSecurityListBinDump(uint8_t *i_pArg); diff --git a/src/sbefw/app/power/chipop_table.C b/src/sbefw/app/power/chipop_table.C index c0f28da5..3cba24e8 100644 --- a/src/sbefw/app/power/chipop_table.C +++ b/src/sbefw/app/power/chipop_table.C @@ -323,6 +323,11 @@ CMD_ARR( {sbeStashKeyAddrPair, SBE_PSU_GENERIC_MSG_STASH_MPIPL_CONFIG, SBE_NO_FENCE, + }, + + {sbeSecurityListBinDump, + SBE_PSU_GENERIC_MSG_SECURITY_LIST_BIN_DUMP, + SBE_NO_FENCE, } ) diff --git a/src/sbefw/app/power/sbecmdgeneric.C b/src/sbefw/app/power/sbecmdgeneric.C index 0879ba29..c91ceec4 100644 --- a/src/sbefw/app/power/sbecmdgeneric.C +++ b/src/sbefw/app/power/sbecmdgeneric.C @@ -88,7 +88,8 @@ void updatePsuCapabilities(uint32_t * capability) PSU_SET_FFDC_ADDRESS_SUPPORTED | PSU_QUISCE_SUPPORTED | PSU_SET_SYSTEM_FABRIC_ID_MAP_SUPPORTED | - PSU_STASH_MPIPL_CONFIG_SUPPORTED; + PSU_STASH_MPIPL_CONFIG_SUPPORTED | + PSU_SECURITY_LIST_BIN_DUMP_SUPPORTED; capability[PSU_GENERIC_CHIPOP_CAPABILITY_START_IDX+1] = PSU_RESERVED_7; diff --git a/src/sbefw/core/sbe_host_intf.H b/src/sbefw/core/sbe_host_intf.H index 64ad2e0a..c4fde6e6 100644 --- a/src/sbefw/core/sbe_host_intf.H +++ b/src/sbefw/core/sbe_host_intf.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -102,6 +102,7 @@ enum sbePsuGenericMessages SBE_PSU_GENERIC_MSG_QUIESCE = 0x05, SBE_PSU_GENERIC_MSG_SYSTEM_FABRIC_MAP = 0x06, SBE_PSU_GENERIC_MSG_STASH_MPIPL_CONFIG = 0x07, + SBE_PSU_GENERIC_MSG_SECURITY_LIST_BIN_DUMP = 0x08, SBE_PSU_GENERIC_MSG_UNKNOWN = 0xFF, }; @@ -194,6 +195,7 @@ enum PSU_CAPABILITIES PSU_QUISCE_SUPPORTED = 0xD7000010, PSU_SET_SYSTEM_FABRIC_ID_MAP_SUPPORTED = 0xD7000020, PSU_STASH_MPIPL_CONFIG_SUPPORTED = 0xD7000040, + PSU_SECURITY_LIST_BIN_DUMP_SUPPORTED = 0xD7000080, PSU_RESERVED_7 = 0xD7800000, }; -- cgit v1.2.1