diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-08-19 15:47:28 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-08-19 15:47:28 +0000 |
commit | 20d4d3960fd77a633953635718c8be6cc08fa5ca (patch) | |
tree | e03a504c9d1c7c7e46a6f1ee9b9d236ce4e3a98c /sys/arch | |
parent | 03af3ffe0f2afd2c5f7648682f0a83c79306ad8c (diff) |
Mark device memory as execute-never to prevent a speculative instruction fetch
to access it.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm/arm/pmap7.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/pmap7.c b/sys/arch/arm/arm/pmap7.c index 5d765a2a0a0..51b68bf75a4 100644 --- a/sys/arch/arm/arm/pmap7.c +++ b/sys/arch/arm/arm/pmap7.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap7.c,v 1.40 2016/08/19 13:56:08 kettenis Exp $ */ +/* $OpenBSD: pmap7.c,v 1.41 2016/08/19 15:47:27 kettenis Exp $ */ /* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */ /* @@ -1421,7 +1421,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot) l2b->l2b_occupancy++; if (pa & PMAP_DEVICE) - cache_mode = L2_B; + cache_mode = L2_B | L2_V7_S_XN; else if (pa & PMAP_NOCACHE) cache_mode = L2_V7_S_TEX(1); |