mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
Kernel: Implement {enable,disable}_msix interrupts in PCI Device
Implement enabling and disabling MSIx interrupts for a PCI device. Removes two TODO()s from PCI::Device.cpp :^)
This commit is contained in:
parent
d3bb63afff
commit
bf7ac06d7b
2 changed files with 12 additions and 2 deletions
|
@ -44,13 +44,21 @@ void Device::disable_message_signalled_interrupts()
|
|||
{
|
||||
TODO();
|
||||
}
|
||||
|
||||
void Device::enable_extended_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
for (auto& capability : m_pci_identifier->capabilities()) {
|
||||
if (capability.id().value() == PCI::Capabilities::ID::MSIX)
|
||||
capability.write16(msi_control_offset, capability.read16(msi_control_offset) | msix_control_enable);
|
||||
}
|
||||
}
|
||||
|
||||
void Device::disable_extended_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
for (auto& capability : m_pci_identifier->capabilities()) {
|
||||
if (capability.id().value() == PCI::Capabilities::ID::MSIX)
|
||||
capability.write16(msi_control_offset, capability.read16(msi_control_offset) & ~(msix_control_enable));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue