aboutsummaryrefslogtreecommitdiff
path: root/arch/aarch32/common.S
diff options
context:
space:
mode:
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>2015-12-04 12:43:20 +0000
committerMark Rutland <mark.rutland@arm.com>2016-06-15 10:27:35 +0100
commite3fe71d0a592064adf1bfde81193b23df03c3469 (patch)
tree617f12b38d2b94c0b9b15db0238b0849552614f5 /arch/aarch32/common.S
parent5933e49b6f45fa18dd1e32d14372bb60837ff954 (diff)
Add AArch32 to the boot-wrapper
This patch allows to build a 32-bit boot-wrapper, and create a complete linux-system.axf for models that start in AArch32. Most of the code is a simple translation of the AArch64 side. We add an --aarch32-bw argument to ./configure, and bump the version to 0.2, to welcome this new architecture. Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'arch/aarch32/common.S')
-rw-r--r--arch/aarch32/common.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/aarch32/common.S b/arch/aarch32/common.S
new file mode 100644
index 0000000..6b11e62
--- /dev/null
+++ b/arch/aarch32/common.S
@@ -0,0 +1,17 @@
+/*
+ * arch/aarch32/common.S - common definitions useful for boot code
+ *
+ * Copyright (C) 2013 ARM Limited. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE.txt file.
+ */
+
+#include <asm/cpu.h>
+
+ /* Returns mpidr in \dest, clobbers \tmp and flags */
+ .macro cpuid dest, tmp
+ mrc p15, 0, \dest, c0, c0, 5 @ MPIDR
+ ldr \tmp, =MPIDR_ID_BITS
+ ands \dest, \dest, \tmp
+ .endm