Pass the kernel physical address to initarm through the boot param struct.
This commit is contained in:
parent
f7a74e061b
commit
313857e9b7
@ -216,7 +216,7 @@ mmu_done:
|
||||
ldr pc, .Lvirt_done
|
||||
|
||||
virt_done:
|
||||
mov r1, #20 /* loader info size is 20 bytes also second arg */
|
||||
mov r1, #24 /* loader info size is 24 bytes also second arg */
|
||||
subs sp, sp, r1 /* allocate arm_boot_params struct on stack */
|
||||
bic sp, sp, #7 /* align stack to 8 bytes */
|
||||
mov r0, sp /* loader info pointer is first arg */
|
||||
@ -225,6 +225,8 @@ virt_done:
|
||||
str r8, [r0, #8] /* Store r1 from boot loader */
|
||||
str ip, [r0, #12] /* store r2 from boot loader */
|
||||
str fp, [r0, #16] /* store r3 from boot loader */
|
||||
ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */
|
||||
str r5, [r0, #20] /* store the physical address */
|
||||
mov fp, #0 /* trace back starts here */
|
||||
bl _C_LABEL(initarm) /* Off we go */
|
||||
|
||||
|
@ -41,6 +41,7 @@ struct arm_boot_params {
|
||||
register_t abp_r1; /* r1 from the boot loader */
|
||||
register_t abp_r2; /* r2 from the boot loader */
|
||||
register_t abp_r3; /* r3 from the boot loader */
|
||||
vm_offset_t abp_physaddr; /* The kernel physical address */
|
||||
};
|
||||
|
||||
void arm_vector_init(vm_offset_t, int);
|
||||
|
Loading…
Reference in New Issue
Block a user