mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
test-baremetal: fix missing setting x0 return value Examples were just returning on ret without setting x0, which led to failures... those were not noticed because of how broken the testing system was ;-)
16 lines
298 B
ArmAsm
16 lines
298 B
ArmAsm
/* https://github.com/cirosantilli/linux-kernel-module-cheat#semihosting */
|
|
|
|
.global mystart
|
|
mystart:
|
|
mov x1, 0x26
|
|
movk x1, 2, lsl 16
|
|
ldr x2, =semihost_args
|
|
str x1, [x2, 0]
|
|
mov x0, 0
|
|
str x0, [x2, 8]
|
|
mov x1, x2
|
|
mov w0, 0x18
|
|
hlt 0xf000
|
|
semihost_args:
|
|
.skip 16
|