mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
PCI: Adopt changes in ACPI definitions file
This commit is contained in:
parent
b9c65ea746
commit
f96cf250f9
Notes:
sideshowbarker
2024-07-19 08:58:28 +09:00
Author: https://github.com/supercomputer7
Commit: f96cf250f9
Pull-request: https://github.com/SerenityOS/serenity/pull/1323
Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 6 deletions
|
@ -106,7 +106,7 @@ PCI::Initializer::Initializer()
|
|||
}
|
||||
bool PCI::Initializer::test_acpi()
|
||||
{
|
||||
if ((KParams::the().has("noacpi")) || !ACPIParser::the().is_operable())
|
||||
if ((KParams::the().has("noacpi")) || !ACPI::Parser::the().is_operable())
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
@ -129,12 +129,12 @@ bool PCI::Initializer::test_pci_io()
|
|||
|
||||
bool PCI::Initializer::test_pci_mmio()
|
||||
{
|
||||
return !ACPIParser::the().find_table("MCFG").is_null();
|
||||
return !ACPI::Parser::the().find_table("MCFG").is_null();
|
||||
}
|
||||
|
||||
void PCI::Initializer::initialize_pci_mmio_access_after_test()
|
||||
{
|
||||
initialize_pci_mmio_access(ACPIParser::the().find_table("MCFG"));
|
||||
initialize_pci_mmio_access(ACPI::Parser::the().find_table("MCFG"));
|
||||
}
|
||||
|
||||
void PCI::Initializer::dismiss()
|
||||
|
|
|
@ -66,7 +66,7 @@ PCI::MMIOAccess::MMIOAccess(PhysicalAddress p_mcfg)
|
|||
dbg() << "PCI: Checking MCFG Table length to choose the correct mapping size";
|
||||
#endif
|
||||
|
||||
ACPI_RAW::SDTHeader* sdt = (ACPI_RAW::SDTHeader*)checkup_region->vaddr().offset(p_mcfg.offset_in_page().get()).as_ptr();
|
||||
auto* sdt = (ACPI::Structures::SDTHeader*)checkup_region->vaddr().offset(p_mcfg.offset_in_page().get()).as_ptr();
|
||||
u32 length = sdt->length;
|
||||
u8 revision = sdt->revision;
|
||||
|
||||
|
@ -75,12 +75,12 @@ PCI::MMIOAccess::MMIOAccess(PhysicalAddress p_mcfg)
|
|||
|
||||
auto mcfg_region = MM.allocate_kernel_region(p_mcfg.page_base(), PAGE_ROUND_UP(length) + PAGE_SIZE, "PCI Parsing MCFG", Region::Access::Read | Region::Access::Write);
|
||||
|
||||
auto& mcfg = *(ACPI_RAW::MCFG*)mcfg_region->vaddr().offset(p_mcfg.offset_in_page().get()).as_ptr();
|
||||
auto& mcfg = *(ACPI::Structures::MCFG*)mcfg_region->vaddr().offset(p_mcfg.offset_in_page().get()).as_ptr();
|
||||
#ifdef PCI_DEBUG
|
||||
dbg() << "PCI: Checking MCFG @ V " << &mcfg << ", P 0x" << String::format("%x", p_mcfg.get());
|
||||
#endif
|
||||
|
||||
for (u32 index = 0; index < ((mcfg.header.length - sizeof(ACPI_RAW::MCFG)) / sizeof(ACPI_RAW::PCI_MMIO_Descriptor)); index++) {
|
||||
for (u32 index = 0; index < ((mcfg.header.length - sizeof(ACPI::Structures::MCFG)) / sizeof(ACPI::Structures::PCI_MMIO_Descriptor)); index++) {
|
||||
u8 start_bus = mcfg.descriptors[index].start_pci_bus;
|
||||
u8 end_bus = mcfg.descriptors[index].end_pci_bus;
|
||||
u32 lower_addr = mcfg.descriptors[index].base_addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue