mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 06:28:22 +00:00
gettid syscall, fix issues with vmm and mmap syscall
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user