Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/arch/prep/prep Pull up revision 1.4 (requested by j...
details: https://anonhg.NetBSD.org/src/rev/6f1cd035ac9f
branches: netbsd-2-0
changeset: 564721:6f1cd035ac9f
user: he <he%NetBSD.org@localhost>
date: Thu Mar 17 00:02:03 2005 +0000
description:
Pull up revision 1.4 (requested by jkunz in ticket #1152):
Ensure that the OpenPIC register window is mapped during
the startup; only parts of the PCI memory space is mapped
already. Move initialization since it requires UVM.
diffstat:
sys/arch/prep/prep/ibm_7043_140.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 1f9f697f5a66 -r 6f1cd035ac9f sys/arch/prep/prep/ibm_7043_140.c
--- a/sys/arch/prep/prep/ibm_7043_140.c Thu Mar 17 00:01:36 2005 +0000
+++ b/sys/arch/prep/prep/ibm_7043_140.c Thu Mar 17 00:02:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ibm_7043_140.c,v 1.2 2003/07/15 02:54:52 lukem Exp $ */
+/* $NetBSD: ibm_7043_140.c,v 1.2.2.1 2005/03/17 00:02:03 he Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibm_7043_140.c,v 1.2 2003/07/15 02:54:52 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm_7043_140.c,v 1.2.2.1 2005/03/17 00:02:03 he Exp $");
#include "opt_openpic.h"
#if !defined(OPENPIC)
@@ -99,7 +99,21 @@
address = pci_conf_read(&pc, tag, 0x10);
if ((address & PCI_MAPREG_TYPE_MASK) == PCI_MAPREG_TYPE_MEM) {
address &= PCI_MAPREG_MEM_ADDR_MASK;
- baseaddr = (unsigned char *)(PREP_BUS_SPACE_MEM | address);
+ /*
+ * PReP PCI memory space is from 0xc0000000 to
+ * 0xffffffff but machdep.c maps only 0xc0000000 to
+ * 0xcfffffff of PCI memory space. So look if the
+ * address offset is bigger then 0xfffffff. If it is
+ * we are outside the already mapped region and we need
+ * to add an additional mapping for the OpenPIC.
+ * The OpenPIC register window is always 256kB.
+ */
+ if (address > 0xfffffff)
+ baseaddr = (unsigned char *) mapiodev(
+ PREP_BUS_SPACE_MEM | address, 0x40000);
+ else
+ baseaddr = (unsigned char *)
+ (PREP_BUS_SPACE_MEM | address);
}
}
#endif
Home |
Main Index |
Thread Index |
Old Index