* [Qemu-devel] [PATCH] arm_boot: support board IDs more than 16 bits wide
@ 2012-01-20 17:05 Peter Maydell
2012-01-20 18:29 ` Mark Langsdorf
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2012-01-20 17:05 UTC (permalink / raw)
To: Mark Langsdorf; +Cc: qemu-devel, patches
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>
---
This applies after the Calxeda patchset. Mark, I suggest you put it
in your patchset in the appropriate place.
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 8f73a29..01ca997 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. */
};
@@ -289,8 +289,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++) {
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] arm_boot: support board IDs more than 16 bits wide
2012-01-20 17:05 [Qemu-devel] [PATCH] arm_boot: support board IDs more than 16 bits wide Peter Maydell
@ 2012-01-20 18:29 ` Mark Langsdorf
0 siblings, 0 replies; 2+ messages in thread
From: Mark Langsdorf @ 2012-01-20 18:29 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel@nongnu.org, patches@linaro.org
On 01/20/2012 11:05 AM, Peter Maydell wrote:
> 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>
> ---
> This applies after the Calxeda patchset. Mark, I suggest you put it
> in your patchset in the appropriate place.
Thanks, very helpful.
I'm currently tracking down a bug in which linux/arch/arm/kernel/smp.c
scu_get_core_count() returns the value of the raw_readl of scu_base
+ SCU_CONFIG (0xfee00004) as the value of smpboot[0]. It seems to be
bypassing the a9mpcore.c code entirely. I'm not sure what's happening
there.
--Mark Langsdorf
Calxeda, Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-20 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 17:05 [Qemu-devel] [PATCH] arm_boot: support board IDs more than 16 bits wide Peter Maydell
2012-01-20 18:29 ` Mark Langsdorf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).