diff options
-rw-r--r-- | src/include/usr/errl/errlentry.H | 11 | ||||
-rw-r--r-- | src/usr/errl/errlentry.C | 12 | ||||
-rw-r--r-- | src/usr/fapi2/plat_hw_access.C | 7 |
3 files changed, 19 insertions, 11 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index f8e0a32e8..2837d61ac 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -585,13 +585,16 @@ public: /** * @brief Return the list of User Detail sections * - * @param[in] i_compId Component id associated with the sections to return + * @param[in] i_compId Component id associated with the data to return + * @param[in] i_subSect Subsection id associated with the data to return * - * NOTE: You can pass COMP_ID 0 into this function for wildcard + * //NOTE: You can pass COMP_ID or subsect 0 into this + * function for wildcard * - * @return vector of user details sections of specific component id + * @return vector of void pointers that point to the data buffer inside + * of a user details section */ - std::vector<ErrlUD*> getUDSections(compId_t i_compId); + std::vector<void*> getUDSections(compId_t i_compId, uint8_t i_subSect); private: diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 2cc64faf1..20d6782f1 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -1658,16 +1658,20 @@ uint64_t ErrlEntry::unflatten( const void * i_buffer, uint64_t i_len ) } //@brief Return the list of User Detail sections -//NOTE: You can pass COMP_ID 0 into this function for wildcard -std::vector<ErrlUD*> ErrlEntry::getUDSections(compId_t i_compId) +//NOTE: You can pass COMP_ID or subsect 0 into this function for wildcard +std::vector<void*> ErrlEntry::getUDSections(compId_t i_compId, + uint8_t i_subSect) { - std::vector<ErrlUD*> copy_vector; + std::vector<void *> copy_vector; for(auto const & section : iv_SectionVector) { if((section->compId() == i_compId) || (i_compId == 0)) { - copy_vector.push_back(section); + if((section->subSect() == i_subSect) || (i_subSect == 0)) + { + copy_vector.push_back(section->iv_pData); + } } } diff --git a/src/usr/fapi2/plat_hw_access.C b/src/usr/fapi2/plat_hw_access.C index d59d07446..2a58e3eba 100644 --- a/src/usr/fapi2/plat_hw_access.C +++ b/src/usr/fapi2/plat_hw_access.C @@ -342,10 +342,11 @@ errlHndl_t verifyCfamAccessTarget(const TARGETING::Target* i_target, void checkPibMask(errlHndl_t& io_errLog ) { //Delete the error if the mask matches the pib err - for(auto section : io_errLog->getUDSections(SCOM_COMP_ID)) + for(auto data : io_errLog->getUDSections(SCOM_COMP_ID, SCOM::SCOM_UDT_PIB)) { - if((section->subSect() == SCOM::SCOM_UDT_PIB) && - (reinterpret_cast<SCOM::UdPibInfo *>(section)->iv_pib_err == pib_err_mask)) + //We get the raw data from the userdetails section, which in this + //case is the pib_err itself so just check it. + if(*reinterpret_cast<uint8_t *>(data) == pib_err_mask) { FAPI_ERR( "Ignoring error %.8X due to pib_err_mask=%.1X", io_errLog->plid(), pib_err_mask ); delete io_errLog; |