From 7431db0afb8460fd6dbe821ecbf64d7217deac18 Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 4 Dec 2017 22:06:21 +0000 Subject: [PATCH] Sadly the firmware on SPARC T7 machines omits the executable bit on mappings that contain code, just like some sun4u machines. So add it for sun4v as well when entering the mappings into the kernel pmap. --- sys/arch/sparc64/sparc64/pmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 2275a42545d..345992aeb71 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.102 2017/12/03 10:55:50 mpi Exp $ */ +/* $OpenBSD: pmap.c,v 1.103 2017/12/04 22:06:21 kettenis Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -1090,9 +1090,7 @@ remap_data: BDPRINTF(PDB_BOOT1, ("Done inserting mesgbuf into pmap_kernel()\r\n")); BDPRINTF(PDB_BOOT1, ("Inserting PROM mappings into pmap_kernel()\r\n")); - data = 0; - if (CPU_ISSUN4U || CPU_ISSUN4US) - data = SUN4U_TLB_EXEC; + data = (CPU_ISSUN4V ? SUN4V_TLB_EXEC : SUN4U_TLB_EXEC); for (i = 0; i < prom_map_size; i++) { if (prom_map[i].vstart && ((prom_map[i].vstart>>32) == 0)) { for (j = 0; j < prom_map[i].vsize; j += NBPG) { -- 2.20.1