summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>2008-06-11 18:49:51 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>2008-06-11 18:49:51 +0000
commit9d8f085596f968dd3bc919a11ae130b2381b52cb (patch)
tree92eabd6b64ff48af841999ef8fc6c36d9949f98f /sys
parent40309877cf0c532b70cd54efc25cf2f0809ebd17 (diff)
Fix GART enabling by using segment end address instead of total
physmem. This should be more correct than earlier code. Thank you to Markus Hennecke <markus-hennecke -at- markus-hennecke.de> for reminding me.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/machdep.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index b1ffd07b060..67bdcc09bd7 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.78 2008/06/10 02:55:39 weingart Exp $ */
+/* $OpenBSD: machdep.c,v 1.79 2008/06/11 18:49:50 weingart Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -310,12 +310,6 @@ cpu_startup(void)
printf("real mem = %lu (%luMB)\n", ptoa((psize_t)physmem),
ptoa((psize_t)physmem)/1024/1024);
- if (physmem >= atop(1ULL << 32)) {
- extern int amdgart_enable;
-
- amdgart_enable = 1;
- }
-
/*
* Find out how much space we need, allocate it,
* and then give everything true virtual addresses.
@@ -1325,6 +1319,10 @@ init_x86_64(paddr_t first_avail)
e1 = (1UL << 32) - 1;
if (s1 > e1)
continue;
+ } else if (bigmem && (e1 >= (1UL<<32))) {
+ extern int amdgart_enable;
+
+ amdgart_enable = 1;
}
/* Crop stuff into "640K hole" */