diff --git a/baremetal/arch/aarch64/no_bootloader/m5exit.S b/baremetal/arch/aarch64/no_bootloader/m5exit.S new file mode 100644 index 0000000..067f46d --- /dev/null +++ b/baremetal/arch/aarch64/no_bootloader/m5exit.S @@ -0,0 +1,3 @@ +.global mystart +mystart: + mov x0, #0; .inst 0XFF000110 | (0x21 << 16); diff --git a/baremetal/lib/common.c b/baremetal/lib/common.c index c6334bc..b6a3e33 100644 --- a/baremetal/lib/common.c +++ b/baremetal/lib/common.c @@ -58,7 +58,7 @@ int _write(int file, char *ptr, int len) { return len; } -/* Only 0 is supported for now, arm semihosting cannot handle it. */ +/* Only 0 is supported for now, arm semihosting cannot handle other values. */ void _exit(int status) { #if defined(__arm__) __asm__ __volatile__ ("mov r0, #0x18; ldr r1, =#0x20026; svc 0x00123456");