x86, cpa: make the kernel physical mapping initialization a two pass sequence
authorSuresh Siddha <suresh.b.siddha@intel.com>
Tue, 23 Sep 2008 21:00:38 +0000 (14:00 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 10 Oct 2008 17:29:13 +0000 (19:29 +0200)
commita2699e477b8e6b17d4da64916f766dd5a2576c9c
tree44d9c0840cec212070a94f4097442c7cc7957522
parent3a85e770aa77e4f1a4096275c97b64c10cd7323e
x86, cpa: make the kernel physical mapping initialization a two pass sequence

In the first pass, kernel physical mapping will be setup using large or
small pages but uses the same PTE attributes as that of the early
PTE attributes setup by early boot code in head_[32|64].S

After flushing TLB's, we go through the second pass, which setups the
direct mapped PTE's with the appropriate attributes (like NX, GLOBAL etc)
which are runtime detectable.

This two pass mechanism conforms to the TLB app note which says:

"Software should not write to a paging-structure entry in a way that would
 change, for any linear address, both the page size and either the page frame
 or attributes."

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: arjan@linux.intel.com
Cc: venkatesh.pallipadi@intel.com
Cc: jeremy@goop.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c