From owner-acpi-jp@jp.FreeBSD.org Sat May  4 18:37:15 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g449bFW57325;
	Sat, 4 May 2002 18:37:15 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g449bDf57320
	for <acpi-jp@jp.FreeBSD.org>; Sat, 4 May 2002 18:37:14 +0900 (JST)
	(envelope-from dwmalone@maths.tcd.ie)
Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP
          id <aa97524@salmon>; 4 May 2002 10:37:03 +0100 (BST)
To: Michael Smith <msmith@freebsd.org>
cc: acpi-jp@jp.FreeBSD.org, current@freebsd.org
In-reply-to: Your message of "Fri, 03 May 2002 23:08:31 PDT."
             <200205040608.g4468Vh00626@mass.dis.org> 
X-Request-Do: 
Date: Sat, 04 May 2002 10:37:00 +0100
From: David Malone <dwmalone@maths.tcd.ie>
Message-ID:  <200205041037.aa97524@salmon.maths.tcd.ie>
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020417
X-Sequence: acpi-jp 1610
Subject: [acpi-jp 1610] Re: Odd problem with MTRR and ACPI 
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: dwmalone@maths.tcd.ie

> Heh, finally someone that's actually trying to fix this. 8)

;-)

> The "right" thing is going to be to fix the MTRR code to preserve the 
> extra MTRR bits; I've tried a few times to get some documentation on what 
> these other bits mean without any luck.

The code I added to the MTRR stuff recently can almost do this using
a "unknown" mtrr type. I might also add an "immutable" type which
is set by default for unknown values and must be explicitly cleared
with memcontrol. That way people can change the unknown MTRR values
if they really want to, but won't end up doing it by accident.

> You'll need to hide these bits from the layers above and just hang on to 
> them.  Beyond that, I really don't have any great ideas unless/until you 
> can find out what the bits do.

I did find some AMD errata docs which hinted at a problem involving
4MB pages, MTRR and SMM. (Search for "MTRR SMM athlon ASEG" on
google and you should get the PDF - there are two pages describing
errata involving ASEG and TSEG. Does anyone know what ASEG and TSEG
are?) I tried using a kernel with DISABLE_PSE but the problem seemed
to persist. However, the docs do hint at there being a link between
SMM and MTRRs for the Athlon.

	David.
