Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/include/oea Add _LOCORE protection.
details: https://anonhg.NetBSD.org/src/rev/960e73dafcd1
branches: trunk
changeset: 544193:960e73dafcd1
user: matt <matt%NetBSD.org@localhost>
date: Fri Mar 14 06:21:19 2003 +0000
description:
Add _LOCORE protection.
diffstat:
sys/arch/powerpc/include/oea/bat.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (45 lines):
diff -r 64ab6f9de223 -r 960e73dafcd1 sys/arch/powerpc/include/oea/bat.h
--- a/sys/arch/powerpc/include/oea/bat.h Fri Mar 14 05:38:53 2003 +0000
+++ b/sys/arch/powerpc/include/oea/bat.h Fri Mar 14 06:21:19 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bat.h,v 1.4 2003/02/06 23:02:33 matt Exp $ */
+/* $NetBSD: bat.h,v 1.5 2003/03/14 06:21:19 matt Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -70,10 +70,12 @@
#ifndef _POWERPC_OEA_BAT_H_
#define _POWERPC_OEA_BAT_H_
+#ifndef _LOCORE
struct bat {
register_t batu;
register_t batl;
};
+#endif
/* Lower BAT bits (all but PowerPC 601): */
#define BAT_RPN (~0x1ffff) /* physical block start */
@@ -119,6 +121,9 @@
#define BAT_VA_MATCH_P(batu,va) \
(((~(((batu)&BAT_BL)<<15))&(va)&BAT_EPI)==((batu)&BAT_EPI))
+#define BAT_PA_MATCH_P(batu,batl,pa) \
+ (((~(((batu)&BAT_BL)<<15))&(pa)&BAT_RPN)==((batl)&BAT_RPN))
+
#define BAT_VALID_P(batu, msr) \
(((msr)&PSL_PR)?(((batu)&BAT_Vu)==BAT_Vu):(((batu)&BAT_Vs)==BAT_Vs))
@@ -178,10 +183,12 @@
((batl) & BAT601_V)
#ifdef _KERNEL
+#ifndef _LOCORE
void oea_batinit(paddr_t, ...);
void oea_iobat_add(paddr_t, register_t);
void oea_iobat_remove(paddr_t);
extern struct bat battable[];
#endif
+#endif
#endif /* _POWERPC_OEA_BAT_H_ */
Home |
Main Index |
Thread Index |
Old Index