From f403f86934a7cc10434b25f2bc9cd448959a16f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Thu, 27 Sep 2018 00:00:00 +0000 Subject: [PATCH] baremetal: aarch64 m5exit --- baremetal/arch/aarch64/no_bootloader/m5exit.S | 3 +++ baremetal/lib/common.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 baremetal/arch/aarch64/no_bootloader/m5exit.S 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");