summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/hbotcompid.H8
-rw-r--r--src/include/usr/isteps/istep07list.H1
-rw-r--r--src/include/usr/secureboot/secure_reasoncodes.H3
-rw-r--r--src/include/usr/secureboot/smf.H66
-rw-r--r--src/include/usr/secureboot/smf_utils.H6
5 files changed, 83 insertions, 1 deletions
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 4db19e164..40739f2ba 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -459,6 +459,14 @@ const char EXPSCOM_COMP_NAME[] = "expscom";
//@{
const compId_t NVRAM_COMP_ID = 0x3900;
const char NVRAM_COMP_NAME[] = "nvram";
+
+/** @name SMF
+ * SMF Support component
+ */
+//@{
+const compId_t SMF_COMP_ID = 0x4000;
+const char SMF_COMP_NAME[] = "smf";
+
//@}
/** @name HDAT
diff --git a/src/include/usr/isteps/istep07list.H b/src/include/usr/isteps/istep07list.H
index e9c03b082..4b1feb1b6 100644
--- a/src/include/usr/isteps/istep07list.H
+++ b/src/include/usr/isteps/istep07list.H
@@ -170,6 +170,7 @@ const DepModInfo g_istep07Dependancies = {
#ifndef CONFIG_FSP_BUILD
DEP_LIB(libnvram.so),
#endif
+ DEP_LIB(libsmf.so),
NULL
}
};
diff --git a/src/include/usr/secureboot/secure_reasoncodes.H b/src/include/usr/secureboot/secure_reasoncodes.H
index 7188b4e4f..acd3b0c5d 100644
--- a/src/include/usr/secureboot/secure_reasoncodes.H
+++ b/src/include/usr/secureboot/secure_reasoncodes.H
@@ -51,6 +51,7 @@ namespace SECUREBOOT
MOD_LOCK_ABUS_SEC_MAILBOXES = 0x11,
MOD_SECURE_LOG_PLAT_SECURITY_CONFIG = 0x12,
MOD_CHECK_RISK_LEVEL_FOR_SMF = 0x13,
+ MOD_SMF_SPLIT_SMF_MEM = 0x14,
// Use 0x20-0x2F range for Node Communications
MOD_NCDD_CHECK_FOR_ERRORS = 0x20,
@@ -91,6 +92,8 @@ namespace SECUREBOOT
RC_LOCK_MAILBOXES_FAILED = SECURE_COMP_ID | 0x14,
RC_SECURE_LOG_PLAT_SECURITY_CONFIG = SECURE_COMP_ID | 0x15,
RC_RISK_LEVEL_TOO_LOW = SECURE_COMP_ID | 0x16,
+ RC_COULD_NOT_ALLOCATE_SMF_MEM = SECURE_COMP_ID | 0x17,
+ RC_ALLOCATED_NE_REQUESTED = SECURE_COMP_ID | 0x18,
// Use 0x20-0x2F range for Node Communications
RC_NCDD_HW_ERROR_FOUND = SECURE_COMP_ID | 0x20,
diff --git a/src/include/usr/secureboot/smf.H b/src/include/usr/secureboot/smf.H
new file mode 100644
index 000000000..c77688585
--- /dev/null
+++ b/src/include/usr/secureboot/smf.H
@@ -0,0 +1,66 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/secureboot/smf.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __SMF_H
+#define __SMF_H
+
+#include <errl/errlentry.H>
+#include <stdint.h>
+
+namespace SMF_TRACE
+{
+ extern trace_desc_t* g_trac_smf;
+}
+
+namespace SECUREBOOT
+{
+namespace SMF
+{
+
+/**
+ * @brief A function that destributes the requested amount of secure
+ * memory between the functional procs with memory on the system.
+ * The memory is distributed in power-of-two chunks of 256MB
+ * until either all memory is distributed or there are no procs
+ * remaining with memory available. The function returns predictive
+ * or informational errors in the following cases: there is no
+ * available memory behind the procs on the system (predictive error),
+ * the exact amount of secure mem allocated did not match the requested
+ * amount (informational error). If 0 is passed in to the function, no
+ * attempt at distribution occurs and the SMF mode is turned off.
+ *
+ * @param[in] i_requestedSmfMemAmtInBytes the amount of secure memory to be
+ * distributed (in bytes)
+ * among the procs on the system
+ *
+ * @return nullptr: the memory was successfully distributed as requested
+ * non-nullptr: a distribution error occurred (this error is never
+ * unrecoverable)
+ */
+errlHndl_t distributeSmfMem(uint64_t i_requestedSmfMemAmtInBytes);
+
+} // namespace SMF
+} // namespace SECUREBOOT
+
+#endif
diff --git a/src/include/usr/secureboot/smf_utils.H b/src/include/usr/secureboot/smf_utils.H
index 554f8affe..4c059eb08 100644
--- a/src/include/usr/secureboot/smf_utils.H
+++ b/src/include/usr/secureboot/smf_utils.H
@@ -35,9 +35,13 @@ namespace SMF
{
// HW limitations dictate that SMF memory needs to be a power-of-two
-// multiple of 256MB starting with 256MB.
+// multiple of 256MB starting with 256MB (amount in bytes).
extern const uint64_t MIN_SMF_MEMORY_AMT;
+// The minimum amount of memory, in bytes, required for hostboot to run on
+// master proc.
+extern const uint64_t MIN_MEM_RESERVED_FOR_HB;
+
/**
* @brief Checks whether SMF mode is enabled on the system
*
OpenPOWER on IntegriCloud