summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-03-18 11:20:12 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-03-18 11:20:12 +0000
commit47cc57cd9ac7419f42bd6f58e522c4c100be929b (patch)
tree1c5942088da633d5a72dafe4ffacb699148a18ab /sys/dev
parent1fa75b4f2bd2be043d18261e8016ca4908199c6e (diff)
gen6+ can do 40 bit addressing
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/agp_i810.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c
index 1f062d42778..dec2d8404a9 100644
--- a/sys/dev/pci/agp_i810.c
+++ b/sys/dev/pci/agp_i810.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_i810.c,v 1.72 2013/03/18 11:14:44 jsg Exp $ */
+/* $OpenBSD: agp_i810.c,v 1.73 2013/03/18 11:20:11 jsg Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -946,14 +946,19 @@ intagp_write_gtt(struct agp_i810_softc *isc, bus_size_t off, paddr_t v)
if (v != 0) {
pte = v | INTEL_ENABLED;
/* 965+ can do 36-bit addressing, add in the extra bits */
- if (isc->chiptype == CHIP_I965 ||
- isc->chiptype == CHIP_G4X ||
- isc->chiptype == CHIP_PINEVIEW ||
- isc->chiptype == CHIP_G33 ||
- isc->chiptype == CHIP_IRONLAKE ||
- isc->chiptype == CHIP_SANDYBRIDGE ||
- isc->chiptype == CHIP_IVYBRIDGE) {
+ switch (isc->chiptype) {
+ case CHIP_I965:
+ case CHIP_G4X:
+ case CHIP_PINEVIEW:
+ case CHIP_G33:
+ case CHIP_IRONLAKE:
pte |= (v & 0x0000000f00000000ULL) >> 28;
+ break;
+ /* gen6+ can do 40 bit addressing */
+ case CHIP_SANDYBRIDGE:
+ case CHIP_IVYBRIDGE:
+ pte |= (v & 0x000000ff00000000ULL) >> 28;
+ break;
}
}