1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Kernel: Clean up and simplify MP table parsing

Use map_typed<T> to map physically addressed structs into kernel VM.
This is so much easier than doing address arithmetic everywhere. :^)
This commit is contained in:
Andreas Kling 2020-05-22 12:01:01 +02:00
parent c35732c011
commit 6b5d2afd00
2 changed files with 47 additions and 76 deletions

View file

@ -27,8 +27,8 @@
#pragma once
#include <AK/Types.h>
#include <Kernel/VM/Region.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/VM/Region.h>
#include <Kernel/VirtualAddress.h>
namespace Kernel {
@ -201,22 +201,17 @@ protected:
MultiProcessorParser();
void parse_configuration_table();
size_t get_configuration_table_length();
void parse_floating_pointer_data();
Vector<unsigned> get_pci_bus_ids();
Vector<u8> get_pci_bus_ids() const;
FlatPtr search_floating_pointer();
FlatPtr search_floating_pointer_in_ebda(u16 ebda_segment);
FlatPtr search_floating_pointer_in_bios_area();
PhysicalAddress search_floating_pointer();
PhysicalAddress search_floating_pointer_in_ebda(u16 ebda_segment);
PhysicalAddress search_floating_pointer_in_bios_area();
FlatPtr m_floating_pointer;
FlatPtr m_configuration_table;
Vector<FlatPtr> m_io_interrupt_redirection_entries;
Vector<FlatPtr> m_bus_entries;
bool m_operable;
size_t m_configuration_table_length;
u8 m_specification_revision;
PhysicalAddress m_floating_pointer;
PhysicalAddress m_configuration_table;
Vector<MultiProcessor::IOInterruptAssignmentEntry> m_io_interrupt_assignment_entries;
Vector<MultiProcessor::BusEntry> m_bus_entries;
};
}