Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 Mark FDT as non-exec and create KVA...



details:   https://anonhg.NetBSD.org/src/rev/cf39d77ece36
branches:  trunk
changeset: 465947:cf39d77ece36
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Dec 08 10:37:19 2019 +0000

description:
Mark FDT as non-exec and create KVA=VA mapping of same size as identity
mapping, i.e. include BOOTPAGE_ALLOC_MAX

diffstat:

 sys/arch/aarch64/aarch64/locore.S |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 21a15ec126cb -r cf39d77ece36 sys/arch/aarch64/aarch64/locore.S
--- a/sys/arch/aarch64/aarch64/locore.S Sun Dec 08 10:35:53 2019 +0000
+++ b/sys/arch/aarch64/aarch64/locore.S Sun Dec 08 10:37:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.45 2019/11/22 05:21:19 mlelstv Exp $      */
+/*     $NetBSD: locore.S,v 1.46 2019/12/08 10:37:19 skrll Exp $        */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -38,7 +38,7 @@
 #include <aarch64/hypervisor.h>
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.45 2019/11/22 05:21:19 mlelstv Exp $")
+RCSID("$NetBSD: locore.S,v 1.46 2019/12/08 10:37:19 skrll Exp $")
 
 
 /*#define DEBUG_LOCORE                 /* debug print */
@@ -826,6 +826,7 @@
        adr     x6, bootpage_alloc              /* allocator */
        mov     x5, xzr                         /* flags = 0 */
        mov     x4, #LX_BLKPAG_ATTR_NORMAL_NC|LX_BLKPAG_AP_RW   /* attr */
+       orr     x4, x4, #LX_BLKPAG_UXN|LX_BLKPAG_PXN
        mov     x3, #L2_SIZE                    /* blocksize */
        mov     x2, #L2_SIZE                    /* size */
        mov     x1, x8                          /* pa */
@@ -844,6 +845,7 @@
        adr     x1, start                       /* pa = start */
        ADDR    x2, _end
        sub     x2, x2, x1                      /* size = _end - start */
+       add     x2, x2, #BOOTPAGE_ALLOC_MAX     /* for bootpage_alloc() */
        ldr     x0, =start                      /* va */
        bl      pmapboot_enter
        cbnz    x0, init_mmutable_error



Home | Main Index | Thread Index | Old Index