From d75a32eaa8312aa7f057a73479f74747b73e54f2 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 24 Feb 2015 10:41:02 -0600 Subject: Clear out VPD caches when booting with a golden image Change-Id: Ie371e855dc53655ac0d9d3f10119a2253cfab77d RTC: 124570 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15964 Tested-by: Jenkins Server Reviewed-by: PRACHI GUPTA Reviewed-by: Corey V. Swenson Reviewed-by: A. Patrick Williams III --- src/usr/hwpf/hwp/start_payload/start_payload.C | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/usr/hwpf') diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C index 7d28ae0b0..0428000ac 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.C +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -87,6 +87,8 @@ #include #include #include +#include + // Uncomment these files as they become available: // #include "host_start_payload/host_start_payload.H" @@ -351,6 +353,30 @@ void* call_host_runtime_setup( void *io_pArgs ) // break from do loop if error occured break; } + +#ifdef CONFIG_PNOR_TWO_SIDE_SUPPORT + // We also need to wipe the cache out after booting from the + // golden side of pnor + PNOR::SideInfo_t l_pnorInfo; + l_err = PNOR::getSideInfo( PNOR::WORKING, l_pnorInfo ); + if( l_err ) + { + // commit the error but keep going + errlCommit(l_err, ISTEP_COMP_ID); + // force the caches to get wiped out just in case + l_pnorInfo.isGolden = true; + } + if( l_pnorInfo.isGolden ) + { + // Invalidate the VPD Caches for all targets + l_err = VPD::invalidateAllPnorCaches(true); + if (l_err) + { + break; + } + } +#endif + } else if( is_sapphire_load() ) { -- cgit v1.2.1