Bring PAE code back to life, in a different form. This diff (via bluhm then
authormlarkin <mlarkin@openbsd.org>
Sun, 12 Apr 2015 18:37:53 +0000 (18:37 +0000)
committermlarkin <mlarkin@openbsd.org>
Sun, 12 Apr 2015 18:37:53 +0000 (18:37 +0000)
commit6646b5557aa4719d0ec5465a2164c8bdd2e0c1fb
treec60a47a880dffd8175c537e991add9ef02a4a7f1
parent558334c608c43ff8461d9039ddb7ba884ffcab1f
Bring PAE code back to life, in a different form. This diff (via bluhm then
to deraadt, then myself) brings the PAE pmap on i386 (not touched in any
significant way for years) closer to the current non-PAE pmap and allows
us to take a big next step toward better i386 W^X in the kernel (similar to
what we did a few months ago on amd64). Unlike the original PAE pmap, this
diff will not be supporting > 4GB physical memory on i386 - this effort is
specifically geared toward providing W^X (via NX) only.

There still seems to be a bug removing certain pmap entries when PAE is
enabled, so I'm leaving PAE mode disabled for the moment until we can
figure out what is going on, but with this diff in the tree hopefully
others can help.

The pmap functions now operate through function pointers, due to the need
to support both non-PAE and PAE forms. My unscientific testing showed
less than 0.3% (a third of a percent) slowdown with this approach during
a base build.

Discussed for months with guenther, kettenis, and deraadt.

ok kettenis@, deraadt@
18 files changed:
sys/arch/i386/conf/files.i386
sys/arch/i386/i386/autoconf.c
sys/arch/i386/i386/db_memrw.c
sys/arch/i386/i386/genassym.cf
sys/arch/i386/i386/hibernate_machdep.c
sys/arch/i386/i386/kgdb_machdep.c
sys/arch/i386/i386/kvm86.c
sys/arch/i386/i386/lapic.c
sys/arch/i386/i386/locore.s
sys/arch/i386/i386/machdep.c
sys/arch/i386/i386/mptramp.s
sys/arch/i386/i386/pmap.c
sys/arch/i386/i386/pmapae.c
sys/arch/i386/include/biosvar.h
sys/arch/i386/include/cpu.h
sys/arch/i386/include/pmap.h
sys/arch/i386/include/pte.h
sys/arch/i386/pci/piixpcib.c