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