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 Avoid overlap between BP and last A...



details:   https://anonhg.NetBSD.org/src/rev/23e3a8521efa
branches:  trunk
changeset: 460383:23e3a8521efa
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Oct 20 12:25:43 2019 +0000

description:
Avoid overlap between BP and last AP stack. AP stacks are now in order of
increasing address order.

Spotted by and idea from mlelstv.

diffstat:

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

diffs (38 lines):

diff -r 7a390d09367f -r 23e3a8521efa sys/arch/aarch64/aarch64/locore.S
--- a/sys/arch/aarch64/aarch64/locore.S Sun Oct 20 11:17:41 2019 +0000
+++ b/sys/arch/aarch64/aarch64/locore.S Sun Oct 20 12:25:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.42 2019/10/19 18:04:26 jmcneill Exp $     */
+/*     $NetBSD: locore.S,v 1.43 2019/10/20 12:25:43 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.42 2019/10/19 18:04:26 jmcneill Exp $")
+RCSID("$NetBSD: locore.S,v 1.43 2019/10/20 12:25:43 skrll Exp $")
 
 
 /*#define DEBUG_LOCORE                 /* debug print */
@@ -379,9 +379,8 @@
        /* set stack pointer for boot */
        mov     x1, #BOOT_AP_STACKSIZE
        mul     x1, x1, x27
-       ADDR    x0, bootstk_cpus
-       sub     sp, x0, x1  /* sp = bootstk_cpus-(BOOT_AP_STACKSIZE*cpuindex) */
-
+       ADDR    x0, bootstk
+       add     sp, x0, x1  /* sp = bootstk + (BOOT_AP_STACKSIZE * cpuindex) */
 
        bl      1f
 1:     CPU_DPRINTREG("PC               = ", lr)
@@ -1038,7 +1037,6 @@
 
 #ifdef MULTIPROCESSOR
        .space  BOOT_AP_STACKSIZE * (MAXCPUS - 1)
-bootstk_cpus:
 #endif
 
        .section ".init_pagetable", "aw", %nobits



Home | Main Index | Thread Index | Old Index