aboutsummaryrefslogtreecommitdiff
path: root/src/core/paging.cc
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-05-04 15:30:24 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-05-04 15:30:24 +0200
commit1530a85d5aefcf6497ff2129023e9a0b002603dd (patch)
treeea6098d0dcafabba0ffc2f28ea5c136f731996b9 /src/core/paging.cc
parent64a17f3e0683a0a492a3fed9c4c17a4335d1f421 (diff)
Solving many issues: Aligning kernel stack, improve syscall mechanism,
DISABLING RED-ZONE !!!!
Diffstat (limited to 'src/core/paging.cc')
-rw-r--r--src/core/paging.cc5
1 files changed, 2 insertions, 3 deletions
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];