@@ -19,15 +19,23 @@ start:
/*
* bootloader params are in r0-r2
* See the kernel doc Documentation/arm/Booting
+ * r0 = 0
+ * r1 = machine type number
+ * r2 = physical address of the dtb
+ *
+ * As we have no need for r0's nor r1's value, then
+ * put the dtb in r0. This allows setup to be consistent
+ * with arm64.
*/
ldr sp, =stacktop
- push {r0-r3}
+ mov r0, r2
+ push {r0-r1}
/* set up vector table and mode stacks */
bl exceptions_init
/* complete setup */
- pop {r0-r3}
+ pop {r0-r1}
bl setup
/* run the test */
@@ -62,8 +62,7 @@ static void mem_init(phys_addr_t freemem_start)
mmu_enable_idmap();
}
-void setup(unsigned long arg __unused, unsigned long id __unused,
- const void *fdt)
+void setup(const void *fdt)
{
const char *bootargs;
u32 fdt_size;
Drop the unused arguments from setup(), passing only the fdt. This allows setup() to be more easily shared with arm64. Signed-off-by: Andrew Jones <drjones@redhat.com> --- arm/cstart.S | 12 ++++++++++-- lib/arm/setup.c | 3 +-- 2 files changed, 11 insertions(+), 4 deletions(-)