diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-04-25 04:46:58 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-04-25 04:46:58 +0000 |
commit | 66a338fb429372b72da0bb5c2835a65eb6f185fb (patch) | |
tree | 0a83de6552b2fa4453d44a930702a90532c8cc71 /sys/arch/armv7 | |
parent | c36aea05d779fe4f37cec46e1419e28df4bf80c9 (diff) |
Switch most of the cp14/cp15 use in .S files over to using sysreg.h
Matched and changed by a script, verified to cause no binary change with
armv7, armish, and zaurus kernels.
ok patrick@
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r-- | sys/arch/armv7/armv7/armv7_start.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/armv7/armv7/armv7_start.S b/sys/arch/armv7/armv7/armv7_start.S index 6ec8ef6280c..f78598eb2ce 100644 --- a/sys/arch/armv7/armv7/armv7_start.S +++ b/sys/arch/armv7/armv7/armv7_start.S @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_start.S,v 1.5 2016/01/31 00:14:50 jsg Exp $ */ +/* $OpenBSD: armv7_start.S,v 1.6 2016/04/25 04:46:57 jsg Exp $ */ /* $NetBSD: lubbock_start.S,v 1.1 2003/06/18 10:51:15 bsh Exp $ */ /* @@ -31,6 +31,7 @@ */ #include <machine/asm.h> +#include <arm/sysreg.h> #include <arm/armreg.h> #include <arm/pte.h> @@ -50,7 +51,7 @@ sub pc, pc, #4 #define CPWAIT(tmp) \ - mrc p15, 0, tmp, c2, c0, 0 /* arbitrary read of CP15 */ ;\ + mrc CP15_TTBR0(tmp) /* arbitrary read of CP15 */ ;\ mov tmp, tmp /* wait for it to complete */ ;\ CPWAIT_BRANCH /* branch to next insn */ @@ -146,17 +147,17 @@ _C_LABEL(bootstrap_start): cmp r1, #0 bne 2b - mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ - mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ + mcr CP15_TTBR0(r0) /* Set TTB */ + mcr CP15_TLBIALL(r0) /* Flush TLB */ /* Set the Domain Access register. Very important! */ mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) - mcr p15, 0, r0, c3, c0, 0 + mcr CP15_DACR(r0) /* Enable MMU */ - mrc p15, 0, r0, c1, c0, 0 + mrc CP15_SCTLR(r0) orr r0, r0, #CPU_CONTROL_MMU_ENABLE - mcr p15, 0, r0, c1, c0, 0 + mcr CP15_SCTLR(r0) CPWAIT(r0) /* Restore U-Boot arguments */ |