gettid syscall, fix issues with vmm and mmap syscall

This commit is contained in:
Matheus
2022-08-18 22:12:51 -03:00
parent da99da2b36
commit 4de0ff2556
9 changed files with 50 additions and 10 deletions
+5
View File
@@ -14,6 +14,11 @@
#define ARCH_MMU_MAP_PAGESIZE (uint64_t)(1 << 7)
#define ARCH_MMU_MAP_ACCESSED (uint64_t)(1 << 5)
#define ARCH_MMU_ERROR_WRITE 2
#define ARCH_MMU_ERROR_PRESENT 1
#define ARCH_MMU_ERROR_USER 4
#define ARCH_MMU_ERROR_INSTFETCH 16
typedef uint64_t* arch_mmu_tableptr;
int arch_mmu_map(arch_mmu_tableptr, void*, void*, size_t);
+1 -1
View File
@@ -16,7 +16,7 @@ void isr_except(arch_regs *reg){
void isr_pagefault(arch_regs *reg){
if(!vmm_dealwithrequest(reg->cr2))
if(!vmm_dealwithrequest(reg->cr2, reg->error, reg->cs == 0x3b))
_panic("Page fault!", reg);
}
+3 -1
View File
@@ -4,13 +4,15 @@ section .rodata
extern syscall_libc_log
extern syscall_mmap
extern syscall_arch_ctl
func_count equ 3
extern syscall_gettid
func_count equ 4
func_table:
dq syscall_libc_log
dq syscall_mmap
dq syscall_arch_ctl
dq syscall_gettid
section .text
global asm_syscall_entry