summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice
diff options
context:
space:
mode:
authorJoel Stanley <joel.stanley@au1.ibm.com>2018-02-27 13:44:14 +1030
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-07-10 12:24:08 -0400
commitb24deec9bad7834542ed0e03953789cb887f754d (patch)
tree34f0b6d300cab1ade216299d7d5a0ba30371f138 /src/usr/initservice
parentf27c103c8f1cb4cf3ec79e1816ed12ef643c26b1 (diff)
downloadtalos-hostboot-b24deec9bad7834542ed0e03953789cb887f754d.tar.gz
talos-hostboot-b24deec9bad7834542ed0e03953789cb887f754d.zip
bootconfig: Describe pnor boot flags
The reserved boot flag is now used by a BMC to signal to the host firmware that it supports the mbox protocol[1]. Currently this has no affect on Hostboot, but in the future it will be used by skiboot. In the future hostboot could chose to use the mbox protocol to read and write PNOR. [1] github.com/openbmc/mboxbridge/blob/master/Documentation/mbox_protocol.md Change-Id: I51bc7878eabc975954371ada838d0a348b12ef9d Signed-off-by: Joel Stanley <joel.stanley@au1.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60181 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/initservice')
-rw-r--r--src/usr/initservice/bootconfig/bootconfig_ast2400.C29
-rw-r--r--src/usr/initservice/bootconfig/bootconfig_ast2400.H17
2 files changed, 44 insertions, 2 deletions
diff --git a/src/usr/initservice/bootconfig/bootconfig_ast2400.C b/src/usr/initservice/bootconfig/bootconfig_ast2400.C
index d0d1a3e74..c7e0a3d8b 100644
--- a/src/usr/initservice/bootconfig/bootconfig_ast2400.C
+++ b/src/usr/initservice/bootconfig/bootconfig_ast2400.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -171,6 +171,31 @@ void AST2400BootConfig::configureBootOptions(uint8_t i_bootOptions )
errlCommit(errl,INITSVC_COMP_ID);
}
}
+};
+
+// configurePnorDriver()
+// ----------------------------------------------------------------------------
+void AST2400BootConfig::configurePnorDriver( uint8_t i_driver )
+{
+ switch (i_driver) {
+ case MBOX:
+ TRACFCOMP(g_bc_trace,
+ "configurePnorDriver() bmc supports mbox protocol");
+
+#ifndef CONFIG_PNORDD_IS_BMCMBOX
+ TRACFCOMP(g_bc_trace,
+ "configurePnorDriver() hb does not support mbox protocol");
+#else
+ TRACFCOMP(g_bc_trace,
+ "configurePnorDriver() using mbox driver");
+ break;
+#endif
+
+ case SFC:
+ TRACFCOMP(g_bc_trace,
+ "configurePnorDriver() using sfc driver");
+ break;
+ }
}
// ----------------------------------------------------------------------------
@@ -250,6 +275,8 @@ void AST2400BootConfig::processBootFlagsV1( uint8_t i_flags )
{
configureBootMode( i_flags & BOOT_MODE_FLAGS );
+ configurePnorDriver( i_flags & PNOR_DRIVER_FLAGS );
+
configureBootOptions( i_flags & BOOT_OPTIONS_FLAGS );
configureHbLogLevel( i_flags & LOG_LEVEL_FLAGS );
diff --git a/src/usr/initservice/bootconfig/bootconfig_ast2400.H b/src/usr/initservice/bootconfig/bootconfig_ast2400.H
index 203e65ec6..364e23ab9 100644
--- a/src/usr/initservice/bootconfig/bootconfig_ast2400.H
+++ b/src/usr/initservice/bootconfig/bootconfig_ast2400.H
@@ -75,7 +75,7 @@ class AST2400BootConfig : public BootConfig
enum bootFlagMask_t
{
LOG_LEVEL_FLAGS = 0x07,
- RESERVED_FLAGS = 0x08,
+ PNOR_DRIVER_FLAGS = 0x08,
BOOT_OPTIONS_FLAGS = 0x30,
BOOT_MODE_FLAGS = 0xC0,
};
@@ -88,6 +88,13 @@ class AST2400BootConfig : public BootConfig
ISTEP_MODE = 0x80,
};
+ // Masks to select pnor driver from config register
+ enum pnorDriver
+ {
+ SFC = 0x00,
+ MBOX = 0x08,
+ };
+
// Masks to test boot options flags from config register
enum bootOptionsFlags
{
@@ -180,6 +187,14 @@ public:
void configureBootMode( uint8_t i_mode );
/**
+ * @brief Process the pnor driver mode from the boot flags register.
+ *
+ * @param[i] i_driver - pnor driver as set in the boot flags reg.
+ *
+ */
+ void configurePnorDriver( uint8_t i_driver );
+
+ /**
* @brief Process boot options from boot flags register
*
* @param[i] i_options - requested boot options as set in the boot flags
OpenPOWER on IntegriCloud