From 2319283cdb7317249a07e8732b8d8b8fb971acf5 Mon Sep 17 00:00:00 2001 From: Mike Larkin Date: Sun, 12 Apr 2015 18:37:55 +0000 Subject: 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@ --- sys/arch/i386/include/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/include/cpu.h') diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index 36aec9df34f..516bbe1f3ca 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.137 2014/12/16 21:40:05 tedu Exp $ */ +/* $OpenBSD: cpu.h,v 1.138 2015/04/12 18:37:54 mlarkin Exp $ */ /* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */ /*- @@ -458,6 +458,7 @@ void mp_setperf_init(void); void vm86_gpfault(struct proc *, int); #endif /* VM86 */ +int cpu_paenable(void *); #endif /* _KERNEL */ /* -- cgit v1.2.3