aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-10-04 12:45:25 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-10-08 05:07:34 -0400
commit80924ac595f3ca32ec0a80cc1217c7019d3519ff (patch)
tree5628f3d729756728cc37fceb39c72835a8ea79e4 /arch/arm/kernel
parentc083c6609b290a650894f846270a9233401adc22 (diff)
ARM: cleanup lookup_machine_type data and ensure these are placed in __HEAD
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/head-common.S26
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 7c6f9ab47b95..c4effcfba1eb 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -24,6 +24,7 @@
24 * and hope for the best (useful if bootloader fails to pass a proper 24 * and hope for the best (useful if bootloader fails to pass a proper
25 * machine ID for example). 25 * machine ID for example).
26 */ 26 */
27 __HEAD
27__error_a: 28__error_a:
28#ifdef CONFIG_DEBUG_LL 29#ifdef CONFIG_DEBUG_LL
29 mov r4, r1 @ preserve machine ID 30 mov r4, r1 @ preserve machine ID
@@ -33,7 +34,7 @@ __error_a:
33 bl printhex8 34 bl printhex8
34 adr r0, str_a2 35 adr r0, str_a2
35 bl printascii 36 bl printascii
36 adr r3, 4f 37 adr r3, __lookup_machine_type_data
37 ldmia r3, {r4, r5, r6} @ get machine desc list 38 ldmia r3, {r4, r5, r6} @ get machine desc list
38 sub r4, r3, r4 @ get offset between virt&phys 39 sub r4, r3, r4 @ get offset between virt&phys
39 add r5, r5, r4 @ convert virt addresses to 40 add r5, r5, r4 @ convert virt addresses to
@@ -62,15 +63,6 @@ str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
62#endif 63#endif
63 64
64/* 65/*
65 * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for
66 * more information about the __proc_info and __arch_info structures.
67 */
68 .align 2
694: .long .
70 .long __arch_info_begin
71 .long __arch_info_end
72
73/*
74 * Lookup machine architecture in the linker-build list of architectures. 66 * Lookup machine architecture in the linker-build list of architectures.
75 * Note that we can't use the absolute addresses for the __arch_info 67 * Note that we can't use the absolute addresses for the __arch_info
76 * lists since we aren't running with the MMU on (and therefore, we are 68 * lists since we aren't running with the MMU on (and therefore, we are
@@ -82,7 +74,7 @@ str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
82 * r5 = mach_info pointer in physical address space 74 * r5 = mach_info pointer in physical address space
83 */ 75 */
84__lookup_machine_type: 76__lookup_machine_type:
85 adr r3, 4b 77 adr r3, __lookup_machine_type_data
86 ldmia r3, {r4, r5, r6} 78 ldmia r3, {r4, r5, r6}
87 sub r3, r3, r4 @ get offset between virt&phys 79 sub r3, r3, r4 @ get offset between virt&phys
88 add r5, r5, r3 @ convert virt addresses to 80 add r5, r5, r3 @ convert virt addresses to
@@ -97,6 +89,18 @@ __lookup_machine_type:
972: mov pc, lr 892: mov pc, lr
98ENDPROC(__lookup_machine_type) 90ENDPROC(__lookup_machine_type)
99 91
92/*
93 * Look in arch/arm/kernel/arch.[ch] for information about the
94 * __arch_info structures.
95 */
96 .align 2
97 .type __lookup_machine_type_data, %object
98__lookup_machine_type_data:
99 .long .
100 .long __arch_info_begin
101 .long __arch_info_end
102 .size __lookup_machine_type_data, . - __lookup_machine_type_data
103
100/* Determine validity of the r2 atags pointer. The heuristic requires 104/* Determine validity of the r2 atags pointer. The heuristic requires
101 * that the pointer be aligned, in the first 16k of physical RAM and 105 * that the pointer be aligned, in the first 16k of physical RAM and
102 * that the ATAG_CORE marker is first and present. Future revisions 106 * that the ATAG_CORE marker is first and present. Future revisions