Revert "Kernel: Don't clone kernel mappings for bottom 2 MiB VM into processes"
This reverts commit da7b21dc06
.
This broke SMP boot, oops! :^)
This commit is contained in:
parent
da7b21dc06
commit
1320b9351e
Notes:
sideshowbarker
2024-07-18 22:41:49 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1320b9351ec
1 changed files with 7 additions and 0 deletions
|
@ -135,6 +135,13 @@ PageDirectory::PageDirectory(Process& process, const RangeAllocator* parent_rang
|
|||
MM.unquickmap_page();
|
||||
}
|
||||
|
||||
// Clone bottom 2 MiB of mappings from kernel_page_directory
|
||||
PageDirectoryEntry buffer;
|
||||
auto* kernel_pd = MM.quickmap_pd(MM.kernel_page_directory(), 0);
|
||||
memcpy(&buffer, kernel_pd, sizeof(PageDirectoryEntry));
|
||||
auto* new_pd = MM.quickmap_pd(*this, 0);
|
||||
memcpy(new_pd, &buffer, sizeof(PageDirectoryEntry));
|
||||
|
||||
// If we got here, we successfully created it. Set m_process now
|
||||
m_process = &process;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue