Date: Sun, 9 Feb 2014 15:54:31 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261663 - in head/sys/arm: arm include Message-ID: <201402091554.s19FsVOL094831@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sun Feb 9 15:54:31 2014 New Revision: 261663 URL: http://svnweb.freebsd.org/changeset/base/261663 Log: Pass the pagetable used from locore.S to initarm to allow it to map data in as required. Modified: head/sys/arm/arm/locore.S head/sys/arm/include/cpu.h Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Feb 9 15:48:49 2014 (r261662) +++ head/sys/arm/arm/locore.S Sun Feb 9 15:54:31 2014 (r261663) @@ -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 */ Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Sun Feb 9 15:48:49 2014 (r261662) +++ head/sys/arm/include/cpu.h Sun Feb 9 15:54:31 2014 (r261663) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402091554.s19FsVOL094831>