summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2010-12-16 14:18:45 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2010-12-16 14:18:45 +0000
commit82ab1d5ab350b04851414e42172719dd9f660cf8 (patch)
treee3e3aba59899426927ec6a3151166a95a0c5d642
parentda08d4b816cb1ae13a23e1f063178d1decf4a776 (diff)
Add support for Versatile Express (new memory map).
-rw-r--r--Makefile9
-rw-r--r--boot.S28
-rw-r--r--model.lds.S4
3 files changed, 30 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index e0416f1..944d705 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
# Build an ELF linux+filesystem image
-#CPPFLAGS += -DSMP
-#CPPFLAGS += -DUSE_INITRD
-CPPFLAGS += -DTHUMB2_KERNEL
+CPPFLAGS += -DSMP
+CPPFLAGS += -DUSE_INITRD
+#CPPFLAGS += -DTHUMB2_KERNEL
CPPFLAGS += -march=armv7-a
+CPPFLAGS += -DVEXPRESS
# MPS (Cortex-M3) definitions
-#CPPFLAGS += -DMACH_MPS
+#CPPFLAGS += -DMACH_MPS -DTHUMB2_KERNEL
#CPPFLAGS += -march=armv7-m
#CPPFLAGS += -mthumb -Wa,-mthumb -Wa,-mimplicit-it=always
diff --git a/boot.S b/boot.S
index 4986262..3ad47c8 100644
--- a/boot.S
+++ b/boot.S
@@ -36,11 +36,19 @@ _start:
@
ldr r1, =filesystem - 0x100
adr r2, 1f
- ldmia r2, {r3 - r6} @ move the code to a location
- stmia r1, {r3 - r6} @ less likely to be overridden
+ ldmia r2, {r3 - r7} @ move the code to a location
+ stmia r1, {r3 - r7} @ less likely to be overridden
+#ifdef VEXPRESS
+ ldr r0, =0x1c010030 @ VE SYS_FLAGS register
+#else
ldr r0, =0x10000030 @ RealView SYS_FLAGS register
+#endif
mov pc, r1 @ branch to the relocated code
-1: ldr r1, [r0]
+1:
+#ifdef VEXPRESS
+ wfe
+#endif
+ ldr r1, [r0]
cmp r1, #0
beq 1b
mov pc, r1 @ branch to the given address
@@ -51,7 +59,9 @@ _start:
@
2:
#ifdef MACH_MPS
- ldr r0, =0x1f005000 @ UART base (MPS)
+ ldr r0, =0x1f005000 @ UART3 base (MPS)
+#elif defined (VEXPRESS)
+ ldr r0, =0x1c090000 @ UART base (Versatile Express)
#else
ldr r0, =0x10009000 @ UART base (RealView/EB)
#endif
@@ -67,6 +77,8 @@ _start:
mov r0, #0
#ifdef MACH_MPS
ldr r1, =10000 @ MPS (temporary)
+#elif defined (VEXPRESS)
+ ldr r1, =2272 @ Versatile Express
#else
ldr r1, =827 @ RealView/EB
#endif
@@ -88,11 +100,15 @@ atags:
.long (1f - .) >> 2
.long 0x54410009
#ifdef MACH_MPS
- .asciz "rdinit=/bin/sh console=ttyAMA3 mem=8M earlyprintk"
+ .asciz "rdinit=/bin/sh console=ttyAMA3 mem=4M earlyprintk"
#elif defined(USE_INITRD)
+#ifdef VEXPRESS
+ .asciz "console=ttyAMA0 mem=512M mem=512M@0x880000000 earlyprintk"
+#else
.asciz "console=ttyAMA0 mem=256M earlyprintk"
+#endif
#else
- .asciz "root=/dev/nfs nfsroot=10.1.68.81:/work2/debootstrap/arm ip=dhcp console=ttyAMA0 mem=256M earlyprintk"
+ .asciz "root=/dev/nfs nfsroot=10.1.77.43:/work/debootstrap/arm ip=dhcp console=ttyAMA0 mem=256M earlyprintk"
#endif
.align 2
1:
diff --git a/model.lds.S b/model.lds.S
index 1e1f63c..10cd4b3 100644
--- a/model.lds.S
+++ b/model.lds.S
@@ -1,5 +1,5 @@
/*
- * boot.S - simple register setup code for stand-alone Linux booting
+ * model.lds.S - simple linker script for stand-alone Linux booting
*
* Copyright (C) 2009 ARM Limited
*
@@ -29,6 +29,8 @@ INPUT(./filesystem.cpio.gz)
#ifdef MACH_MPS
PHYS_OFFSET = 0x10000000;
+#elif defined (VEXPRESS)
+PHYS_OFFSET = 0x80000000;
#else
PHYS_OFFSET = 0x70000000;
#endif