From 1530a85d5aefcf6497ff2129023e9a0b002603dd Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 4 May 2021 15:30:24 +0200 Subject: Solving many issues: Aligning kernel stack, improve syscall mechanism, DISABLING RED-ZONE !!!! --- src/core/paging.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core/paging.cc') diff --git a/src/core/paging.cc b/src/core/paging.cc index ebd4f9d..ca57c4d 100644 --- a/src/core/paging.cc +++ b/src/core/paging.cc @@ -95,7 +95,7 @@ void paging_deallocate(u64 addr){ } -/// TODO: Debug addess +/// TODO: Debug address void paging_deallocate_pml4(u64* pml4){ for(int i=0;i<512;i++){ u64* pdp=(u64*)PAGE(pml4[i]); @@ -149,7 +149,7 @@ void paging_allocate_addr(u64* pml4_table, u64 virt, u64 phy, u16 options, char u16 pdp=virt>>30&0x1FF; u16 pd=virt>>21&0x1FF; u16 pt=virt>>12&0x1FF; - options&=0xFFF; // Ensure options are on 12bits + options&=0xFFF; // Ensure 12 bits // Solve pdp if(pml4_table[pml4] == 0){ @@ -199,7 +199,6 @@ u64* paging_create_task(int npages){ // Allocate a page for the kernel stack paging_allocate_addr(pml4, (i+1)*4096, (u64)PAGE_ALLOCATE(), PAGING_OPT_DEFAULTS, 0); - // Enable kernel access u16 pml4_entry=kvar_kernel_vma>>39&0x1FF; pml4[pml4_entry]=kpages[0][pml4_entry]; -- cgit v1.2.3