From: Amelia Coutard Date: Sat, 5 Aug 2023 23:22:01 +0000 (+0200) Subject: Removed println syscall X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=21878e7f254403f7b607575a3de4edc5694055ec;p=voyage-au-centre-des-fichiers.git Removed println syscall --- diff --git a/kernel/src/ring3.S b/kernel/src/ring3.S index 5551cff..3019544 100644 --- a/kernel/src/ring3.S +++ b/kernel/src/ring3.S @@ -92,10 +92,10 @@ incorrect_syscall: .section .rodata syscalls_call_table: .quad syscall_print - .quad syscall_println .quad syscall_print_low_mmap -.set syscall_n, 3 -process_struct_table: .quad 0xFFFFC00000000000 +syscalls_call_table_end: +.set syscall_n, (syscalls_call_table_end - syscalls_call_table) >> 3 # Because / 8 *doesn't work* ! +.globl syscall_n .section .data save_regs_tmp: diff --git a/kernel/src/ring3.cpp b/kernel/src/ring3.cpp index ddba192..286a5bf 100644 --- a/kernel/src/ring3.cpp +++ b/kernel/src/ring3.cpp @@ -44,11 +44,6 @@ extern "C" void os::syscall_print(char v) { os::printc(v); } -extern "C" void os::syscall_println(char v) { - os::printc(v); - os::printc('\n'); -} - extern "C" void os::syscall_print_low_mmap() { os::paging::on_all_pages(*get_process(current_pid).PML4T, [](os::paging::page* vaddr, os::phys_ptr paddr, std::size_t page_size_in_bytes) { diff --git a/kernel/src/ring3.hpp b/kernel/src/ring3.hpp index 78b6cb8..66fa287 100644 --- a/kernel/src/ring3.hpp +++ b/kernel/src/ring3.hpp @@ -45,7 +45,6 @@ extern "C" void load_tss(); extern "C" void syscall_64bit_handler(); extern "C" void syscall_print(char c); -extern "C" void syscall_println(char c); extern "C" void syscall_print_low_mmap(); extern "C" void syscall_rax_error_handler(); diff --git a/test_module/src/test.S b/test_module/src/test.S index 968868e..be3f7b9 100644 --- a/test_module/src/test.S +++ b/test_module/src/test.S @@ -21,6 +21,6 @@ print: .globl check_mem check_mem: - mov $2, %rax + mov $1, %rax syscall ret