mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +00:00
Kernel/PCI: Move the PCI components as a subfolder to the Bus directory
This commit is contained in:
parent
26e9140ea1
commit
6568bb47cb
Notes:
sideshowbarker
2024-07-18 11:08:21 +09:00
Author: https://github.com/supercomputer7
Commit: 6568bb47cb
Pull-request: https://github.com/SerenityOS/serenity/pull/8241
Issue: https://github.com/SerenityOS/serenity/issues/6948
Issue: https://github.com/SerenityOS/serenity/issues/7445
Issue: https://github.com/SerenityOS/serenity/issues/8331
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/awesomekling
43 changed files with 60 additions and 60 deletions
61
Kernel/Bus/PCI/DeviceController.cpp
Normal file
61
Kernel/Bus/PCI/DeviceController.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/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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue