aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/agp
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2012-07-06 15:57:03 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2012-07-06 15:57:03 +0000
commite11379e9f8952aee002164011a4efb3e9329c049 (patch)
tree3681b4b4d816d821a41cd19f5ad9a6dec3285408 /sys/dev/agp
parentaaaf515fdec776359ebf58845780ba9a6713d39f (diff)
Notes
Diffstat (limited to 'sys/dev/agp')
-rw-r--r--sys/dev/agp/agp.c3
-rw-r--r--sys/dev/agp/agp_i810.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index ccd7f517fbc3..95642acd6c03 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_pageout.h>
#include <vm/pmap.h>
-#include <machine/md_var.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
@@ -234,7 +233,7 @@ agp_generic_attach(device_t dev)
* Work out an upper bound for agp memory allocation. This
* uses a heurisitc table from the Linux driver.
*/
- memsize = ptoa(Maxmem) >> 20;
+ memsize = ptoa(realmem) >> 20;
for (i = 0; i < agp_max_size; i++) {
if (memsize <= agp_max[i][0])
break;
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index c0f592ce97fb..54ddfdccbcb0 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -74,7 +74,6 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/resource.h>
-#include <machine/md_var.h>
#include <sys/rman.h>
MALLOC_DECLARE(M_AGP);
@@ -1439,7 +1438,7 @@ agp_i810_attach(device_t dev)
if (error)
return (error);
- if (ptoa((vm_paddr_t)Maxmem) >
+ if (ptoa((vm_paddr_t)realmem) >
(1ULL << sc->match->driver->busdma_addr_mask_sz) - 1) {
device_printf(dev, "agp_i810 does not support physical "
"memory above %ju.\n", (uintmax_t)(1ULL <<