mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
APIC: Enable APIC and start APs
This commit is contained in:
parent
4c8341d080
commit
00a7c48d6e
8 changed files with 263 additions and 2 deletions
|
@ -622,13 +622,14 @@ void MemoryManager::flush_tlb(VirtualAddress vaddr)
|
|||
: "memory");
|
||||
}
|
||||
|
||||
void MemoryManager::map_for_kernel(VirtualAddress vaddr, PhysicalAddress paddr)
|
||||
void MemoryManager::map_for_kernel(VirtualAddress vaddr, PhysicalAddress paddr, bool cache_disabled)
|
||||
{
|
||||
auto& pte = ensure_pte(kernel_page_directory(), vaddr);
|
||||
pte.set_physical_page_base(paddr.get());
|
||||
pte.set_present(true);
|
||||
pte.set_writable(true);
|
||||
pte.set_user_allowed(false);
|
||||
pte.set_cache_disabled(cache_disabled);
|
||||
flush_tlb(vaddr);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
void remap_region(PageDirectory&, Region&);
|
||||
|
||||
void map_for_kernel(VirtualAddress, PhysicalAddress);
|
||||
void map_for_kernel(VirtualAddress, PhysicalAddress, bool cache_disabled = false);
|
||||
|
||||
OwnPtr<Region> allocate_kernel_region(size_t, const StringView& name, bool user_accessible = false, bool should_commit = true);
|
||||
OwnPtr<Region> allocate_user_accessible_kernel_region(size_t, const StringView& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue