summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include/m88410.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-08-20 20:33:48 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-08-20 20:33:48 +0000
commitf138a3c2b90181b36f0db8eca31f53a18852e4b6 (patch)
tree8cb346fd5a55c6a4ae49bcb1851c68ea3e9c3308 /sys/arch/mvme88k/include/m88410.h
parent96825a80e039657851031397200acb9071d7f066 (diff)
A bunch of 88110 band-aid:
- the 88410 handling code is not working correctly. Check whether we are operating with 88410's, and only invoke these routines if necessary. - force serial mode execution in the PSR for the moment (hopefully only temporary) - disable branch prediction and data matching in the PSR, the 88110 errata is simply too scary about them. - a better pipeline flush after changing the ictl control register. These changes let 197LE (but not 197SP/DP) boot up to autoconf. Userland process do not work at the moment.
Diffstat (limited to 'sys/arch/mvme88k/include/m88410.h')
-rw-r--r--sys/arch/mvme88k/include/m88410.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/include/m88410.h b/sys/arch/mvme88k/include/m88410.h
index e497d60f5cf..3b99b15f6ac 100644
--- a/sys/arch/mvme88k/include/m88410.h
+++ b/sys/arch/mvme88k/include/m88410.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88410.h,v 1.5 2003/08/17 01:47:10 miod Exp $ */
+/* $OpenBSD: m88410.h,v 1.6 2003/08/20 20:33:44 miod Exp $ */
/*
* Copyright (c) 2001 Steve Murphree, Jr.
* All rights reserved.
@@ -52,7 +52,8 @@
#define XCC_INVAL_ALL "0x3"
#define XCC_ADDR 0xFF800000
-static __inline__ void mc88410_flush_page(vm_offset_t physaddr)
+static __inline__ void
+mc88410_flush_page(vm_offset_t physaddr)
{
vm_offset_t xccaddr = XCC_ADDR | (physaddr >> PGSHIFT);
m88k_psr_type psr;
@@ -89,7 +90,8 @@ static __inline__ void mc88410_flush_page(vm_offset_t physaddr)
bs->bs_romcr = bs_romcr;
}
-static __inline__ void mc88410_flush(void)
+static __inline__ void
+mc88410_flush(void)
{
m88k_psr_type psr;
struct bussw_reg *bs = (struct bussw_reg *)BS_BASE;
@@ -125,7 +127,8 @@ static __inline__ void mc88410_flush(void)
bs->bs_romcr = bs_romcr;
}
-static __inline__ void mc88410_inval(void)
+static __inline__ void
+mc88410_inval(void)
{
m88k_psr_type psr;
struct bussw_reg *bs = (struct bussw_reg *)BS_BASE;
@@ -161,12 +164,21 @@ static __inline__ void mc88410_inval(void)
bs->bs_romcr = bs_romcr;
}
-static __inline__ void mc88410_sync(void)
+static __inline__ void
+mc88410_sync(void)
{
mc88410_flush();
mc88410_inval();
}
+static __inline__ int
+mc88410_present(void)
+{
+ struct bussw_reg *bs = (struct bussw_reg *)BS_BASE;
+
+ return (bs->bs_gcsr & BS_GCSR_B410);
+}
+
#endif /* _LOCORE */
#endif __MACHINE_M88410_H__