diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-03-30 01:30:31 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-03-30 01:30:31 +0000 |
commit | 021e78a7e200225eb720f6c1265ad51f5580bd2d (patch) | |
tree | 38b70fc517f60de021008da25fedd15012b991fe /sys/arch/arm | |
parent | 63af837583a7321c0739669bc8beb923ac1e6433 (diff) |
Add a function to read the ARM MPCore base address. This let's us
dynamically determine where e.g. the interrupt controller is.
ok bmercer@
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/arm/cpufunc_asm_armv7.S | 9 | ||||
-rw-r--r-- | sys/arch/arm/include/cpufunc.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/cpufunc_asm_armv7.S b/sys/arch/arm/arm/cpufunc_asm_armv7.S index 808bf49889e..54a0b67be57 100644 --- a/sys/arch/arm/arm/cpufunc_asm_armv7.S +++ b/sys/arch/arm/arm/cpufunc_asm_armv7.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc_asm_armv7.S,v 1.5 2013/03/27 00:20:00 patrick Exp $ */ +/* $OpenBSD: cpufunc_asm_armv7.S,v 1.6 2013/03/30 01:30:30 patrick Exp $ */ /* * Copyright (c) 2008 Dale Rahn <drahn@openbsd.org> * @@ -32,6 +32,13 @@ ENTRY(armv7_drain_writebuf) mov pc, lr /* + * Function to read the MPCore base address + */ +ENTRY(armv7_periphbase) + mrc p15, 4, r0, c15, c0, 0 + mov pc, lr + +/* * Functions to set the MMU Translation Table Base register */ ENTRY(armv7_setttb) diff --git a/sys/arch/arm/include/cpufunc.h b/sys/arch/arm/include/cpufunc.h index ca558d1d560..d76f3de5786 100644 --- a/sys/arch/arm/include/cpufunc.h +++ b/sys/arch/arm/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.13 2013/03/30 00:57:47 patrick Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.14 2013/03/30 01:30:30 patrick Exp $ */ /* $NetBSD: cpufunc.h,v 1.29 2003/09/06 09:08:35 rearnsha Exp $ */ /* @@ -382,6 +382,8 @@ void armv7_tlb_flushD_SE (u_int va); void armv7_drain_writebuf (void); void armv7_cpu_sleep (int mode); +u_int armv7_periphbase (void); + void armv7_icache_sync_all (void); void armv7_icache_sync_range (vaddr_t, vsize_t); |