cow
This commit is contained in:
@@ -160,7 +160,7 @@ void* getFreeVirtSpace(four_lvl_paging_t* search_table, uint8_t num_pages){
|
||||
}
|
||||
|
||||
|
||||
void setMapping(uintptr_t vaddr, void* frame, four_lvl_paging_t* flpt){
|
||||
void setMapping(uintptr_t vaddr, void* frame, four_lvl_paging_t* flpt, uint8_t writeable){
|
||||
uint16_t l4Index = (vaddr>>39) & 0x1FF;
|
||||
uint16_t l3Index = (vaddr>>30) & 0x1FF;
|
||||
uint16_t l2Index = (vaddr>>21) & 0x1FF;
|
||||
@@ -207,7 +207,7 @@ void setMapping(uintptr_t vaddr, void* frame, four_lvl_paging_t* flpt){
|
||||
assert(!(lvl1->entries[l1Index].present)); // should not be present, bc its a new mapping
|
||||
lvl1->entries[l1Index] = {
|
||||
.present = 1,
|
||||
.write = 1,
|
||||
.write = writeable,
|
||||
.user = 1,
|
||||
.address = (uintptr_t)frame >> 12
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user