From 8276d53e4b8da7a52949ef99bb84e5b878adaaac Mon Sep 17 00:00:00 2001 From: Ryan Harkin Date: Mon, 3 Feb 2014 14:10:17 +0000 Subject: [PATCH] juno: BL1: default to building bypass rom Juno has a "taped out" BL1. To run your own BL1 on the board, you have to place it in a "ROM bypass" address and configure the platform to boot from there. The agreed bypass address is an offset of 0x03EC0000 from the start of NOR flash (0x08000000), which equates to 0x0BEC0000. To run the model using a BL1 in bypass mode, you should use a parameter set something like this: /FVP_CSS_Juno3 \ -C css.aon.scp.ROMloader.fname= \ --data css.cluster1.cpu0=bl1.bin@0x0BEC0000 \ -C soc.scc.apps_alt_boot=0x0BEC0000 To build BL1 as a ROM located at address zero, you can over-ride the default value for TZROM_BASE by passing parameters to make, eg: ASFLAGS="-D TZROM_BASE=0x00000000" \ CFLAGS="-D TZROM_BASE=0x00000000" \ CROSS_COMPILE=aarch64-linux-gnu- \ make PLAT=juno DEBUG=1 all Then you can launch the model using a command such as: /FVP_CSS_Juno3 \ -C css.aon.scp.ROMloader.fname= \ -C css.trustedBootROMloader.fname=/bl1.bin \ Signed-off-by: Ryan Harkin --- plat/juno/platform.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plat/juno/platform.h b/plat/juno/platform.h index e6f8a4179..1b902ea5f 100644 --- a/plat/juno/platform.h +++ b/plat/juno/platform.h @@ -77,8 +77,6 @@ /******************************************************************************* * Platform memory map related constants ******************************************************************************/ -#define TZROM_BASE 0x00000000 -#define TZROM_SIZE 0x00010000 #define MHU_SECURE_BASE 0x04000000 #define MHU_SECURE_SIZE 0x00001000 @@ -94,6 +92,13 @@ #define FLASH_BASE 0x08000000 #define FLASH_SIZE 0x04000000 +#define BL1_ROM_BYPASS_OFFSET 0x03EC0000 // agreed BYPASS offset from start of NOR flash + +#ifndef TZROM_BASE +#define TZROM_BASE FLASH_BASE + BL1_ROM_BYPASS_OFFSET // Use the agreed BYPASS address +#endif +#define TZROM_SIZE 0x00010000 + #define EMMC_BASE 0x0c000000 #define EMMC_SIZE 0x04000000 -- GitLab