warm-reboot: ensure sbe start bit is 0
Cold reboots assume the SBE start bit (P9_CBS_REG, bit 0) will start out
with a value of 0. When the chassis power is cycled, this is a valid
assumption. However, when doing a warm reboot (chassis power remains on)
this is not a valid assumption.
The SBE depends on seeing the 0->1 transition of this bit to know when
to start the host. To support warm reboots, ensure the bit starts at 0.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Iba80ee030ab6f7e7468e4a86cc00668f20f2348e
diff --git a/procedures/p9/start_host.cpp b/procedures/p9/start_host.cpp
index 5e11b8b..2625888 100644
--- a/procedures/p9/start_host.cpp
+++ b/procedures/p9/start_host.cpp
@@ -83,6 +83,9 @@
// 0 -> Side 0, 1 -> Side 1
writeRegWithMask(master, P9_SBE_CTRL_STATUS, sbeSide, 0x00004000);
+ // Ensure SBE start bit is 0 to handle warm reboot scenarios
+ writeRegWithMask(master, P9_CBS_CS, 0x00000000, 0x80000000);
+
// Start the SBE
writeRegWithMask(master, P9_CBS_CS, 0x80000000, 0x80000000);
}