]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
x86: agp_gart size checking for buggy device
authorYinghai Lu <yhlu.kernel.send@gmail.com>
Sun, 13 Apr 2008 08:11:41 +0000 (01:11 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 12 May 2008 19:28:10 +0000 (21:28 +0200)
commit1edc1ab3f68168ec6815e6d630f38948a6da005a
treef8ea99c5a917fcf2e8cf043755b665de4ebd49cf
parentaa134f1b09df6beaa4d031a50d5fda1f3cebce6c
x86: agp_gart size checking for buggy device

while looking at Rafael J. Wysocki's system boot log,

I found a funny printout:

Node 0: aperture @ de000000 size 32 MB
Aperture too small (32 MB)
AGP bridge at 00:04:00
Aperture from AGP @ de000000 size 4096 MB (APSIZE 0)
Aperture too small (0 MB)
Your BIOS doesn't leave a aperture memory hole
Please enable the IOMMU option in the BIOS setup
This costs you 64 MB of RAM
Mapping aperture over 65536 KB of RAM @ 4000000

...

agpgart: Detected AGP bridge 20
agpgart: Aperture pointing to RAM
agpgart: Aperture from AGP @ de000000 size 4096 MB
agpgart: Aperture too small (0 MB)
agpgart: No usable aperture found.
agpgart: Consider rebooting with iommu=memaper=2 to get a good aperture.

it means BIOS allocated the correct gart on the NB and AGP bridge, but
because a bug in the silicon (the agp bridge reports the wrong order,
it wants 4G instead) the kernel will reject that allocation.

Also, because the size is only 32MB, and we try to get another 64M for gart,
late fix_northbridge can not revert that change because it still reads
the wrong size from agp bridge.

So try to double check the order value from the agp bridge, before calling
aperture_valid().

[ mingo@elte.hu: 32-bit fix. ]

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/aperture_64.c
drivers/char/agp/amd64-agp.c