summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-08-29 19:07:14 +0000
committermarcel <marcel@FreeBSD.org>2004-08-29 19:07:14 +0000
commita94ef50b1f6f66bca852efbd3ce9519b692869f2 (patch)
tree5bbce1bbcfe5569917c72b22dda724cc4184a1de /sys/alpha
parent1c315f997f89d1e7f0015b1baf81a114b55858c2 (diff)
downloadFreeBSD-src-a94ef50b1f6f66bca852efbd3ce9519b692869f2.zip
FreeBSD-src-a94ef50b1f6f66bca852efbd3ce9519b692869f2.tar.gz
In alpha_pci_alloc_resource(), when allocating a memory resource,
do not set the virtual address to the bus address when the bus doesn't have either of the PCI_RF_DENSE or PCI_RF_BWX flags set. The TGA driver uses the virtual address to access the registers, which on some machines can cause a memory management fault. Map the bus address as K0SEG virtual memory instead. Note that with some hardware combinations involving the TGA2 adapter this change merely results that the memory management fault is replaced by a machine check.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/pci/pcibus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/alpha/pci/pcibus.c b/sys/alpha/pci/pcibus.c
index a22acdc..a6102e4 100644
--- a/sys/alpha/pci/pcibus.c
+++ b/sys/alpha/pci/pcibus.c
@@ -262,7 +262,7 @@ alpha_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
else if (flags & PCI_RF_BWX)
va = ALPHAPCI_CVT_BWX(bus, rv->r_start);
else
- va = (void *) rv->r_start; /* maybe NULL? */
+ va = (void *)ALPHA_PHYS_TO_K0SEG(rv->r_start);
rman_set_virtual(rv, va);
break;
OpenPOWER on IntegriCloud