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

Kernel: Add MSI support in PCI Device

Extend reserve_irqs, allocate_irq, enable_interrupt and
disable_interrupt API to add MSI support in PCI device.

The current changes only implement single MSI message support.
TODOs have been added to support Multiple MSI Message (MME) support in
the future.
This commit is contained in:
Pankaj Raghav 2023-05-08 21:29:37 +02:00 committed by Jelle Raaijmakers
parent 35a844ac75
commit 8f62e62cfe
2 changed files with 34 additions and 4 deletions

View file

@ -81,6 +81,9 @@ static constexpr size_t memory_range_per_bus = mmio_device_space_size * to_under
static constexpr u32 bar_address_mask = 0xfffffff0;
static constexpr u8 msi_control_offset = 2;
static constexpr u16 msi_control_enable = 0x0001;
static constexpr u8 msi_address_low_offset = 4;
static constexpr u8 msi_address_high_or_data_offset = 8;
static constexpr u8 msi_data_offset = 0xc;
static constexpr u16 msi_address_format_mask = 0x80;
static constexpr u8 msi_mmc_format_mask = 0xe;
static constexpr u16 msix_control_table_mask = 0x07ff;