summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-12-16 10:22:49 +0000
committerkato <kato@FreeBSD.org>1997-12-16 10:22:49 +0000
commitfd72a030d7976edbd61ad2bf4c38d5e4b1f7d4b7 (patch)
treeac0f0161db4b154396a7a10072bf4c4effbb6ae6 /sys
parent1d90974832ccb738d2741f998b37cc89e4fa3ecb (diff)
downloadFreeBSD-src-fd72a030d7976edbd61ad2bf4c38d5e4b1f7d4b7.zip
FreeBSD-src-fd72a030d7976edbd61ad2bf4c38d5e4b1f7d4b7.tar.gz
Don't use PG_N if EPSON PC-486HX/HG/HA (PC-9801 compatible) are
detected. These machine cannot make L2 cache write-through by PG_N, and only I/O access (undocumented) can do that. If PG_N is used, system hangs. Reviewed by: tos@fa2.so-net.or.jp (Toshiyuki Kawashima)
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/i386/machdep.c22
-rw-r--r--sys/pc98/pc98/machdep.c22
2 files changed, 42 insertions, 2 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index b062524..0e473ec 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.64 1997/12/05 11:48:51 kato Exp $
+ * $Id: machdep.c,v 1.65 1997/12/14 12:31:44 kato Exp $
*/
#include "apm.h"
@@ -120,6 +120,7 @@
#include <i386/isa/intr_machdep.h>
#ifdef PC98
#include <pc98/pc98/pc98_machdep.h>
+#include <pc98/pc98/pc98.h>
#else
#include <i386/isa/rtc.h>
#endif
@@ -1426,7 +1427,26 @@ init386(first)
/*
* map page into kernel: valid, read/write, non-cacheable
*/
+#ifdef PC98
+ if (pc98_machine_type & M_EPSON_PC98) {
+ switch (epson_machine_id) {
+ case 0x34: /* PC-486HX */
+ case 0x35: /* PC-486HG */
+ case 0x3B: /* PC-486HA */
+ *(int *)CMAP1 = PG_V | PG_RW | target_page;
+ break;
+ default:
+#ifdef WB_CACHE
+ *(int *)CMAP1 = PG_V | PG_RW target_page;
+#else
+ *(int *)CMAP1 = PG_V | PG_RW | PG_N | target_page;
+#endif
+ break;
+ }
+ }
+#else /* !PC98 */
*(int *)CMAP1 = PG_V | PG_RW | PG_N | target_page;
+#endif
invltlb();
tmp = *(int *)CADDR1;
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index b062524..0e473ec 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.64 1997/12/05 11:48:51 kato Exp $
+ * $Id: machdep.c,v 1.65 1997/12/14 12:31:44 kato Exp $
*/
#include "apm.h"
@@ -120,6 +120,7 @@
#include <i386/isa/intr_machdep.h>
#ifdef PC98
#include <pc98/pc98/pc98_machdep.h>
+#include <pc98/pc98/pc98.h>
#else
#include <i386/isa/rtc.h>
#endif
@@ -1426,7 +1427,26 @@ init386(first)
/*
* map page into kernel: valid, read/write, non-cacheable
*/
+#ifdef PC98
+ if (pc98_machine_type & M_EPSON_PC98) {
+ switch (epson_machine_id) {
+ case 0x34: /* PC-486HX */
+ case 0x35: /* PC-486HG */
+ case 0x3B: /* PC-486HA */
+ *(int *)CMAP1 = PG_V | PG_RW | target_page;
+ break;
+ default:
+#ifdef WB_CACHE
+ *(int *)CMAP1 = PG_V | PG_RW target_page;
+#else
+ *(int *)CMAP1 = PG_V | PG_RW | PG_N | target_page;
+#endif
+ break;
+ }
+ }
+#else /* !PC98 */
*(int *)CMAP1 = PG_V | PG_RW | PG_N | target_page;
+#endif
invltlb();
tmp = *(int *)CADDR1;
OpenPOWER on IntegriCloud