summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/runtime/interface.h1
-rwxr-xr-xsrc/include/usr/hdat/hdat.H1
-rw-r--r--src/include/usr/runtime/preverifiedlidmgr.H9
-rw-r--r--src/include/usr/secureboot/smf.H3
-rw-r--r--src/usr/runtime/populate_hbruntime.C26
-rw-r--r--src/usr/runtime/preverifiedlidmgr.C7
6 files changed, 44 insertions, 3 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index bd04e7774..cd6d0e23a 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -160,6 +160,7 @@ enum MemoryError_t
#define HBRT_RSVD_MEM__DATA "ibm,hbrt-data"
#define HBRT_RSVD_MEM__ARCH_REG "ibm,arch-reg-data"
#define HBRT_RSVD_MEM__UNSEC_HOMER "ibm,unsecure-homer"
+#define HBRT_RSVD_MEM__UVBWLIST "ibm,uvbwlist"
/* Aligned reserved memory size for Opal */
#define HBRT_RSVD_MEM_OPAL_ALIGN 64*KILOBYTE
diff --git a/src/include/usr/hdat/hdat.H b/src/include/usr/hdat/hdat.H
index 01a196a41..8f49368d5 100755
--- a/src/include/usr/hdat/hdat.H
+++ b/src/include/usr/hdat/hdat.H
@@ -226,6 +226,7 @@ enum hdatMsVpdRhbAddrRangeType : uint8_t
RHB_TYPE_HOMER_OCC = 4,
RHB_TYPE_VERIFIED_PNOR = 5,
RHB_TYPE_UNSECURE_HOMER = 6,
+ RHB_TYPE_UVBWLIST = 7,
RHB_TYPE_INVALID = 0xFF
};
diff --git a/src/include/usr/runtime/preverifiedlidmgr.H b/src/include/usr/runtime/preverifiedlidmgr.H
index c5c335ce0..00cea7c3e 100644
--- a/src/include/usr/runtime/preverifiedlidmgr.H
+++ b/src/include/usr/runtime/preverifiedlidmgr.H
@@ -88,6 +88,15 @@ class PreVerifiedLidMgr
bool i_firstLid,
uint64_t& o_resvMemAddr);
+ /**
+ * @brief Returns the next available address in hostboot reserved memory.
+ * The underlying math depends on the payload kind.
+ *
+ * @param[in] i_size the desired size of the reserved region
+ * @return uint64_t next available reserved memory address
+ */
+ static uint64_t getNextResMemAddr(size_t i_size);
+
protected:
/**
diff --git a/src/include/usr/secureboot/smf.H b/src/include/usr/secureboot/smf.H
index e062e56c9..90f5b769d 100644
--- a/src/include/usr/secureboot/smf.H
+++ b/src/include/usr/secureboot/smf.H
@@ -31,7 +31,8 @@
// The maximum size of the unsecure HOMER region in reserved memory
#define MAX_UNSECURE_HOMER_SIZE (1 * PAGESIZE)
-
+// The size of the Ultravisor white/blacklist
+#define UVBWLIST_SIZE (32 * KILOBYTE)
namespace SMF_TRACE
{
extern trace_desc_t* g_trac_smf;
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index 764404804..371c3bee8 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -1697,7 +1697,6 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId, bool i_master_node)
}
}
- // Also add unsecure HOMER to the reserved mem if in SMF mode
if(SECUREBOOT::SMF::isSmfEnabled())
{
auto l_unsecureHomerSize = l_sys->
@@ -1729,6 +1728,31 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId, bool i_master_node)
{
break;
}
+
+ // Now get the UVBWLIST from the SBE
+ uint64_t l_uvbwlistAddr =
+ PreVerifiedLidMgr::getNextResMemAddr(UVBWLIST_SIZE);
+ assert(l_uvbwlistAddr,
+ "populate_HbRsvMem: Ultravisor XSCOM white/blacklist address is 0");
+ TRACFCOMP(g_trac_runtime,
+ "populate_HbRsvMem: Ultravisor XSCOM white/blacklist address = 0x%.16llX",
+ l_uvbwlistAddr);
+ l_elog =SBEIO::sendPsuSecurityListBinDumpRequest(l_uvbwlistAddr,
+ l_masterProc);
+ if(l_elog)
+ {
+ break;
+ }
+
+ l_elog = setNextHbRsvMemEntry(HDAT::RHB_TYPE_UVBWLIST,
+ i_nodeId,
+ l_uvbwlistAddr,
+ UVBWLIST_SIZE,
+ HBRT_RSVD_MEM__UVBWLIST);
+ if(l_elog)
+ {
+ break;
+ }
}
}
} while(0);
diff --git a/src/usr/runtime/preverifiedlidmgr.C b/src/usr/runtime/preverifiedlidmgr.C
index 95d122fee..7b6fe6e09 100644
--- a/src/usr/runtime/preverifiedlidmgr.C
+++ b/src/usr/runtime/preverifiedlidmgr.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017,2018 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -596,3 +596,8 @@ errlHndl_t PreVerifiedLidMgr::loadImage(const uint64_t i_imgAddr,
return l_errl;
}
+
+uint64_t PreVerifiedLidMgr::getNextResMemAddr(const size_t i_size)
+{
+ return Singleton<PreVerifiedLidMgr>::instance().getNextAddress(i_size);
+}
OpenPOWER on IntegriCloud