mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
baremetal: aarch64 m5exit
This commit is contained in:
3
baremetal/arch/aarch64/no_bootloader/m5exit.S
Normal file
3
baremetal/arch/aarch64/no_bootloader/m5exit.S
Normal file
@@ -0,0 +1,3 @@
|
||||
.global mystart
|
||||
mystart:
|
||||
mov x0, #0; .inst 0XFF000110 | (0x21 << 16);
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user