diff --git a/README.md b/README.md index 69f3598d..ef1d4851 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ make boot You may need to install the following (unless you already have it): * GRUB2 bootloader tools - `grub2-common` package (e.g. `apt install grub2-common`) -* ISO generation tools - `xorriso` package (e.g. `apt install xorriso`) +* ISO generation tools - `xorriso` and `mtools` package (e.g. `apt install xorriso mtools`) #### Kernel image build (for example to be used with QEMU) diff --git a/common/usermode.c b/common/usermode.c index 45915c36..ecc254f1 100644 --- a/common/usermode.c +++ b/common/usermode.c @@ -49,8 +49,13 @@ static inline void syscall_restore(void) { } static inline long syscall_return(long return_code) { - register long ret asm(STR(_ASM_AX)) = return_code; - return ret; + /* clang-format off */ + asm volatile( + "mov %[ret], %%" STR(_ASM_AX) "\n" + ::[ret] "r"(return_code) + ); + /* clang-format on */ + return return_code; } static inline void stack_switch(void) {