mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
Kernel: Rename PCI::DeviceController => PCI::Device
Now that the old PCI::Device was removed, we can complete the PCI changes by making the PCI::DeviceController to be named PCI::Device. Really the entire purpose and the distinction between the two was about interrupts, but since this is no longer a problem, just rename it to simplify things further.
This commit is contained in:
parent
7b9c3439ec
commit
aacb1f0bf4
30 changed files with 50 additions and 54 deletions
61
Kernel/Bus/PCI/Device.cpp
Normal file
61
Kernel/Bus/PCI/Device.cpp
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Bus/PCI/Device.h>
|
||||
|
||||
namespace Kernel {
|
||||
namespace PCI {
|
||||
|
||||
Device::Device(Address address)
|
||||
: m_pci_address(address)
|
||||
{
|
||||
}
|
||||
|
||||
bool Device::is_msi_capable() const
|
||||
{
|
||||
for (const auto& capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
||||
if (capability.id() == PCI_CAPABILITY_MSI)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool Device::is_msix_capable() const
|
||||
{
|
||||
for (const auto& capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
||||
if (capability.id() == PCI_CAPABILITY_MSIX)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Device::enable_pin_based_interrupts() const
|
||||
{
|
||||
PCI::enable_interrupt_line(pci_address());
|
||||
}
|
||||
void Device::disable_pin_based_interrupts() const
|
||||
{
|
||||
PCI::disable_interrupt_line(pci_address());
|
||||
}
|
||||
|
||||
void Device::enable_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
void Device::disable_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
void Device::enable_extended_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
void Device::disable_extended_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue