From 8d456d84c14ad406f97514c90abe23b8a83b2b4f Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sun, 20 Nov 2005 09:21:36 +0000 Subject: [PATCH] Fix page size values passed to arc_wired_enter_page() for NEC-R96 and Tyne. Detected by gxemul. (Wow, gxemul is also trying to emulate these machines!) --- sys/arch/arc/arc/c_nec_eisa.c | 7 ++++--- sys/arch/arc/arc/p_dti_tyne.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/arch/arc/arc/c_nec_eisa.c b/sys/arch/arc/arc/c_nec_eisa.c index 896c12a32f33..c7da3003c433 100644 --- a/sys/arch/arc/arc/c_nec_eisa.c +++ b/sys/arch/arc/arc/c_nec_eisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: c_nec_eisa.c,v 1.9 2005/11/05 09:50:50 tsutsui Exp $ */ +/* $NetBSD: c_nec_eisa.c,v 1.10 2005/11/20 09:21:36 tsutsui Exp $ */ /*- * Copyright (C) 2003 Izumi Tsutsui. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: c_nec_eisa.c,v 1.9 2005/11/05 09:50:50 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: c_nec_eisa.c,v 1.10 2005/11/20 09:21:36 tsutsui Exp $"); #include #include @@ -174,7 +174,8 @@ c_nec_eisa_init(void) RD94_S_LOCAL_IO_BASE); arc_wired_enter_page(RD94_V_EISA_IO, RD94_P_EISA_IO, RD94_S_EISA_IO); - arc_wired_enter_page(RD94_V_EISA_MEM, RD94_P_EISA_MEM, RD94_S_EISA_MEM); + arc_wired_enter_page(RD94_V_EISA_MEM, RD94_P_EISA_MEM, + MIPS3_PG_SIZE_MASK_TO_SIZE(MIPS3_PG_SIZE_16M)); /* * Initialize interrupt priority diff --git a/sys/arch/arc/arc/p_dti_tyne.c b/sys/arch/arc/arc/p_dti_tyne.c index 7d52032525d0..3df9d49ebd2b 100644 --- a/sys/arch/arc/arc/p_dti_tyne.c +++ b/sys/arch/arc/arc/p_dti_tyne.c @@ -1,4 +1,4 @@ -/* $NetBSD: p_dti_tyne.c,v 1.10 2005/11/05 09:50:50 tsutsui Exp $ */ +/* $NetBSD: p_dti_tyne.c,v 1.11 2005/11/20 09:21:36 tsutsui Exp $ */ /* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */ /* @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: p_dti_tyne.c,v 1.10 2005/11/05 09:50:50 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: p_dti_tyne.c,v 1.11 2005/11/20 09:21:36 tsutsui Exp $"); #include #include @@ -276,7 +276,8 @@ p_dti_tyne_init(void) /* * Initialize wired TLB for I/O space which is used on early stage */ - arc_wired_enter_page(TYNE_V_BOUNCE, TYNE_P_BOUNCE, TYNE_S_BOUNCE); + arc_wired_enter_page(TYNE_V_BOUNCE, TYNE_P_BOUNCE, + MIPS3_PG_SIZE_MASK_TO_SIZE(MIPS3_PG_SIZE_256K)); arc_wired_enter_page(TYNE_V_ISA_IO, TYNE_P_ISA_IO, TYNE_S_ISA_IO); arc_wired_enter_page(TYNE_V_ISA_MEM, TYNE_P_ISA_MEM, TYNE_S_ISA_MEM);