mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
Kernel: Make the kernel compile & link for x86_64
It's now possible to build the whole kernel with an x86_64 toolchain. There's no bootstrap code so it doesn't work yet (obviously.)
This commit is contained in:
parent
aae91dda66
commit
adb2e6be5f
15 changed files with 316 additions and 48 deletions
|
@ -37,6 +37,7 @@ extern "C" void syscall_handler(TrapFrame*);
|
|||
extern "C" void syscall_asm_entry();
|
||||
|
||||
// clang-format off
|
||||
#if ARCH(I386)
|
||||
asm(
|
||||
".globl syscall_asm_entry\n"
|
||||
"syscall_asm_entry:\n"
|
||||
|
@ -64,6 +65,13 @@ asm(
|
|||
" call syscall_handler \n"
|
||||
" movl %ebx, 0(%esp) \n" // push pointer to TrapFrame
|
||||
" jmp common_trap_exit \n");
|
||||
#elif ARCH(X86_64)
|
||||
asm(
|
||||
".globl syscall_asm_entry\n"
|
||||
"syscall_asm_entry:\n"
|
||||
" cli\n"
|
||||
" hlt\n");
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
namespace Syscall {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue