aboutsummaryrefslogtreecommitdiff
path: root/arch/aarch32/common.S
diff options
context:
space:
mode:
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