Given no further use in C world of boot_phys_offset, drop it from the
argument list of start_xen() and do the necessary changes in the startup
code head.S (most notably modifying launch not to expect 2 arguments to
pass to C entry point).
Both on arm64 and arm32, phys offset (stored in x20 or r10 respectively)
is still needed, so that it can be used in e.g. create_table_entry,
therefore keep it on the list of common register usage.
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
bl zero_bss
PRINT("- Ready -\r\n")
/* Setup the arguments for start_xen and jump to C world */
- mov r0, r10 /* r0 := Physical offset */
- mov r1, r8 /* r1 := paddr(FDT) */
- mov_w r2, start_xen
+ mov r0, r8 /* r0 := paddr(FDT) */
+ mov_w r1, start_xen
b launch
ENDPROC(start)
secondary_switched:
PRINT("- Ready -\r\n")
/* Jump to C world */
- mov_w r2, start_secondary
+ mov_w r1, start_secondary
b launch
ENDPROC(init_secondary)
*
* Inputs:
* r0 : Argument 0 of the C function to call
- * r1 : Argument 1 of the C function to call
- * r2 : C entry point
+ * r1 : C entry point
*
* Clobbers r3
*/
sub sp, #CPUINFO_sizeof /* Make room for CPU save record */
/* Jump to C world */
- bx r2
+ bx r1
ENDPROC(launch)
/* Fail-stop */
bl zero_bss
PRINT("- Ready -\r\n")
/* Setup the arguments for start_xen and jump to C world */
- mov x0, x20 /* x0 := Physical offset */
- mov x1, x21 /* x1 := paddr(FDT) */
- ldr x2, =start_xen
+ mov x0, x21 /* x0 := paddr(FDT) */
+ ldr x1, =start_xen
b launch
END(real_start)
secondary_switched:
PRINT("- Ready -\r\n")
/* Jump to C world */
- ldr x2, =start_secondary
+ ldr x1, =start_secondary
b launch
END(init_secondary)
*
* Inputs:
* x0 : Argument 0 of the C function to call
- * x1 : Argument 1 of the C function to call
- * x2 : C entry point
+ * x1 : C entry point
*
* Clobbers x3
*/
mov sp, x3
/* Jump to C world */
- br x2
+ br x1
END(launch)
/* Fail-stop */
size_t __read_mostly dcache_line_bytes;
/* C entry point for boot CPU */
-void asmlinkage __init start_xen(unsigned long boot_phys_offset,
- unsigned long fdt_paddr)
+void asmlinkage __init start_xen(unsigned long fdt_paddr)
{
size_t fdt_size;
const char *cmdline;