diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2014-11-11 17:09:31 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2014-11-11 17:09:31 +0000 |
commit | 20be9a802275f29414bf88bbe972b1944dcf3f58 (patch) | |
tree | e224408dfc2036ba891ac7243759bb17881e3f67 /sys/arch/amd64 | |
parent | 606d076523f39174965873c279fcb8ab823e070e (diff) |
Local APIC page doesn't need X permissions.
ok deraadt, guenther
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/lapic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index af97d65ba1a..4b293fb9514 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lapic.c,v 1.33 2014/09/21 16:14:52 sf Exp $ */ +/* $OpenBSD: lapic.c,v 1.34 2014/11/11 17:09:30 mlarkin Exp $ */ /* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */ /*- @@ -95,6 +95,7 @@ lapic_map(paddr_t lapic_base) int s; pt_entry_t *pte; vaddr_t va = (vaddr_t)&local_apic; + pt_entry_t pg_nx = (cpu_feature & CPUID_NXE? PG_NX : 0); disable_intr(); s = lapic_tpr; @@ -109,7 +110,7 @@ lapic_map(paddr_t lapic_base) */ pte = kvtopte(va); - *pte = lapic_base | PG_RW | PG_V | PG_N | PG_G; + *pte = lapic_base | PG_RW | PG_V | PG_N | PG_G | pg_nx; invlpg(va); #ifdef MULTIPROCESSOR |