mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
Made syscall ids 64 bits in rax
This commit is contained in:
@@ -2,9 +2,9 @@ global _start
|
||||
_start:
|
||||
xor rbp, rbp ; Sentinel rbp
|
||||
|
||||
mov rdi, 0 ; DEBUG syscall
|
||||
|
||||
.loop:
|
||||
mov rax, 0 ; DEBUG syscall
|
||||
syscall
|
||||
|
||||
jmp .loop
|
||||
|
||||
|
||||
@@ -303,12 +303,9 @@ addr_t
|
||||
syscall_handler(addr_t return_rsp, cpu_state regs)
|
||||
{
|
||||
console *cons = console::get();
|
||||
syscall call = static_cast<syscall>(regs.rdi & 0xffff);
|
||||
syscall call = static_cast<syscall>(regs.rax);
|
||||
|
||||
switch (call) {
|
||||
case syscall::message:
|
||||
break;
|
||||
|
||||
case syscall::debug:
|
||||
cons->set_color(11);
|
||||
cons->printf("\nReceived DEBUG syscall\n");
|
||||
@@ -316,6 +313,9 @@ syscall_handler(addr_t return_rsp, cpu_state regs)
|
||||
print_regs(regs);
|
||||
break;
|
||||
|
||||
case syscall::message:
|
||||
break;
|
||||
|
||||
default:
|
||||
cons->set_color(9);
|
||||
cons->printf("\nReceived unknown syscall: %02x\n", call);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
enum class syscall : uint16_t
|
||||
enum class syscall : uint64_t
|
||||
{
|
||||
debug,
|
||||
message,
|
||||
|
||||
Reference in New Issue
Block a user