ladybird/Kernel/PCI
Luke 9ab9e548f4 Kernel/PCI: Create device configuration space mapping before creating a physical ID
When enumerating the hardware using MMIO mode, it would attempt to
create a physical ID first. To create a physical ID, it needs to
retrieve the capabilities of the device.

When enumerating the first device, there would be no device
configuration space mappings. Access::get_capabilities_pointer
calls PCI::read16, which in turn goes to MMIOAccess::read16_field.

MMIOAccess::read16_field attempts to get a device configuration space
and fully expects to get one. However, since this is the first device,
there are none and it crashes with an m_has_value assertion failure.

This fixes this by creating the device configuration space mapping
before creating the physical ID.

Testing with VMware Player 16.1.0.
2020-12-22 09:24:48 +01:00
..
Access.cpp Kernel: Add a method to retrieve the Physical ID for a PCI address 2020-12-21 00:19:21 +01:00
Access.h Kernel: Add a method to retrieve the Physical ID for a PCI address 2020-12-21 00:19:21 +01:00
Definitions.h PCI: Add list of capabilities for each device during first enumeration 2020-12-21 00:19:21 +01:00
Device.cpp Kernel: Use nested Kernel::PCI namespaces more to reduce PCI:: spam 2020-04-08 17:29:37 +02:00
Device.h Kernel: Change get_pci_address() to pci_address() in PCI::Device class 2020-02-24 11:27:03 +01:00
DeviceController.cpp Kernel: Add various methods to handle interrupts in the PCI subsystem 2020-12-21 00:19:21 +01:00
DeviceController.h Kernel: Add various methods to handle interrupts in the PCI subsystem 2020-12-21 00:19:21 +01:00
Initializer.cpp Meta+Kernel: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Initializer.h Kernel: Simplify PCI initialization logic 2020-04-08 17:39:17 +02:00
IOAccess.cpp PCI: Add list of capabilities for each device during first enumeration 2020-12-21 00:19:21 +01:00
IOAccess.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
MMIOAccess.cpp Kernel/PCI: Create device configuration space mapping before creating a physical ID 2020-12-22 09:24:48 +01:00
MMIOAccess.h Kernel: Map PCI devices only once during boot 2020-11-01 10:19:17 +01:00