1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 09:27:34 +00:00

Kernel/USB: Handle non-page aligned EHCI controller BARs correctly

BARs don't have to be page-aligned. This patch correctly calculates the
needed memory range and register base address in that region.
This commit is contained in:
Sönke Holz 2024-02-18 18:26:42 +01:00 committed by Andreas Kling
parent 9968c9f7a6
commit 06a32b6e16
2 changed files with 10 additions and 6 deletions

View file

@ -36,7 +36,7 @@ public:
virtual ErrorOr<void> submit_async_interrupt_transfer(NonnullLockRefPtr<Transfer>, u16) override { return ENOTSUP; }
private:
EHCIController(PCI::DeviceIdentifier const& pci_device_identifier, NonnullOwnPtr<Memory::Region> register_region);
EHCIController(PCI::DeviceIdentifier const& pci_device_identifier, NonnullOwnPtr<Memory::Region> register_region, VirtualAddress register_base_address);
NonnullOwnPtr<Memory::Region> m_register_region;
CapabilityRegisters const* m_cap_regs;