Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm Use the stack provided by armv6_start.S rather ...



details:   https://anonhg.NetBSD.org/src/rev/4716a605e08e
branches:  trunk
changeset: 1011737:4716a605e08e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Jul 08 10:17:59 2020 +0000

description:
Use the stack provided by armv6_start.S rather than svcstk.  This saves
some bss too.

diffstat:

 sys/arch/arm/arm/armv6_start.S |   4 +++-
 sys/arch/arm/arm32/genassym.cf |   8 ++++++--
 sys/arch/arm/arm32/locore.S    |  10 ++++++++--
 3 files changed, 17 insertions(+), 5 deletions(-)

diffs (92 lines):

diff -r 1f21c6853758 -r 4716a605e08e sys/arch/arm/arm/armv6_start.S
--- a/sys/arch/arm/arm/armv6_start.S    Wed Jul 08 10:04:20 2020 +0000
+++ b/sys/arch/arm/arm/armv6_start.S    Wed Jul 08 10:17:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: armv6_start.S,v 1.17 2020/07/03 06:15:27 skrll Exp $   */
+/*     $NetBSD: armv6_start.S,v 1.18 2020/07/08 10:17:59 skrll Exp $   */
 
 /*-
  * Copyright (c) 2012, 2017, 2018 The NetBSD Foundation, Inc.
@@ -230,6 +230,8 @@
         */
        .section "_init_memory", "aw", %nobits
        .p2align INIT_ARM_STACK_SHIFT
+       .global start_stacks_bottom
+       .global start_stacks_top
 start_stacks_bottom:
        .space  INIT_ARM_STACK_SIZE * MAXCPUS
 start_stacks_top:
diff -r 1f21c6853758 -r 4716a605e08e sys/arch/arm/arm32/genassym.cf
--- a/sys/arch/arm/arm32/genassym.cf    Wed Jul 08 10:04:20 2020 +0000
+++ b/sys/arch/arm/arm32/genassym.cf    Wed Jul 08 10:17:59 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.92 2020/07/08 10:04:20 skrll Exp $
+#      $NetBSD: genassym.cf,v 1.93 2020/07/08 10:18:00 skrll Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -31,7 +31,7 @@
 # SUCH DAMAGE.
 
 if defined(_KERNEL_OPT)
-include "opt_compat_netbsd.h"
+include "opt_arm_start.h"
 include "opt_execfmt.h"
 include "opt_multiprocessor.h"
 endif
@@ -73,6 +73,10 @@
 define __HAVE_FAST_SOFTINTS    1
 endif
 
+ifdef __HAVE_GENERIC_START
+define __HAVE_GENERIC_START    1
+endif
+
 ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
 define __HAVE_MM_MD_DIRECT_MAPPED_PHYS 1
 endif
diff -r 1f21c6853758 -r 4716a605e08e sys/arch/arm/arm32/locore.S
--- a/sys/arch/arm/arm32/locore.S       Wed Jul 08 10:04:20 2020 +0000
+++ b/sys/arch/arm/arm32/locore.S       Wed Jul 08 10:17:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.40 2019/07/14 09:29:21 skrll Exp $        */
+/*     $NetBSD: locore.S,v 1.41 2020/07/08 10:18:00 skrll Exp $        */
 
 /*
  * Copyright (C) 1994-1997 Mark Brinicombe
@@ -43,7 +43,7 @@
 /* What size should this really be ? It is only used by init_arm() */
 #define INIT_ARM_STACK_SIZE    2048
 
-       RCSID("$NetBSD: locore.S,v 1.40 2019/07/14 09:29:21 skrll Exp $")
+       RCSID("$NetBSD: locore.S,v 1.41 2020/07/08 10:18:00 skrll Exp $")
 
 /*
  * This is for kvm_mkdb, and should be the address of the beginning
@@ -121,13 +121,18 @@
 #else
        .word   _C_LABEL(cpu_info_store)
 #endif
+#if !defined(__HAVE_GENERIC_START)
        .word   svcstk_end
+#else
+       .word   start_stacks_top
+#endif
 
 .Lmainreturned:
        .asciz  "main() returned"
        .align  0
 ASEND(start)
 
+#if !defined(__HAVE_GENERIC_START)
        .bss
 #ifdef __ARM_EABI__
        .align  3
@@ -135,6 +140,7 @@
 svcstk:
        .space  INIT_ARM_STACK_SIZE
 svcstk_end:
+#endif
 
        .text
        .align  0



Home | Main Index | Thread Index | Old Index