LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: Support for i386 PATs
@ 2007-01-27 10:59 Mikael Pettersson
  2007-01-28  7:54 ` H. Peter Anvin
  0 siblings, 1 reply; 6+ messages in thread
From: Mikael Pettersson @ 2007-01-27 10:59 UTC (permalink / raw)
  To: linux-kernel, thomas

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

On Sat, 27 Jan 2007 10:20:18 +0100, Thomas Hellström wrote:
> Does anybody have a strong opinion against adding support for
> i386 Page Attribute Tables?
...
> Issues:
> 1) The _PAGE_BIT_PAT will be the same as _PAGE_PSE, and _PAGE_PROTNONE.
> As I understand it, _PAGE_PROTNONE is not used when the page is present, 
> so this might not be an issue.
> What about _PAGE_PSE?
> 
> 2) The PATs need to be setup for each processor just after system boot.
> Where is the best place to do this?

3) Many Intel processors, including at least most P6s and probably
also some P4s, have an erratum which effectively halves the number
of available PAT entries, forcing an OS to make the low 4 and upper
4 PAT entries identical.

I don't know if 4 PAT types suffice for the kinds of uses people
have in mind. But support for PAT would either have to restrict
itself to only 4 PAT types, or ensure that it is only enabled on
new enough processors where it actually works.

You will need to read all available Intel errata sheets (spec updates)
to determine which processors are affected and which are OK.

/Mikael

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Support for i386 PATs
@ 2007-01-27  9:20 Thomas Hellström
  2007-01-27  9:33 ` Avi Kivity
  2007-01-28 21:48 ` Dave Jones
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Hellström @ 2007-01-27  9:20 UTC (permalink / raw)
  To: Linux Kernel

Hi!

Does anybody have a strong opinion against adding support for
i386 Page Attribute Tables?

The main benefit would be that one can have write-combining memory
regions without setting up MTRRs. This will come in handy for a
device we're working with where the device driver needs to allocate the
display memory directly from system memory, and it may be difficult to fit
the mtrr alignment constraints.

Outline:
The PAT may be set up at boot time with fixed backwards-compatible
memory types for the different PAT entries + defines like the following:

#define _PAGE_PAT_WB   xxx
#define _PAGE_PAT_WT   xxx
#define _PAGE_PAT_UC0 xxx
#define _PAGE_PAT_UC1 xxx
#define _PAGE_PAT_WC   xxx

which can be used in parallel with the old _PAGE_PWT and _PAGE_PCD bits.

The idea is that new memory types, WC for example, will use the pat entries
7 downto 4, whereas 0-3 are left to boot setting to maintain backwards 
compatibility.

Issues:
1) The _PAGE_BIT_PAT will be the same as _PAGE_PSE, and _PAGE_PROTNONE.
As I understand it, _PAGE_PROTNONE is not used when the page is present, 
so this might not be an issue.
What about _PAGE_PSE?

2) The PATs need to be setup for each processor just after system boot.
Where is the best place to do this?

/Thomas Hellström



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-30 15:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-27 10:59 Support for i386 PATs Mikael Pettersson
2007-01-28  7:54 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2007-01-27  9:20 Thomas Hellström
2007-01-27  9:33 ` Avi Kivity
2007-01-28 21:48 ` Dave Jones
2007-01-30 15:50   ` Thomas Hellström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).