summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/boot/loader_l1.S6
-rw-r--r--src/boot/loader_l2.c4
-rw-r--r--src/build/utils/sbe_link.H11
3 files changed, 20 insertions, 1 deletions
diff --git a/src/boot/loader_l1.S b/src/boot/loader_l1.S
index eb35478f..92259e3c 100644
--- a/src/boot/loader_l1.S
+++ b/src/boot/loader_l1.S
@@ -51,6 +51,12 @@ __system_reset:
__l1Loader:
+ # Update 50009 ( sbe status register) to show sbe in seeprom loader
+ _liw %r5, 0x50009
+ _liw %r0, SBE_CODE_SEEPROM_START_MSG
+ li r1, 0x00
+ stvd d0, 0(r5)
+
bl _pibmemRepair
_liw %r3, SBE_LOADER_BASE_SECTION # Base Loader Section Location
_liw %r4, SBE_LOADER_BASE_ORIGIN # dest
diff --git a/src/boot/loader_l2.c b/src/boot/loader_l2.c
index ec497c68..003a2af6 100644
--- a/src/boot/loader_l2.c
+++ b/src/boot/loader_l2.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -43,6 +43,8 @@ int32_t loadSection( P9XipSection * i_section, uint64_t *i_destAddr )
int32_t l2_loader()
{
int32_t rc = 0;
+ uint64_t loadValue = (uint64_t)(SBE_CODE_PIBMEM_START_MSG)<<32;
+ PPE_STVD(0x50009, loadValue);
P9XipHeader *hdr = getXipHdr();
uint64_t *pibMemAddr = (uint64_t *)g_pibMemAddr;
diff --git a/src/build/utils/sbe_link.H b/src/build/utils/sbe_link.H
index a4394aa6..d839d010 100644
--- a/src/build/utils/sbe_link.H
+++ b/src/build/utils/sbe_link.H
@@ -103,5 +103,16 @@
/// Sbe fixed sction for the pibmem repair
#define SBE_FIXED_SECTION (SBE_SEEPROM_BASE_ORIGIN + SBE_XIP_TOC_OFFSET + 12)
+// Macros to use in assembly code in OTPROM/SEEPROM
+// This will be updated in last two bits of messaging register.
+// This will help in debugging sbe boot failures
+//
+// Code reached to OTPROM
+#define SBE_CODE_OTPROM_START_MSG 0x01
+// Code reached to SEEPROM loader
+#define SBE_CODE_SEEPROM_START_MSG 0x02
+// Code reached to PIBMEM Loader ( pibmem c loader )
+#define SBE_CODE_PIBMEM_START_MSG 0x03
+
#endif // __SBE_LINK_H
OpenPOWER on IntegriCloud