diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-01-26 11:43:48 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2012-01-26 11:49:09 +0000 |
commit | f8414cb5c8343bdacfee53ac9e255831aed882fe (patch) | |
tree | c5600f100013760b79170a2ec1824efc50837ab3 | |
parent | 9d5ba9bfbc1ad9b743b40fa4f40624437f46b287 (diff) |
arm_boot: support board IDs more than 16 bits wide
Support passing a board ID value to the kernel in r1
that is more than 16 bits wide. This is needed to pass
the '-1 == invalid' value for boards which only support
device tree booting.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
-rw-r--r-- | hw/arm_boot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/arm_boot.c b/hw/arm_boot.c index 35ca22ff47..5f163fda02 100644 --- a/hw/arm_boot.c +++ b/hw/arm_boot.c @@ -20,10 +20,10 @@ /* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */ static uint32_t bootloader[] = { 0xe3a00000, /* mov r0, #0 */ - 0xe3a01000, /* mov r1, #0x?? */ - 0xe3811c00, /* orr r1, r1, #0x??00 */ - 0xe59f2000, /* ldr r2, [pc, #0] */ - 0xe59ff000, /* ldr pc, [pc, #0] */ + 0xe59f1004, /* ldr r1, [pc, #4] */ + 0xe59f2004, /* ldr r2, [pc, #4] */ + 0xe59ff004, /* ldr pc, [pc, #4] */ + 0, /* Board ID */ 0, /* Address of kernel args. Set by integratorcp_init. */ 0 /* Kernel entry point. Set by integratorcp_init. */ }; @@ -301,8 +301,7 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info) } else { initrd_size = 0; } - bootloader[1] |= info->board_id & 0xff; - bootloader[2] |= (info->board_id >> 8) & 0xff; + bootloader[4] = info->board_id; bootloader[5] = info->loader_start + KERNEL_ARGS_ADDR; bootloader[6] = entry; for (n = 0; n < sizeof(bootloader) / 4; n++) { |