svn commit: r261562 - in head/sys/arm: arm include
Andrew Turner
andrew at FreeBSD.org
Thu Feb 6 20:17:59 UTC 2014
Author: andrew
Date: Thu Feb 6 20:17:58 2014
New Revision: 261562
URL: http://svnweb.freebsd.org/changeset/base/261562
Log:
Pass the kernel physical address to initarm through the boot param struct.
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 Thu Feb 6 19:47:50 2014 (r261561)
+++ head/sys/arm/arm/locore.S Thu Feb 6 20:17:58 2014 (r261562)
@@ -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 */
Modified: head/sys/arm/include/cpu.h
==============================================================================
--- head/sys/arm/include/cpu.h Thu Feb 6 19:47:50 2014 (r261561)
+++ head/sys/arm/include/cpu.h Thu Feb 6 20:17:58 2014 (r261562)
@@ -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);
More information about the svn-src-all
mailing list