Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/cubie Use KERNEL_BASE_VOFFSET. s/bbs/bss
details: https://anonhg.NetBSD.org/src/rev/669d4af053c3
branches: trunk
changeset: 328795:669d4af053c3
user: matt <matt%NetBSD.org@localhost>
date: Fri Apr 18 06:53:13 2014 +0000
description:
Use KERNEL_BASE_VOFFSET. s/bbs/bss
Move temp_l1_table to last 16KB before 128mb after kernel_base.
diffstat:
sys/arch/evbarm/cubie/cubie_machdep.c | 13 ++++---------
sys/arch/evbarm/cubie/cubie_start.S | 22 +++++++---------------
2 files changed, 11 insertions(+), 24 deletions(-)
diffs (122 lines):
diff -r c4dbec904c0e -r 669d4af053c3 sys/arch/evbarm/cubie/cubie_machdep.c
--- a/sys/arch/evbarm/cubie/cubie_machdep.c Fri Apr 18 06:23:32 2014 +0000
+++ b/sys/arch/evbarm/cubie/cubie_machdep.c Fri Apr 18 06:53:13 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cubie_machdep.c,v 1.16 2014/04/11 04:19:48 matt Exp $ */
+/* $NetBSD: cubie_machdep.c,v 1.17 2014/04/18 06:53:13 matt Exp $ */
/*
* Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cubie_machdep.c,v 1.16 2014/04/11 04:19:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cubie_machdep.c,v 1.17 2014/04/18 06:53:13 matt Exp $");
#include "opt_machdep.h"
#include "opt_ddb.h"
@@ -194,7 +194,7 @@
bool cubietruck_p;
/*
* uboot_args are filled in by cubie_start.S and must be in .data
- * and not .bbs since .bss is cleared after uboot_args are filled in.
+ * and not .bss since .bss is cleared after uboot_args are filled in.
*/
uintptr_t uboot_args[4] = { 0 };
@@ -216,11 +216,6 @@
* kernel address space. *Not* for general use.
*/
#define KERNEL_BASE_PHYS ((paddr_t)KERNEL_BASE_phys)
-#ifdef KERNEL_BASES_EQUAL
-#define KERNEL_PHYS_VOFFSET 0
-#else
-#define KERNEL_PHYS_VOFFSET (KERNEL_BASE - AWIN_SDRAM_PBASE)
-#endif
#define AWIN_CORE_VOFFSET (AWIN_CORE_VBASE - AWIN_CORE_PBASE)
/* Prototypes */
@@ -405,7 +400,7 @@
*/
if (uboot_args[3] - AWIN_SDRAM_PBASE < ram_size) {
const char * const args = (const char *)
- (uboot_args[3] + KERNEL_PHYS_VOFFSET);
+ (uboot_args[3] + KERNEL_BASE_VOFFSET);
strlcpy(bootargs, args, sizeof(bootargs));
}
}
diff -r c4dbec904c0e -r 669d4af053c3 sys/arch/evbarm/cubie/cubie_start.S
--- a/sys/arch/evbarm/cubie/cubie_start.S Fri Apr 18 06:23:32 2014 +0000
+++ b/sys/arch/evbarm/cubie/cubie_start.S Fri Apr 18 06:53:13 2014 +0000
@@ -40,11 +40,11 @@
#include <arm/allwinner/awin_reg.h>
#include <evbarm/cubie/platform.h>
-RCSID("$NetBSD: cubie_start.S,v 1.8 2014/04/11 04:19:48 matt Exp $")
+RCSID("$NetBSD: cubie_start.S,v 1.9 2014/04/18 06:53:13 matt Exp $")
#if defined(VERBOSE_INIT_ARM)
#define XPUTC(n) mov r0, n; bl xputc
-#ifdef KERNEL_BASES_EQUAL
+#if KERNEL_BASE_VOFFSET == 0
#define XPUTC2(n) mov r0, n; bl xputc
#else
#define XPUTC2(n) mov r0, n; blx r11
@@ -60,7 +60,7 @@
#endif
#define INIT_MEMSIZE 128
-#define TEMP_L1_TABLE (AWIN_SDRAM_PBASE + INIT_MEMSIZE * 0x100000 - L1_TABLE_SIZE)
+#define TEMP_L1_TABLE (KERNEL_BASE - KERNEL_BASE_VOFFSET + INIT_MEMSIZE * L1_S_SIZE - L1_TABLE_SIZE)
#define MD_CPU_HATCH _C_LABEL(awin_cpu_hatch)
@@ -90,7 +90,7 @@
*/
movw r4, #:lower16:uboot_args
movt r4, #:upper16:uboot_args
-#ifndef KERNEL_BASES_EQUAL
+#if KERNEL_BASE_VOFFSET != 0
/*
* But since .start is at 0x40000000 and .text is at 0x8000000, we
* can't directly use the address that the linker gave us directly.
@@ -123,7 +123,7 @@
*/
movw r0, #:lower16:TEMP_L1_TABLE
movt r0, #:upper16:TEMP_L1_TABLE
-#ifdef KERNEL_BASES_EQUAL
+#if KERNEL_BASE_VOFFSET == 0
bl arm_cpuinit
#else
/*
@@ -131,7 +131,7 @@
* so setup the lr to be in .text. Cache the address for xputc
* before we go.
*/
-#ifdef VERBOSE_INIT_ARM
+#if defined(VERBOSE_INIT_ARM)
adr r11, xputc @ for XPUTC2
#endif
movw lr, #:lower16:1f
@@ -252,19 +252,11 @@
#endif /* MULTIPROCESSOR */
.Lmmu_init_table:
-#ifdef KERNEL_BASES_EQUAL
- /* Map memory 1:1 VA to PA, write-back cacheable, shareable */
- MMU_INIT(KERNEL_BASE, KERNEL_BASE, INIT_MEMSIZE,
- L1_S_PROTO_armv7 | L1_S_APv7_KRW | L1_S_CACHEABLE)
-
- /* Map temp L1 table 1:1 VA to PA, write-back cacheable, shareable */
- MMU_INIT(TEMP_L1_TABLE, TEMP_L1_TABLE, INIT_MEMSIZE,
- L1_S_PROTO_armv7 | L1_S_APv7_KRW | L1_S_CACHEABLE)
-#else
/* Map KERNEL_BASE VA to SDRAM PA, write-back cacheable, shareable */
MMU_INIT(KERNEL_BASE, KERNEL_BASE - KERNEL_BASE_VOFFSET, INIT_MEMSIZE,
L1_S_PROTO_armv7 | L1_S_APv7_KRW | L1_S_CACHEABLE)
+#if KERNEL_BASE_VOFFSET != 0
/* Map memory 1:1 VA to PA, write-back cacheable, shareable */
MMU_INIT(KERNEL_BASE - KERNEL_BASE_VOFFSET,
KERNEL_BASE - KERNEL_BASE_VOFFSET, INIT_MEMSIZE,
Home |
Main Index |
Thread Index |
Old Index