mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
Kernel: Remove map_for_kernel() in MemoryManager
We don't need to have this method anymore. It was a hack that was used in many components in the system but currently we use better methods to create virtual memory mappings. To prevent any further use of this method it's best to just remove it completely. Also, the APIC code is disabled for now since it doesn't help booting the system, and is broken since it relies on identity mapping to exist in the first 1MB. Any call to the APIC code will result in assertion failed. In addition to that, the name of the method which is responsible to create an identity mapping between 1MB to 2MB was changed, to be more precise about its purpose.
This commit is contained in:
parent
60c32f44dd
commit
200a5b0649
4 changed files with 7 additions and 22 deletions
|
@ -156,6 +156,8 @@ extern "C" u16 apic_ap_start_size;
|
|||
|
||||
bool init()
|
||||
{
|
||||
// FIXME: This code is broken and therefore isn't called. Please map everything correctly before calling this code.
|
||||
ASSERT_NOT_REACHED();
|
||||
if (!MSR::have())
|
||||
return false;
|
||||
|
||||
|
@ -168,9 +170,8 @@ bool init()
|
|||
kprintf("Initializing APIC, base: P%x\n", apic_base);
|
||||
set_base(apic_base);
|
||||
|
||||
MM.map_for_kernel(VirtualAddress(apic_base.get()), apic_base, true); // Map memory, disable cache!
|
||||
g_apic_base = apic_base.as_ptr();
|
||||
|
||||
|
||||
// copy ap init code to P8000
|
||||
memcpy(reinterpret_cast<u8*>(0x8000), reinterpret_cast<const u8*>(apic_ap_start), apic_ap_start_size);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue