summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2015-12-17 16:18:46 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-03-03 22:03:29 -0500
commitbcafb757808072be63d2ec0c2e61bca63bcf866e (patch)
tree1a59ace2ec084b9f7e287cd59c051d626e107daf /src/include
parent97f5d0db8ff37ebfd16220b368aea5f5b2da0c10 (diff)
downloadtalos-hostboot-bcafb757808072be63d2ec0c2e61bca63bcf866e.tar.gz
talos-hostboot-bcafb757808072be63d2ec0c2e61bca63bcf866e.zip
Deliver bootloader to fsp and pnor
Minimal load application -- Create the main bootloader application that drives the load, verification, and relocation of the HBB image and that branches execution to the beginning of the HBB memory. Bootloader Stack Space -- Implement option of allocating stack space in main store apart from the bootloader image so as to not use up image space and to allow sufficient stack space. Deliver the HBBL (HostBoot BootLoader) image out to FIPS. Create an HBBL partition in the PNOR. Change-Id: I659f19428a8588c4b9bea13338efd46c70caaf43 RTC:137932 Depends-on:I740f6f8a707760756a261535e62e2d0a849324f8 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/809 Tested-by: Jenkins Server Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include')
-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