Commit e214725f authored by Andrew Morton's avatar Andrew Morton Committed by Len Brown

[PATCH] Work around an AMD768MPX erratum

From: Andi Kleen <ak@suse.de>

This patch has been in the SuSE 2.4 kernel forever, but for some reason
never made it mainline.

It works around the infamous "only works stable when a mouse is plugged in"
problem some AMD 768MPX Dual Athlon chipsets have.  The problem happens
because the chipset can hang when PCI prefetch strides from a RAM page into
the VGA text buffer.  When a PS2 mouse is plugged in the BIOS reserves a
page before the VGA text buffer, which stops the prefetch early.

This patch always reserves this page when the chipset could be AMD768MPX.
This can be only done early in bootmem setup.  Because it's difficult to
scan the PCI bus that early it just always reserves this page when the CPU
is an Athlon.  Normally it should not make a difference because the BIOS
will have reserved that page anyways when a PS/2 mouse is plugged in.
parent 00cf7097
...@@ -832,6 +832,13 @@ static unsigned long __init setup_memory(void) ...@@ -832,6 +832,13 @@ static unsigned long __init setup_memory(void)
*/ */
reserve_bootmem(0, PAGE_SIZE); reserve_bootmem(0, PAGE_SIZE);
/* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent
PCI prefetch into it (errata #56). Usually the page is reserved anyways,
unless you have no PS/2 mouse plugged in. */
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
boot_cpu_data.x86 == 6)
reserve_bootmem(0xa0000 - 4096, 4096);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* /*
* But first pinch a few for the stack/trampoline stuff * But first pinch a few for the stack/trampoline stuff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment