Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Move the aarch64 start stub from sys/arch/evbarm to...



details:   https://anonhg.NetBSD.org/src/rev/63310e6bbc9e
branches:  trunk
changeset: 835866:63310e6bbc9e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Sep 14 09:06:12 2018 +0000

description:
Move the aarch64 start stub from sys/arch/evbarm to sys/arch/aarch64.

Delete the unused/empty evbarm/fdt/genassym.cf while I'm here.

diffstat:

 sys/arch/aarch64/aarch64/start.S  |  80 +++++++++++++++++++++++++++++++++++++++
 sys/arch/evbarm/conf/mk.generic64 |   8 +--
 sys/arch/evbarm/fdt/fdt_start.S   |  80 ---------------------------------------
 3 files changed, 83 insertions(+), 85 deletions(-)

diffs (191 lines):

diff -r 1fe9019964b3 -r 63310e6bbc9e sys/arch/aarch64/aarch64/start.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/aarch64/aarch64/start.S  Fri Sep 14 09:06:12 2018 +0000
@@ -0,0 +1,80 @@
+/*     $NetBSD: start.S,v 1.1 2018/09/14 09:06:12 skrll Exp $  */
+
+/*
+ * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "opt_arm_debug.h"     /* VERBOSE_INIT_ARM */
+
+#include <sys/cdefs.h>
+
+#include <aarch64/asm.h>
+
+RCSID("$NetBSD: start.S,v 1.1 2018/09/14 09:06:12 skrll Exp $")
+
+/* load far effective address (pc relative) */
+.macro ADDR, reg, addr
+       adrp    \reg, \addr
+       add     \reg, \reg, #:lo12:\addr
+.endm
+
+/*
+ * Kernel start routine for aarch64 boards.
+ */
+       .global start
+start:
+       adr     x9, start
+       ldr     x10, =start
+
+       sub     x10, x10, x9
+
+       /* address of kern_vtopdiff (relative) */
+       ADDR    x8, kern_vtopdiff
+       str     x10, [x8]       /* kern_vtopdiff = start(virt) - start(phys) */
+
+       /*
+        * store uboot arguments to uboot_args[4]
+        */
+
+       /* address of uboot_args (relative) */
+       ADDR    x8, uboot_args
+       str     x0, [x8, #(8*0)]
+       str     x1, [x8, #(8*1)]
+       str     x2, [x8, #(8*2)]
+       str     x3, [x8, #(8*3)]
+
+       /*
+        * ARM64 boot protocol has FDT address in x0 *
+        */
+       ADDR    x8, fdt_addr_r
+       str     x0, [x8]
+
+       b       aarch64_start           /* aarch64_start() @ aarch64/locore.S */
+
+ENTRY_NP(uartputc)
+#ifdef EARLYCONS
+       b       ___CONCAT(EARLYCONS, _platform_early_putchar)
+#endif
+       ret
diff -r 1fe9019964b3 -r 63310e6bbc9e sys/arch/evbarm/conf/mk.generic64
--- a/sys/arch/evbarm/conf/mk.generic64 Fri Sep 14 08:51:06 2018 +0000
+++ b/sys/arch/evbarm/conf/mk.generic64 Fri Sep 14 09:06:12 2018 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: mk.generic64,v 1.1 2018/04/01 04:35:04 ryo Exp $
+#      $NetBSD: mk.generic64,v 1.2 2018/09/14 09:06:12 skrll Exp $
 
-SYSTEM_FIRST_OBJ=      fdt_start.o
-SYSTEM_FIRST_SFILE=    ${THISARM}/fdt/fdt_start.S
+SYSTEM_FIRST_OBJ=      start.o
+SYSTEM_FIRST_SFILE=    ${ARM}/aarch64/start.S
 
 _OSRELEASE!=           ${HOST_SH} $S/conf/osrelease.sh
 
@@ -10,8 +10,6 @@
 MKUBOOTIMAGEARGS=      -f arm64
 MKKNLIMG=              ${THISARM}/compile/rpi-mkknlimg.sh
 
-GENASSYM_EXTRAS+=      ${THISARM}/fdt/genassym.cf
-
 SYSTEM_LD_TAIL_EXTRA+=; \
        echo ${OBJCOPY} -S -O binary $@ $@.bin; \
        ${OBJCOPY} -S -O binary $@ $@.bin; \
diff -r 1fe9019964b3 -r 63310e6bbc9e sys/arch/evbarm/fdt/fdt_start.S
--- a/sys/arch/evbarm/fdt/fdt_start.S   Fri Sep 14 08:51:06 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*     $NetBSD: fdt_start.S,v 1.4 2018/09/10 07:30:33 skrll Exp $      */
-
-/*
- * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "opt_arm_debug.h"     /* VERBOSE_INIT_ARM */
-
-#include <sys/cdefs.h>
-
-#include <aarch64/asm.h>
-
-RCSID("$NetBSD: fdt_start.S,v 1.4 2018/09/10 07:30:33 skrll Exp $")
-
-/* load far effective address (pc relative) */
-.macro ADDR, reg, addr
-       adrp    \reg, \addr
-       add     \reg, \reg, #:lo12:\addr
-.endm
-
-/*
- * Kernel start routine for aarch64 boards.
- */
-       .global start
-start:
-       adr     x9, start
-       ldr     x10, =start
-
-       sub     x10, x10, x9
-
-       /* address of kern_vtopdiff (relative) */
-       ADDR    x8, kern_vtopdiff
-       str     x10, [x8]       /* kern_vtopdiff = start(virt) - start(phys) */
-
-       /*
-        * store uboot arguments to uboot_args[4]
-        */
-
-       /* address of uboot_args (relative) */
-       ADDR    x8, uboot_args
-       str     x0, [x8, #(8*0)]
-       str     x1, [x8, #(8*1)]
-       str     x2, [x8, #(8*2)]
-       str     x3, [x8, #(8*3)]
-
-       /*
-        * ARM64 boot protocol has FDT address in x0 *
-        */
-       ADDR    x8, fdt_addr_r
-       str     x0, [x8]
-
-       b       aarch64_start           /* aarch64_start() @ aarch64/locore.S */
-
-ENTRY_NP(uartputc)
-#ifdef EARLYCONS
-       b       ___CONCAT(EARLYCONS, _platform_early_putchar)
-#endif
-       ret



Home | Main Index | Thread Index | Old Index