Skip to content

Commit 723dd8c

Browse files
committed
Merge pull request #55 from swarren/armstub8_magic_layout
armstub8: mem layout changes to match latest FW interface
2 parents b65595f + 9d4650e commit 723dd8c

File tree

1 file changed

+35
-18
lines changed

1 file changed

+35
-18
lines changed

armstubs/armstub8.S

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ in_el2:
106106
and x6, x6, #0x3
107107
cbz x6, primary_cpu
108108

109-
adr x5, spin_table
109+
adr x5, spin_cpu0
110110
secondary_spin:
111111
wfe
112112
ldr x4, [x5, x6, lsl #3]
@@ -115,8 +115,8 @@ secondary_spin:
115115
b boot_kernel
116116

117117
primary_cpu:
118-
ldr x4, kernel_entry
119-
ldr x0, dtb_ptr
118+
ldr w4, kernel_entry32
119+
ldr w0, dtb_ptr32
120120

121121
boot_kernel:
122122
mov x1, #0
@@ -126,23 +126,40 @@ boot_kernel:
126126

127127
.ltorg
128128

129-
.org 0xd0
130-
.globl kernel_entry
131-
kernel_entry:
132-
.quad 0x8000
133-
134129
.org 0xd8
135-
.globl spin_table
136-
spin_table:
137-
.quad 0 // CPU 0 @ 0xd8
138-
.quad 0 // CPU 1 @ 0xe0
139-
.quad 0 // CPU 2 @ 0xe8
140-
.quad 0 // CPU 3 @ 0xf0
141-
130+
.globl spin_cpu0
131+
spin_cpu0:
132+
.quad 0
133+
.org 0xe0
134+
.globl spin_cpu1
135+
spin_cpu1:
136+
.quad 0
137+
.org 0xe8
138+
.globl spin_cpu2
139+
spin_cpu2:
140+
.quad 0
141+
.org 0xf0
142+
.globl spin_cpu3
143+
spin_cpu3:
144+
# Shared with next two symbols/.word
145+
# FW clears the next 8 bytes after reading the initial value, leaving
146+
# the location suitable for use as spin_cpu3
147+
.org 0xf0
148+
.globl stub_magic
149+
stub_magic:
150+
.word 0x5afe570b
151+
.org 0xf4
152+
.globl stub_version
153+
stub_version:
154+
.word 0
142155
.org 0xf8
143-
.globl dtb_ptr
144-
dtb_ptr:
145-
.quad 0x100
156+
.globl dtb_ptr32
157+
dtb_ptr32:
158+
.word 0x100
159+
.org 0xfc
160+
.globl kernel_entry32
161+
kernel_entry32:
162+
.word 0x8000
146163

147164
.org 0x100
148165
.globl dtb_space

0 commit comments

Comments
 (0)