diff options
author | raj <raj@FreeBSD.org> | 2008-04-26 17:47:28 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2008-04-26 17:47:28 +0000 |
commit | a681868ea5dbad90ea028a90173c94ddb1059477 (patch) | |
tree | 36feaa767c4375b80d7765bb9e44f8e36bdaef88 /sys/powerpc/include/cpufunc.h | |
parent | 08c272026d9b7b1389020a5077bd757317f6d1da (diff) | |
download | FreeBSD-src-a681868ea5dbad90ea028a90173c94ddb1059477.zip FreeBSD-src-a681868ea5dbad90ea028a90173c94ddb1059477.tar.gz |
Improve handling of Local Access Windows on MPC85xx systems:
- detect number of LAWs in run time and initalize accordingly
- introduce decode windows target IDs used in MPC8572
- other minor updates
Obtained from: Freescale, Semihalf
Diffstat (limited to 'sys/powerpc/include/cpufunc.h')
-rw-r--r-- | sys/powerpc/include/cpufunc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index f02ff3b..3eb0ac0 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -44,6 +44,7 @@ powerpc_mb(void) #include <sys/types.h> #include <machine/psl.h> +#include <machine/spr.h> struct thread; @@ -122,6 +123,16 @@ mfpvr(void) return (value); } +static __inline register_t +mfsvr(void) +{ + register_t value; + + __asm __volatile ("mfspr %0, %1" : "=r"(value) : "K"(SPR_SVR)); + + return (value); +} + static __inline void eieio(void) { |