Skip to content

Commit f9886bc

Browse files
kbrunham-inteltrini
authored andcommitted
Added arm64 assembly for examples/api crt0
I've encountered a problem when compiling the 'examples/api' directory for ARM64 in U-boot. The problem lies in the assembly code in 'examples/api/crt0.S' where the current CONFIG_ARM code is only 32-bit. When targeting ARM64, a 64-bit version is necessary. I have proposed a fix by including a 'CONFIG_ARM64' section in the assembly code as shown below. These changes have been check via u-boot#538. Feedback is welcome. Signed-off-by: Kalen Brunham <kalen.brunham@intel.com>
1 parent 17b1656 commit f9886bc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

examples/api/crt0.S

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ _start:
3333
str sp, [ip]
3434
b main
3535

36+
#elif defined(CONFIG_ARM64)
37+
38+
.text
39+
.globl _start
40+
_start:
41+
ldr ip0, =search_hint
42+
str sp_el2, [ip0]
43+
b main
44+
45+
46+
.globl syscall
47+
syscall:
48+
ldr ip0, =syscall_ptr
49+
ldr pc_el2, [ip0]
50+
3651

3752
.globl syscall
3853
syscall:

0 commit comments

Comments
 (0)