mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +00:00
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <Kernel/PCI/DeviceController.h>
|
|
|
|
namespace Kernel {
|
|
namespace PCI {
|
|
|
|
DeviceController::DeviceController(Address address)
|
|
: m_pci_address(address)
|
|
{
|
|
}
|
|
|
|
bool DeviceController::is_msi_capable() const
|
|
{
|
|
for (auto capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
|
if (capability.id() == PCI_CAPABILITY_MSI)
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
bool DeviceController::is_msix_capable() const
|
|
{
|
|
for (auto capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
|
if (capability.id() == PCI_CAPABILITY_MSIX)
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void DeviceController::enable_pin_based_interrupts() const
|
|
{
|
|
PCI::enable_interrupt_line(pci_address());
|
|
}
|
|
void DeviceController::disable_pin_based_interrupts() const
|
|
{
|
|
PCI::disable_interrupt_line(pci_address());
|
|
}
|
|
|
|
void DeviceController::enable_message_signalled_interrupts()
|
|
{
|
|
TODO();
|
|
}
|
|
void DeviceController::disable_message_signalled_interrupts()
|
|
{
|
|
TODO();
|
|
}
|
|
void DeviceController::enable_extended_message_signalled_interrupts()
|
|
{
|
|
TODO();
|
|
}
|
|
void DeviceController::disable_extended_message_signalled_interrupts()
|
|
{
|
|
TODO();
|
|
}
|
|
|
|
}
|
|
}
|