Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/xscale Oops, make sure to add in the physical b...
details: https://anonhg.NetBSD.org/src/rev/16b84e83d039
branches: trunk
changeset: 518354:16b84e83d039
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Nov 28 21:08:47 2001 +0000
description:
Oops, make sure to add in the physical base of the PCI memory
window when mapping PCI mem space. (Whee, I can take out my
local hack, now).
diffstat:
sys/arch/arm/xscale/i80312_space.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r d64ccbd93354 -r 16b84e83d039 sys/arch/arm/xscale/i80312_space.c
--- a/sys/arch/arm/xscale/i80312_space.c Wed Nov 28 20:56:47 2001 +0000
+++ b/sys/arch/arm/xscale/i80312_space.c Wed Nov 28 21:08:47 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i80312_space.c,v 1.1 2001/11/09 03:27:51 thorpej Exp $ */
+/* $NetBSD: i80312_space.c,v 1.2 2001/11/28 21:08:47 thorpej Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -46,6 +46,7 @@
#include <machine/bus.h>
+#include <arm/xscale/i80312reg.h>
#include <arm/xscale/i80312var.h>
/* Prototypes for all the bus_space structure functions */
@@ -284,16 +285,18 @@
struct i80312_softc *sc = t;
vaddr_t va;
uint32_t busbase, bussize;
- paddr_t pa, endpa;
+ paddr_t pa, endpa, physbase;
if (bpa >= sc->sc_pmemout_base &&
bpa < (sc->sc_pmemout_base + sc->sc_pmemout_size)) {
busbase = sc->sc_pmemout_base;
bussize = sc->sc_pmemout_size;
+ physbase = I80312_PCI_XLATE_PMW_BASE;
} else if (bpa >= sc->sc_smemout_base &&
bpa < (sc->sc_smemout_base + sc->sc_smemout_size)) {
busbase = sc->sc_smemout_base;
bussize = sc->sc_smemout_size;
+ physbase = I80312_PCI_XLATE_SMW_BASE;
} else
return (EINVAL);
@@ -305,8 +308,8 @@
* some kernel VA space and mapping the pages with pmap_enter().
* pmap_enter() will map unmanaged pages as non-cacheable.
*/
- pa = trunc_page(bpa - busbase);
- endpa = round_page((bpa - busbase) + size);
+ pa = trunc_page((bpa - busbase) + physbase);
+ endpa = round_page(((bpa - busbase) + physbase) + size);
va = uvm_km_valloc(kernel_map, endpa - pa);
if (va == 0)
Home |
Main Index |
Thread Index |
Old Index