mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Kernel: Change Region allocation helpers
We now can create a cacheable Region, so when map() is called, if a Region is cacheable then all the virtual memory space being allocated to it will be marked as not cache disabled. In addition to that, OS components can create a Region that will be mapped to a specific physical address by using the appropriate helper method.
This commit is contained in:
parent
b913e30011
commit
d2b41010c5
7 changed files with 77 additions and 56 deletions
|
@ -74,15 +74,4 @@ PageDirectory::~PageDirectory()
|
|||
#endif
|
||||
InterruptDisabler disabler;
|
||||
cr3_map().remove(cr3());
|
||||
}
|
||||
|
||||
void PageDirectory::flush(VirtualAddress vaddr)
|
||||
{
|
||||
#ifdef MM_DEBUG
|
||||
dbgprintf("MM: Flush page V%p\n", vaddr.get());
|
||||
#endif
|
||||
if (!current)
|
||||
return;
|
||||
if (this == &MM.kernel_page_directory() || ¤t->process().page_directory() == this)
|
||||
MM.flush_tlb(vaddr);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue