[wip] drop qemu exit code (which doesn't work anyway)

This commit is contained in:
Berkus Decker 2019-03-02 19:18:09 +02:00
parent 23d778de01
commit 21303497cd
1 changed files with 21 additions and 21 deletions

View File

@ -176,28 +176,28 @@ entry!(kmain);
// From https://stackoverflow.com/a/49930361/895245 // From https://stackoverflow.com/a/49930361/895245
// @todo specify exit value depending on tests result? // @todo specify exit value depending on tests result?
fn qemu_aarch64_exit() -> ! { // fn qemu_aarch64_exit() -> ! {
unsafe { // unsafe {
asm!(" // asm!("
/* 0x20026 == ADP_Stopped_ApplicationExit */ // /* 0x20026 == ADP_Stopped_ApplicationExit */
mov x1, #0x26 // mov x1, #0x26
movk x1, #2, lsl #16 // movk x1, #2, lsl #16
str x1, [sp,#0] // str x1, [sp,#0]
/* Exit status code. Host QEMU process exits with that status. */ // /* Exit status code. Host QEMU process exits with that status. */
mov x0, #0 // mov x0, #0
str x0, [sp,#8] // str x0, [sp,#8]
/* x1 contains the address of parameter block. // /* x1 contains the address of parameter block.
* Any memory address could be used. */ // * Any memory address could be used. */
mov x1, sp // mov x1, sp
/* SYS_EXIT */ // /* SYS_EXIT */
mov w0, #0x18 // mov w0, #0x18
/* Do the semihosting call on A64. */ // /* Do the semihosting call on A64. */
hlt 0xf000" // hlt 0xf000"
:::: "volatile"); // :::: "volatile");
} // }
unreachable!(); // unreachable!();
} // }