From 67e37f11d2ff1dc9fb0d0198d99d8f073feefb02 Mon Sep 17 00:00:00 2001 From: Dean Sanner Date: Mon, 25 Sep 2017 21:48:35 -0500 Subject: [PATCH] Fix invalid pointer access in HBRT during PM Reset Change-Id: I2fbe6876ec01da128ebc7282dfc879eb67690f68 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46720 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Stephen M. Cprek Tested-by: Jenkins OP HW Reviewed-by: Nicholas E. Bofferding Reviewed-by: Daniel M. Crowell --- src/usr/util/utillidpnor.C | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/usr/util/utillidpnor.C b/src/usr/util/utillidpnor.C index 48381e0d767..109daa3dde0 100644 --- a/src/usr/util/utillidpnor.C +++ b/src/usr/util/utillidpnor.C @@ -158,7 +158,15 @@ bool UtilLidMgr::getLidPnorSectionInfo(uint32_t i_lidId, #endif #endif // @TODO CQ:SW400352 remove this check - if ((l_secId == PNOR::OCC) && PNOR::isSectionEmpty(l_secId)) + if ((l_secId == PNOR::OCC) +#ifndef __HOSTBOOT_RUNTIME + && PNOR::isSectionEmpty(l_secId) +#else + //use this check for HBRT due to secure lid load setting vaddr + //to zero -- which causes isSectionEmpty to segfault + && !o_lidPnorInfo.vaddr +#endif + ) { UTIL_FT("UtilLidMgr::getLidPnorSection PNOR section %s is empty get data from LID transfer", PNOR::SectionIdToString(l_secId)); @@ -170,4 +178,4 @@ bool UtilLidMgr::getLidPnorSectionInfo(uint32_t i_lidId, } while(0); return l_lidInPnor; -} \ No newline at end of file +}