mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
Kernel: Implement {enable,disable}_msi interrupts in PCI Device
Implement enabling and disabling MSI interrupts for a PCI device. Removes two more TODO()s from PCI::Device.cpp :^)
This commit is contained in:
parent
1bc2c5c110
commit
35a844ac75
2 changed files with 9 additions and 2 deletions
|
@ -41,11 +41,17 @@ void Device::disable_pin_based_interrupts() const
|
|||
|
||||
void Device::enable_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
for (auto& capability : m_pci_identifier->capabilities()) {
|
||||
if (capability.id().value() == PCI::Capabilities::ID::MSI)
|
||||
capability.write16(msi_control_offset, capability.read16(msi_control_offset) | msi_control_enable);
|
||||
}
|
||||
}
|
||||
void Device::disable_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
for (auto& capability : m_pci_identifier->capabilities()) {
|
||||
if (capability.id().value() == PCI::Capabilities::ID::MSI)
|
||||
capability.write16(msi_control_offset, capability.read16(msi_control_offset) & ~(msi_control_enable));
|
||||
}
|
||||
}
|
||||
|
||||
void Device::enable_extended_message_signalled_interrupts()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue