mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:47:35 +00:00
Kernel: Simplify scanning BIOS/EBDA and MP parser initialization
Add a MappedROM::find_chunk_starting_with() helper since that's a very common usage pattern in clients of this code. Also convert MultiProcessorParser from a persistent singleton object to a temporary object constructed via a failable factory function.
This commit is contained in:
parent
84b7bc5e14
commit
4b847810bf
8 changed files with 47 additions and 101 deletions
|
@ -189,25 +189,21 @@ struct [[gnu::packed]] CompatibilityBusAddressSpaceModifierEntry
|
|||
|
||||
class PCIInterruptOverrideMetadata;
|
||||
|
||||
class MultiProcessorParser {
|
||||
class MultiProcessorParser final {
|
||||
public:
|
||||
static MultiProcessorParser& the();
|
||||
static OwnPtr<MultiProcessorParser> autodetect();
|
||||
|
||||
static bool is_initialized();
|
||||
static void initialize();
|
||||
Vector<PCIInterruptOverrideMetadata> get_pci_interrupt_redirections();
|
||||
|
||||
protected:
|
||||
MultiProcessorParser();
|
||||
private:
|
||||
explicit MultiProcessorParser(PhysicalAddress floating_pointer);
|
||||
|
||||
void parse_configuration_table();
|
||||
void parse_floating_pointer_data();
|
||||
|
||||
Vector<u8> get_pci_bus_ids() const;
|
||||
|
||||
PhysicalAddress search_floating_pointer();
|
||||
PhysicalAddress search_floating_pointer_in_ebda();
|
||||
PhysicalAddress search_floating_pointer_in_bios_area();
|
||||
static Optional<PhysicalAddress> find_floating_pointer();
|
||||
|
||||
PhysicalAddress m_floating_pointer;
|
||||
PhysicalAddress m_configuration_table;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue