From 038392cae8c5a50b0098000566167fef68d047f5 Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Tue, 16 Jan 2018 14:15:36 -0600 Subject: Move closing all unsecure memory regions to 21.3 Current windows that are left open at end of IPL - SBE FFDC - CPU Controls SP ATTN area - 0-64MB for SP ATTN Change-Id: I887fc63bcc70f2351530741bd251db12732a5948 RTC:168745 Backport:release-fips910 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52045 Reviewed-by: Michael Baiocchi Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Tested-by: Jenkins OP Build CI Reviewed-by: Nicholas E. Bofferding Reviewed-by: Marshall J. Wilks Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- src/usr/sbeio/sbe_memRegionMgr.C | 7 +++++++ src/usr/sbeio/test/sbe_memregiontest.H | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/usr/sbeio') diff --git a/src/usr/sbeio/sbe_memRegionMgr.C b/src/usr/sbeio/sbe_memRegionMgr.C index 524c99fbe..a5692549d 100644 --- a/src/usr/sbeio/sbe_memRegionMgr.C +++ b/src/usr/sbeio/sbe_memRegionMgr.C @@ -600,6 +600,13 @@ errlHndl_t MemRegionMgr::closeAllUnsecureMemRegions() l_region.start_addr = itr->start_addr; l_region.size = itr->size; l_region.flags = SbePsu::SBE_MEM_REGION_CLOSE; + l_region.tgt = itr->tgt; + + // Trace out information of memory region to close + SBE_TRACF("closeAllUnsecureMemRegions: Closing Region - tgt=0x%.8X: start_addr=0x%.16llX, size=0x%.8X, flags=0x%.2X", + TARGETING::get_huid(l_region.tgt), + l_region.start_addr, l_region.size, + l_region.flags); errl = doUnsecureMemRegionOp(l_region); diff --git a/src/usr/sbeio/test/sbe_memregiontest.H b/src/usr/sbeio/test/sbe_memregiontest.H index 87cb4a040..f6d0ec634 100644 --- a/src/usr/sbeio/test/sbe_memregiontest.H +++ b/src/usr/sbeio/test/sbe_memregiontest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -77,6 +77,15 @@ class SbeMemRegionTest : public CxxTest::TestSuite do { + // Tell SBE to Close All Unsecure Memory Regions before tests + errl = SBEIO::closeAllUnsecureMemRegions(); + if (errl) + { + TS_FAIL("memRegionTest1: pre-test cleanup SBEIO::closeAllUnsecureMemRegions Failed: rc=0x%X, plid=0x%X", + ERRL_GETRC_SAFE(errl), ERRL_GETPLID_SAFE(errl)); + break; + } + // Loop Test: Open MAX+1 to force a fail for (size_t i = 1; i<=SBEIO_MAX_UNSECURE_MEMORY_REGIONS+1 ; i++) { -- cgit v1.2.1