Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm Use armv6_start.S
details: https://anonhg.NetBSD.org/src/rev/ee56a673b232
branches: trunk
changeset: 457148:ee56a673b232
user: hkenken <hkenken%NetBSD.org@localhost>
date: Thu Jun 13 04:20:23 2019 +0000
description:
Use armv6_start.S
diffstat:
sys/arch/evbarm/conf/mk.netwalker | 9 +-
sys/arch/evbarm/conf/std.netwalker | 26 +-
sys/arch/evbarm/netwalker/netwalker_machdep.c | 6 +-
sys/arch/evbarm/netwalker/netwalker_start.S | 743 --------------------------
4 files changed, 23 insertions(+), 761 deletions(-)
diffs (truncated from 839 to 300 lines):
diff -r ded138843ca3 -r ee56a673b232 sys/arch/evbarm/conf/mk.netwalker
--- a/sys/arch/evbarm/conf/mk.netwalker Thu Jun 13 03:07:24 2019 +0000
+++ b/sys/arch/evbarm/conf/mk.netwalker Thu Jun 13 04:20:23 2019 +0000
@@ -1,12 +1,11 @@
-# $NetBSD: mk.netwalker,v 1.4 2014/04/09 04:00:50 hkenken Exp $
+# $NetBSD: mk.netwalker,v 1.5 2019/06/13 04:20:23 hkenken Exp $
CPPFLAGS+= -mcpu=cortex-a8 -mfpu=neon
-SYSTEM_FIRST_OBJ= netwalker_start.o
-SYSTEM_FIRST_SFILE= ${THISARM}/netwalker/netwalker_start.S
+ENTRYPOINT= generic_start
-KERNEL_BASE_PHYS=0x90100000
-KERNEL_BASE_VIRT=0x80100000
+SYSTEM_FIRST_OBJ= armv6_start.o
+SYSTEM_FIRST_SFILE= ${ARM}/arm/armv6_start.S
SYSTEM_LD_TAIL_EXTRA+=; \
echo ${OBJCOPY} -S -O binary $@ $@.bin; \
diff -r ded138843ca3 -r ee56a673b232 sys/arch/evbarm/conf/std.netwalker
--- a/sys/arch/evbarm/conf/std.netwalker Thu Jun 13 03:07:24 2019 +0000
+++ b/sys/arch/evbarm/conf/std.netwalker Thu Jun 13 04:20:23 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.netwalker,v 1.12 2018/10/15 16:54:54 skrll Exp $
+# $NetBSD: std.netwalker,v 1.13 2019/06/13 04:20:23 hkenken Exp $
#
# standard NetBSD/evbarm options for Sharp NetWalker
@@ -8,21 +8,25 @@
# Pull in i.mx51 config definitions.
include "arch/evbarm/conf/files.netwalker"
+options ARM_GENERIC_TODR
+options ARM_HAS_VBAR
+options ARM_INTR_IMPL="<arch/arm/imx/imx51_intr.h>"
+options DRAM_BLOCKS=256
+options EVBARM_BOARDTYPE="netwalker"
+options FPU_VFP
options MODULAR
options MODULAR_DEFAULT_AUTOLOAD
-options __HAVE_FAST_SOFTINTS # should be in types.h
+options TPIDRPRW_IS_CURCPU
+options __BUS_SPACE_HAS_STREAM_METHODS
options __HAVE_CPU_COUNTER
-options __HAVE_MM_MD_DIRECT_MAPPED_PHYS
-options ARM_HAS_VBAR
-options TPIDRPRW_IS_CURCPU
+options __HAVE_CPU_UAREA_ALLOC_IDLELWP
+options __HAVE_GENERIC_START
+options __HAVE_GENERIC_CPU_INITCLOCKS
+options __HAVE_FAST_SOFTINTS # should be in types.h
options CORTEX_PMC
options CORTEX_PMC_CCNT_HZ=800000000
-options EVBARM_BOARDTYPE="netwalker"
-options FPU_VFP
-makeoptions LOADADDRESS="0x90100000"
-makeoptions BOARDTYPE="netwalker"
makeoptions BOARDMKFRAG="${THISARM}/conf/mk.netwalker"
-options ARM_INTR_IMPL="<arch/arm/imx/imx51_intr.h>"
-options ARM_GENERIC_TODR
+makeoptions KERNEL_BASE_PHYS=0x90008000
+makeoptions KERNEL_BASE_VIRT=0x80008000
diff -r ded138843ca3 -r ee56a673b232 sys/arch/evbarm/netwalker/netwalker_machdep.c
--- a/sys/arch/evbarm/netwalker/netwalker_machdep.c Thu Jun 13 03:07:24 2019 +0000
+++ b/sys/arch/evbarm/netwalker/netwalker_machdep.c Thu Jun 13 04:20:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netwalker_machdep.c,v 1.23 2019/01/21 07:47:30 skrll Exp $ */
+/* $NetBSD: netwalker_machdep.c,v 1.24 2019/06/13 04:20:23 hkenken Exp $ */
/*
* Copyright (c) 2002, 2003, 2005, 2010 Genetec Corporation.
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netwalker_machdep.c,v 1.23 2019/01/21 07:47:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netwalker_machdep.c,v 1.24 2019/06/13 04:20:23 hkenken Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_arm_debug.h"
@@ -164,6 +164,8 @@
extern char KERNEL_BASE_phys[];
+u_int uboot_args[4] __attribute__((__section__(".data")));
+
extern int cpu_do_powersave;
/*
diff -r ded138843ca3 -r ee56a673b232 sys/arch/evbarm/netwalker/netwalker_start.S
--- a/sys/arch/evbarm/netwalker/netwalker_start.S Thu Jun 13 03:07:24 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,743 +0,0 @@
-/* $NetBSD: netwalker_start.S,v 1.6 2019/05/18 08:49:24 skrll Exp $ */
-
-/*-
- * Copyright (c) 2012 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Matt Thomas of 3am Software Foundry.
- *
- * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``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 FOUNDATION OR CONTRIBUTORS
- * 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.
- */
-
-/*-
- * Copyright (c) 2009 SHIMIZU Ryo <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.
- */
-
-/*
- * Copyright (c) 2002, 2003, 2010 Genetec Corporation. All rights reserved.
- * Written by Kenichi Hashimoto and Hiroyuki Bessho for Genetec Corporation.
- *
- * 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 GENETEC CORPORATION ``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 GENETEC CORPORATION
- * 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_imx.h"
-#include "opt_com.h"
-#include "opt_cpuoptions.h"
-#include "opt_cputypes.h"
-#include "opt_arm_debug.h"
-
-#include <arm/asm.h>
-#include <arm/armreg.h>
-#include "assym.h"
-
-#include <arm/imx/imx51reg.h>
-#include <arm/imx/imxuartreg.h>
-#include <evbarm/netwalker/netwalker_reg.h>
-
-RCSID("$NetBSD: netwalker_start.S,v 1.6 2019/05/18 08:49:24 skrll Exp $")
-
-#if defined(VERBOSE_INIT_ARM)
-#define DEBUG_STARTUP
-#define XPUTC(n) mov r0, n; bl _C_LABEL(debugputc)
-#else
-#define XPUTC(n)
-#endif
-
-#ifndef SDRAM_START
-#define SDRAM_START CSD0DDR_BASE
-#endif
-#define KERNEL_TEXT_ADDR (SDRAM_START+0x00100000)
-
-#define INIT_MEMSIZE 128
-#define TEMP_L1_TABLE (SDRAM_START + INIT_MEMSIZE * 0x100000 - L1_TABLE_SIZE)
-
-#ifdef DEBUG_STARTUP
-#define CHECKPOINT(n) CHECKPOINT2(n,r0,r1)
-#define CHECKPOINT2(n,ra,rb) \
- mov ra,#0x30+(n); \
- ldr rb, =UART1_BASE; \
- str ra, [rb, #IMX_UTXD]
-#else
-#define CHECKPOINT(n) /* nothing to do */
-#define CHECKPOINT2(n,ra,rb) /* nothing to do */
-#endif
-
- .section .start,"ax",%progbits
-
- .text
-
- .global _C_LABEL(netwalker_start)
-_C_LABEL(netwalker_start):
- CHECKPOINT(0)
-
-#ifdef DEBUG_STARTUP
- ldr sp,=SDRAM_START+0x4000
-
- bl newline
- ldr r0, =0xdeadb01f
- bl _C_LABEL(debugprintx)
- bl newline
-
- mov r0, pc
- bl _C_LABEL(debugprintx)
- bl newline
-
- mrc p15, 0, r0, c0, c0, 3 /* read TLB type register */
- bl _C_LABEL(debugprintx)
- bl newline
-
- mrc p15, 0, r0, c1, c0, 0 /* read control register */
- bl _C_LABEL(debugprintx)
- bl newline
-
- mrc p15, 0, r0, c2, c0, 0 /* read TTB0 */
- bl _C_LABEL(debugprintx)
- bl newline
-
- mrc p15, 0, r0, c2, c0, 1 /* read TTB1 */
- bl _C_LABEL(debugprintx)
- bl newline
-
- ldr r0, =0xbabeface
- bl _C_LABEL(debugprintx)
- bl newline
-
- /* dump some of UART1 registers to know clock frequency */
- ldr r4,=UART1_BASE
- ldr r0,[r4,#IMX_UBMR]
- bl _C_LABEL(debugprintx)
- bl newline
- ldr r0,[r4,#IMX_UBIR]
- bl _C_LABEL(debugprintx)
- bl newline
- ldr r0,[r4,#IMX_UFCR]
- bl _C_LABEL(debugprintx)
- bl newline
-#endif /* DEBUG_STARTUP */
-
- /* Are we running on right place ? */
- ldr r2, =KERNEL_TEXT_ADDR
- adr r0, _C_LABEL(netwalker_start)
- cmp r0, r2
- beq relocated
-
- /*
- * move me to RAM
- */
- ldr r1, .Lcopy_size
- add r1, r1, #3
- mov r1, r1, LSR #2
- mov r4, r2
-
- bhs 5f
-
- /* src < dest. copy from top */
- add r0,r0,r1,LSL #2
- add r2,r2,r1,LSL #2
-
-3: ldr r3,[r0,#-4]!
- str r3,[r2,#-4]!
- subs r1,r1,#1
- bhi 3b
- b 7f
-
Home |
Main Index |
Thread Index |
Old Index