summaryrefslogtreecommitdiffstats
path: root/src/include/bootloader/bootloader.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/bootloader/bootloader.H')
-rw-r--r--src/include/bootloader/bootloader.H68
1 files changed, 61 insertions, 7 deletions
diff --git a/src/include/bootloader/bootloader.H b/src/include/bootloader/bootloader.H
index 89b4bd761..65b715c09 100644
--- a/src/include/bootloader/bootloader.H
+++ b/src/include/bootloader/bootloader.H
@@ -33,15 +33,17 @@
*/
#include <builtins.h>
-#include <arch/ppc.H>
+#include <pnor_const.H>
+#include <pnor_utils.H>
+#include <common/ffs_hb.H>
extern "C" void task_end_stub();
+extern "C" void enterHBB(uint64_t i_hbb_hrmor, uint64_t i_hbb_offset);
#define assert(expr) \
{\
if (unlikely(!(expr)))\
{\
- MAGIC_INSTRUCTION(MAGIC_BREAK); /* @TODO RTC:133821 temp bringup */ \
task_end_stub();\
}\
}
@@ -49,6 +51,14 @@ extern "C" void task_end_stub();
#define printk(format...)
namespace Bootloader{
+ /**
+ * @brief Pointer to bootloader scratch space
+ *
+ * Pointer to location in main storage which bootloader uses as
+ * scratch space
+ */
+ extern uint8_t *g_blScratchSpace;
+
/** @enum MMIOLoadStoreSizes
* @brief List of MMIO Load and Store Sizes.
*
@@ -81,13 +91,57 @@ namespace Bootloader{
uint32_t i_size,
MMIOLoadStoreSizes i_ld_st_size);
- /**
- * @brief Pointer to bootloader scratch space
+ /** @enum HbbLengths
+ * @brief List of HBB lengths.
*
- * Pointer to location in main storage which bootloader uses as
- * scratch space
+ * These are the lengths of the Hostboot Base data or instructions
+ * with and without ECC.
*/
- extern uint8_t *g_blScratchSpace;
+ enum HbbLengths
+ {
+ /** LENGTH_WO_ECC */
+ LENGTH_WO_ECC = 8,
+ /** LENGTH_W_ECC */
+ LENGTH_W_ECC = 9
+ };
+
+ /** @enum HbAddrs
+ * @brief List of addresses where HBB and HBBL code is stored.
+ *
+ * These specify locations where the Hostboot Bootloader code is
+ * stored and where it stores the Hostboot Base code. The HBB code
+ * is copied to various locations as the HBBL works with it. Then
+ * HBB is copied to its running location and its execution is started.
+ */
+ enum HbAddrs
+ {
+ // @TODO-RTC:138273-Support multiple nodes using relative HRMOR
+
+ /** HRMOR */
+ HBBL_HRMOR = 130*MEGABYTE,
+ HBB_HRMOR = 128*MEGABYTE,
+
+ /** Location of working copy of HBB with ECC */
+ HBB_ECC_WORKING_ADDR = (HBBL_HRMOR + 1*MEGABYTE),
+
+ /** Location of HBBL */
+ HBBL_ADDR = HBBL_HRMOR,
+ /** Location of HBBL exception vectors */
+ HBBL_EXCEPTION_VECTORS_ADDR = HBBL_ADDR,
+ /** Location of HBBL code */
+ HBBL_CODE_ADDR = HBBL_ADDR + 12*KILOBYTE,
+ /** Location of HBBL scratch space */
+ HBBL_SCRATCH_SPACE_ADDR = HBBL_ADDR + 64*KILOBYTE,
+
+ /** Location of working copy of HBB without ECC */
+ HBB_WORKING_ADDR = (HBBL_HRMOR - 1*MEGABYTE),
+ /** Location of running copy of HBB */
+ HBB_RUNNING_ADDR = (HBBL_HRMOR - 2*MEGABYTE),
+ /** Offset for starting running copy of HBB */
+ HBB_RUNNING_OFFSET = 0,
+ /** Mask to indicate HRMOR should be ignored for the address */
+ IGNORE_HRMOR_MASK = 0x8000000000000000ul
+ };
} // end namespace Bootloader
#endif
OpenPOWER on IntegriCloud