summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2016-05-23 20:07:17 +0000
committerian <ian@FreeBSD.org>2016-05-23 20:07:17 +0000
commit2308d1c5003857c02e42a778c3c84078ae6d547a (patch)
tree443834c682bc53cb79fa21a83c790c5cfb515862 /sys/arm/at91
parent8e70fac078394cfbca0599afd2bd5cda07a8ad51 (diff)
downloadFreeBSD-src-2308d1c5003857c02e42a778c3c84078ae6d547a.zip
FreeBSD-src-2308d1c5003857c02e42a778c3c84078ae6d547a.tar.gz
Use the new(-ish) CP15_SCTLR macro to generate system control reg accesses
where possible. In the places that doesn't work (multi-line inline asm, and places where the old armv4 cpufuncs mechanism is used), annotate the accesses with a comment that includes SCTLR. Now a grep -i sctlr can find all the system control register manipulations. No functional changes.
Diffstat (limited to 'sys/arm/at91')
-rw-r--r--sys/arm/at91/at91_machdep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arm/at91/at91_machdep.c b/sys/arm/at91/at91_machdep.c
index 6be7f72..ede1df7 100644
--- a/sys/arm/at91/at91_machdep.c
+++ b/sys/arm/at91/at91_machdep.c
@@ -584,6 +584,10 @@ initarm(struct arm_boot_params *abp)
memsize = 16 * 1024 * 1024;
}
+ /* Enable MMU (set SCTLR), and do other cpu-specific setup. */
+ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
+ cpu_setup();
+
/*
* Pages were allocated during the secondary bootstrap for the
* stacks for different CPU modes.
@@ -592,9 +596,6 @@ initarm(struct arm_boot_params *abp)
* Since the ARM stacks use STMFD etc. we must set r13 to the top end
* of the stack memory.
*/
- cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
- cpu_setup();
-
set_stackptrs(0);
/*
OpenPOWER on IntegriCloud