Pass the pagetable used from locore.S to initarm to allow it to map data

in as required.
This commit is contained in:
Andrew Turner 2014-02-09 15:54:31 +00:00
parent 73ab448c43
commit b2478843a9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261663
2 changed files with 9 additions and 1 deletions

View File

@ -221,7 +221,7 @@ mmu_done:
ldr pc, .Lvirt_done
virt_done:
mov r1, #24 /* loader info size is 24 bytes also second arg */
mov r1, #28 /* loader info size is 28 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 */
@ -232,6 +232,8 @@ virt_done:
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 */
ldr r5, Lstartup_pagetable
str r5, [r0, #24] /* store the pagetable address */
mov fp, #0 /* trace back starts here */
bl _C_LABEL(initarm) /* Off we go */

View File

@ -35,6 +35,11 @@ get_cyclecount(void)
extern vm_offset_t vector_page;
/*
* Params passed into initarm. If you change the size of this you will
* need to update locore.S to allocate more memory on the stack before
* it calls initarm.
*/
struct arm_boot_params {
register_t abp_size; /* Size of this structure */
register_t abp_r0; /* r0 from the boot loader */
@ -42,6 +47,7 @@ struct arm_boot_params {
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 */
vm_offset_t abp_pagetable; /* The early page table */
};
void arm_vector_init(vm_offset_t, int);