mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:57:34 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -26,7 +26,7 @@ u8 MemoryBackedHostBridge::read8_field(BusNumber bus, DeviceNumber device, Funct
|
|||
{
|
||||
VERIFY(Access::the().access_lock().is_locked());
|
||||
VERIFY(field <= 0xfff);
|
||||
return *((volatile u8*)(get_device_configuration_memory_mapped_space(bus, device, function).get() + (field & 0xfff)));
|
||||
return *((u8 volatile*)(get_device_configuration_memory_mapped_space(bus, device, function).get() + (field & 0xfff)));
|
||||
}
|
||||
u16 MemoryBackedHostBridge::read16_field(BusNumber bus, DeviceNumber device, FunctionNumber function, u32 field)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ void MemoryBackedHostBridge::write8_field(BusNumber bus, DeviceNumber device, Fu
|
|||
{
|
||||
VERIFY(Access::the().access_lock().is_locked());
|
||||
VERIFY(field <= 0xfff);
|
||||
*((volatile u8*)(get_device_configuration_memory_mapped_space(bus, device, function).get() + (field & 0xfff))) = value;
|
||||
*((u8 volatile*)(get_device_configuration_memory_mapped_space(bus, device, function).get() + (field & 0xfff))) = value;
|
||||
}
|
||||
void MemoryBackedHostBridge::write16_field(BusNumber bus, DeviceNumber device, FunctionNumber function, u32 field, u16 value)
|
||||
{
|
||||
|
|
|
@ -115,11 +115,11 @@ struct HardwareID {
|
|||
|
||||
bool is_null() const { return !vendor_id && !device_id; }
|
||||
|
||||
bool operator==(const HardwareID& other) const
|
||||
bool operator==(HardwareID const& other) const
|
||||
{
|
||||
return vendor_id == other.vendor_id && device_id == other.device_id;
|
||||
}
|
||||
bool operator!=(const HardwareID& other) const
|
||||
bool operator!=(HardwareID const& other) const
|
||||
{
|
||||
return vendor_id != other.vendor_id || device_id != other.device_id;
|
||||
}
|
||||
|
@ -162,24 +162,24 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Address(const Address& address) = default;
|
||||
Address(Address const& address) = default;
|
||||
|
||||
bool is_null() const { return !m_bus && !m_device && !m_function; }
|
||||
operator bool() const { return !is_null(); }
|
||||
|
||||
// Disable default implementations that would use surprising integer promotion.
|
||||
bool operator<=(const Address&) const = delete;
|
||||
bool operator>=(const Address&) const = delete;
|
||||
bool operator<(const Address&) const = delete;
|
||||
bool operator>(const Address&) const = delete;
|
||||
bool operator<=(Address const&) const = delete;
|
||||
bool operator>=(Address const&) const = delete;
|
||||
bool operator<(Address const&) const = delete;
|
||||
bool operator>(Address const&) const = delete;
|
||||
|
||||
bool operator==(const Address& other) const
|
||||
bool operator==(Address const& other) const
|
||||
{
|
||||
if (this == &other)
|
||||
return true;
|
||||
return m_domain == other.m_domain && m_bus == other.m_bus && m_device == other.m_device && m_function == other.m_function;
|
||||
}
|
||||
bool operator!=(const Address& other) const
|
||||
bool operator!=(Address const& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ private:
|
|||
|
||||
class Capability {
|
||||
public:
|
||||
Capability(const Address& address, u8 id, u8 ptr)
|
||||
Capability(Address const& address, u8 id, u8 ptr)
|
||||
: m_address(address)
|
||||
, m_id(id)
|
||||
, m_ptr(ptr)
|
||||
|
@ -246,7 +246,7 @@ public:
|
|||
, m_capabilities(capabilities)
|
||||
{
|
||||
if constexpr (PCI_DEBUG) {
|
||||
for (const auto& capability : capabilities)
|
||||
for (auto const& capability : capabilities)
|
||||
dbgln("{} has capability {}", address, capability.id());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
|
||||
namespace Kernel::PCI {
|
||||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<PCIDeviceSysFSDirectory> PCIDeviceSysFSDirectory::create(const SysFSDirectory& parent_directory, Address address)
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<PCIDeviceSysFSDirectory> PCIDeviceSysFSDirectory::create(SysFSDirectory const& parent_directory, Address address)
|
||||
{
|
||||
// FIXME: Handle allocation failure gracefully
|
||||
auto device_name = MUST(KString::formatted("{:04x}:{:02x}:{:02x}.{}", address.domain(), address.bus(), address.device(), address.function()));
|
||||
return adopt_ref(*new (nothrow) PCIDeviceSysFSDirectory(move(device_name), parent_directory, address));
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT PCIDeviceSysFSDirectory::PCIDeviceSysFSDirectory(NonnullOwnPtr<KString> device_directory_name, const SysFSDirectory& parent_directory, Address address)
|
||||
UNMAP_AFTER_INIT PCIDeviceSysFSDirectory::PCIDeviceSysFSDirectory(NonnullOwnPtr<KString> device_directory_name, SysFSDirectory const& parent_directory, Address address)
|
||||
: SysFSDirectory(parent_directory)
|
||||
, m_address(address)
|
||||
, m_device_directory_name(move(device_directory_name))
|
||||
|
@ -92,12 +92,12 @@ StringView PCIDeviceAttributeSysFSComponent::name() const
|
|||
}
|
||||
}
|
||||
|
||||
NonnullRefPtr<PCIDeviceAttributeSysFSComponent> PCIDeviceAttributeSysFSComponent::create(const PCIDeviceSysFSDirectory& device, PCI::RegisterOffset offset, size_t field_bytes_width)
|
||||
NonnullRefPtr<PCIDeviceAttributeSysFSComponent> PCIDeviceAttributeSysFSComponent::create(PCIDeviceSysFSDirectory const& device, PCI::RegisterOffset offset, size_t field_bytes_width)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) PCIDeviceAttributeSysFSComponent(device, offset, field_bytes_width));
|
||||
}
|
||||
|
||||
PCIDeviceAttributeSysFSComponent::PCIDeviceAttributeSysFSComponent(const PCIDeviceSysFSDirectory& device, PCI::RegisterOffset offset, size_t field_bytes_width)
|
||||
PCIDeviceAttributeSysFSComponent::PCIDeviceAttributeSysFSComponent(PCIDeviceSysFSDirectory const& device, PCI::RegisterOffset offset, size_t field_bytes_width)
|
||||
: SysFSComponent()
|
||||
, m_device(device)
|
||||
, m_offset(offset)
|
||||
|
|
|
@ -23,13 +23,13 @@ private:
|
|||
|
||||
class PCIDeviceSysFSDirectory final : public SysFSDirectory {
|
||||
public:
|
||||
static NonnullRefPtr<PCIDeviceSysFSDirectory> create(const SysFSDirectory&, Address);
|
||||
const Address& address() const { return m_address; }
|
||||
static NonnullRefPtr<PCIDeviceSysFSDirectory> create(SysFSDirectory const&, Address);
|
||||
Address const& address() const { return m_address; }
|
||||
|
||||
virtual StringView name() const override { return m_device_directory_name->view(); }
|
||||
|
||||
private:
|
||||
PCIDeviceSysFSDirectory(NonnullOwnPtr<KString> device_directory_name, const SysFSDirectory&, Address);
|
||||
PCIDeviceSysFSDirectory(NonnullOwnPtr<KString> device_directory_name, SysFSDirectory const&, Address);
|
||||
|
||||
Address m_address;
|
||||
|
||||
|
@ -38,7 +38,7 @@ private:
|
|||
|
||||
class PCIDeviceAttributeSysFSComponent : public SysFSComponent {
|
||||
public:
|
||||
static NonnullRefPtr<PCIDeviceAttributeSysFSComponent> create(const PCIDeviceSysFSDirectory& device, PCI::RegisterOffset offset, size_t field_bytes_width);
|
||||
static NonnullRefPtr<PCIDeviceAttributeSysFSComponent> create(PCIDeviceSysFSDirectory const& device, PCI::RegisterOffset offset, size_t field_bytes_width);
|
||||
|
||||
virtual ErrorOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, OpenFileDescription*) const override;
|
||||
virtual ~PCIDeviceAttributeSysFSComponent() {};
|
||||
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
protected:
|
||||
ErrorOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const;
|
||||
PCIDeviceAttributeSysFSComponent(const PCIDeviceSysFSDirectory& device, PCI::RegisterOffset offset, size_t field_bytes_width);
|
||||
PCIDeviceAttributeSysFSComponent(PCIDeviceSysFSDirectory const& device, PCI::RegisterOffset offset, size_t field_bytes_width);
|
||||
NonnullRefPtr<PCIDeviceSysFSDirectory> m_device;
|
||||
PCI::RegisterOffset m_offset;
|
||||
size_t m_field_bytes_width;
|
||||
|
|
|
@ -476,7 +476,7 @@ ErrorOr<void> UHCIController::spawn_port_process()
|
|||
return {};
|
||||
}
|
||||
|
||||
bool UHCIController::handle_irq(const RegisterState&)
|
||||
bool UHCIController::handle_irq(RegisterState const&)
|
||||
{
|
||||
u32 status = read_usbsts();
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ private:
|
|||
void write_portsc1(u16 value) { m_io_base.offset(0x10).out(value); }
|
||||
void write_portsc2(u16 value) { m_io_base.offset(0x12).out(value); }
|
||||
|
||||
virtual bool handle_irq(const RegisterState&) override;
|
||||
virtual bool handle_irq(RegisterState const&) override;
|
||||
|
||||
ErrorOr<void> create_structures();
|
||||
void setup_schedule();
|
||||
|
|
|
@ -185,11 +185,11 @@ struct alignas(16) TransferDescriptor final {
|
|||
|
||||
// FIXME: For the love of God, use AK SMART POINTERS PLEASE!!
|
||||
TransferDescriptor* next_td() { return m_next_td; }
|
||||
const TransferDescriptor* next_td() const { return m_next_td; }
|
||||
TransferDescriptor const* next_td() const { return m_next_td; }
|
||||
void set_next_td(TransferDescriptor* td) { m_next_td = td; }
|
||||
|
||||
TransferDescriptor* prev_td() { return m_prev_td; }
|
||||
const TransferDescriptor* prev_td() const { return m_prev_td; }
|
||||
TransferDescriptor const* prev_td() const { return m_prev_td; }
|
||||
void set_previous_td(TransferDescriptor* td) { m_prev_td = td; }
|
||||
|
||||
void insert_next_transfer_descriptor(TransferDescriptor* td)
|
||||
|
@ -274,11 +274,11 @@ struct alignas(16) QueueHead {
|
|||
|
||||
// FIXME: For the love of God, use AK SMART POINTERS PLEASE!!
|
||||
QueueHead* next_qh() { return m_next_qh; }
|
||||
const QueueHead* next_qh() const { return m_next_qh; }
|
||||
QueueHead const* next_qh() const { return m_next_qh; }
|
||||
void set_next_qh(QueueHead* qh) { m_next_qh = qh; }
|
||||
|
||||
QueueHead* prev_qh() { return m_prev_qh; }
|
||||
const QueueHead* prev_qh() const { return m_prev_qh; }
|
||||
QueueHead const* prev_qh() const { return m_prev_qh; }
|
||||
void set_previous_qh(QueueHead* qh)
|
||||
{
|
||||
m_prev_qh = qh;
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
u8 address() const { return m_address; }
|
||||
|
||||
const USBDeviceDescriptor& device_descriptor() const { return m_device_descriptor; }
|
||||
USBDeviceDescriptor const& device_descriptor() const { return m_device_descriptor; }
|
||||
|
||||
USBController& controller() { return *m_controller; }
|
||||
USBController const& controller() const { return *m_controller; }
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
static constexpr u8 ENDPOINT_ATTRIBUTES_ISO_MODE_SYNC_TYPE = 0x0c;
|
||||
static constexpr u8 ENDPOINT_ATTRIBUTES_ISO_MODE_USAGE_TYPE = 0x30;
|
||||
|
||||
const USBEndpointDescriptor& descriptor() const { return m_descriptor; }
|
||||
USBEndpointDescriptor const& descriptor() const { return m_descriptor; }
|
||||
|
||||
bool is_control() const { return (m_descriptor.endpoint_attributes_bitmap & ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_MASK) == ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_CONTROL; }
|
||||
bool is_isochronous() const { return (m_descriptor.endpoint_attributes_bitmap & ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_MASK) == ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_ISOCHRONOUS; }
|
||||
|
|
|
@ -26,7 +26,7 @@ Transfer::Transfer(Pipe& pipe, u16 len, NonnullOwnPtr<Memory::Region> data_buffe
|
|||
|
||||
Transfer::~Transfer() = default;
|
||||
|
||||
void Transfer::set_setup_packet(const USBRequestData& request)
|
||||
void Transfer::set_setup_packet(USBRequestData const& request)
|
||||
{
|
||||
// Kind of a nasty hack... Because the kernel isn't in the business
|
||||
// of handing out physical pointers that we can directly write to,
|
||||
|
|
|
@ -24,13 +24,13 @@ public:
|
|||
Transfer() = delete;
|
||||
~Transfer();
|
||||
|
||||
void set_setup_packet(const USBRequestData& request);
|
||||
void set_setup_packet(USBRequestData const& request);
|
||||
void set_complete() { m_complete = true; }
|
||||
void set_error_occurred() { m_error_occurred = true; }
|
||||
|
||||
// `const` here makes sure we don't blow up by writing to a physical address
|
||||
const USBRequestData& request() const { return m_request; }
|
||||
const Pipe& pipe() const { return m_pipe; }
|
||||
USBRequestData const& request() const { return m_request; }
|
||||
Pipe const& pipe() const { return m_pipe; }
|
||||
Pipe& pipe() { return m_pipe; }
|
||||
VirtualAddress buffer() const { return m_data_buffer->vaddr(); }
|
||||
PhysicalAddress buffer_physical() const { return m_data_buffer->physical_page(0)->paddr(); }
|
||||
|
|
|
@ -92,7 +92,7 @@ void ConsolePort::handle_queue_update(Badge<VirtIO::Console>, u16 queue_index)
|
|||
}
|
||||
}
|
||||
|
||||
bool ConsolePort::can_read(const OpenFileDescription&, u64) const
|
||||
bool ConsolePort::can_read(OpenFileDescription const&, u64) const
|
||||
{
|
||||
return m_receive_buffer->used_bytes() > 0;
|
||||
}
|
||||
|
@ -122,12 +122,12 @@ ErrorOr<size_t> ConsolePort::read(OpenFileDescription& desc, u64, UserOrKernelBu
|
|||
return bytes_copied;
|
||||
}
|
||||
|
||||
bool ConsolePort::can_write(const OpenFileDescription&, u64) const
|
||||
bool ConsolePort::can_write(OpenFileDescription const&, u64) const
|
||||
{
|
||||
return m_console.get_queue(m_transmit_queue).has_free_slots() && m_transmit_buffer->has_space();
|
||||
}
|
||||
|
||||
ErrorOr<size_t> ConsolePort::write(OpenFileDescription& desc, u64, const UserOrKernelBuffer& data, size_t size)
|
||||
ErrorOr<size_t> ConsolePort::write(OpenFileDescription& desc, u64, UserOrKernelBuffer const& data, size_t size)
|
||||
{
|
||||
if (!size)
|
||||
return 0;
|
||||
|
|
|
@ -40,10 +40,10 @@ private:
|
|||
|
||||
virtual StringView class_name() const override { return "VirtIOConsolePort"sv; }
|
||||
|
||||
virtual bool can_read(const OpenFileDescription&, u64) const override;
|
||||
virtual bool can_read(OpenFileDescription const&, u64) const override;
|
||||
virtual ErrorOr<size_t> read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override;
|
||||
virtual bool can_write(const OpenFileDescription&, u64) const override;
|
||||
virtual ErrorOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
|
||||
virtual bool can_write(OpenFileDescription const&, u64) const override;
|
||||
virtual ErrorOr<size_t> write(OpenFileDescription&, u64, UserOrKernelBuffer const&, size_t) override;
|
||||
virtual ErrorOr<NonnullRefPtr<OpenFileDescription>> open(int options) override;
|
||||
|
||||
static unsigned next_device_id;
|
||||
|
|
|
@ -179,37 +179,37 @@ void Device::notify_queue(u16 queue_index)
|
|||
config_write16(*m_notify_cfg, get_queue(queue_index).notify_offset() * m_notify_multiplier, queue_index);
|
||||
}
|
||||
|
||||
u8 Device::config_read8(const Configuration& config, u32 offset)
|
||||
u8 Device::config_read8(Configuration const& config, u32 offset)
|
||||
{
|
||||
return mapping_for_bar(config.bar).read<u8>(config.offset + offset);
|
||||
}
|
||||
|
||||
u16 Device::config_read16(const Configuration& config, u32 offset)
|
||||
u16 Device::config_read16(Configuration const& config, u32 offset)
|
||||
{
|
||||
return mapping_for_bar(config.bar).read<u16>(config.offset + offset);
|
||||
}
|
||||
|
||||
u32 Device::config_read32(const Configuration& config, u32 offset)
|
||||
u32 Device::config_read32(Configuration const& config, u32 offset)
|
||||
{
|
||||
return mapping_for_bar(config.bar).read<u32>(config.offset + offset);
|
||||
}
|
||||
|
||||
void Device::config_write8(const Configuration& config, u32 offset, u8 value)
|
||||
void Device::config_write8(Configuration const& config, u32 offset, u8 value)
|
||||
{
|
||||
mapping_for_bar(config.bar).write(config.offset + offset, value);
|
||||
}
|
||||
|
||||
void Device::config_write16(const Configuration& config, u32 offset, u16 value)
|
||||
void Device::config_write16(Configuration const& config, u32 offset, u16 value)
|
||||
{
|
||||
mapping_for_bar(config.bar).write(config.offset + offset, value);
|
||||
}
|
||||
|
||||
void Device::config_write32(const Configuration& config, u32 offset, u32 value)
|
||||
void Device::config_write32(Configuration const& config, u32 offset, u32 value)
|
||||
{
|
||||
mapping_for_bar(config.bar).write(config.offset + offset, value);
|
||||
}
|
||||
|
||||
void Device::config_write64(const Configuration& config, u32 offset, u64 value)
|
||||
void Device::config_write64(Configuration const& config, u32 offset, u64 value)
|
||||
{
|
||||
mapping_for_bar(config.bar).write(config.offset + offset, value);
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ u8 Device::isr_status()
|
|||
return config_read8(*m_isr_cfg, 0);
|
||||
}
|
||||
|
||||
bool Device::handle_irq(const RegisterState&)
|
||||
bool Device::handle_irq(RegisterState const&)
|
||||
{
|
||||
u8 isr_type = isr_status();
|
||||
if ((isr_type & (QUEUE_INTERRUPT | DEVICE_CONFIG_INTERRUPT)) == 0) {
|
||||
|
|
|
@ -119,7 +119,7 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
const Configuration* get_config(ConfigurationType cfg_type, u32 index = 0) const
|
||||
Configuration const* get_config(ConfigurationType cfg_type, u32 index = 0) const
|
||||
{
|
||||
for (auto const& cfg : m_configs) {
|
||||
if (cfg.cfg_type != cfg_type)
|
||||
|
@ -148,13 +148,13 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
u8 config_read8(const Configuration&, u32);
|
||||
u16 config_read16(const Configuration&, u32);
|
||||
u32 config_read32(const Configuration&, u32);
|
||||
void config_write8(const Configuration&, u32, u8);
|
||||
void config_write16(const Configuration&, u32, u16);
|
||||
void config_write32(const Configuration&, u32, u32);
|
||||
void config_write64(const Configuration&, u32, u64);
|
||||
u8 config_read8(Configuration const&, u32);
|
||||
u16 config_read16(Configuration const&, u32);
|
||||
u32 config_read32(Configuration const&, u32);
|
||||
void config_write8(Configuration const&, u32, u8);
|
||||
void config_write16(Configuration const&, u32, u16);
|
||||
void config_write32(Configuration const&, u32, u32);
|
||||
void config_write64(Configuration const&, u32, u64);
|
||||
|
||||
auto mapping_for_bar(u8) -> MappedMMIO&;
|
||||
|
||||
|
@ -171,7 +171,7 @@ protected:
|
|||
return m_queues[queue_index];
|
||||
}
|
||||
|
||||
const Queue& get_queue(u16 queue_index) const
|
||||
Queue const& get_queue(u16 queue_index) const
|
||||
{
|
||||
VERIFY(queue_index < m_queue_count);
|
||||
return m_queues[queue_index];
|
||||
|
@ -224,13 +224,13 @@ private:
|
|||
void reset_device();
|
||||
|
||||
u8 isr_status();
|
||||
virtual bool handle_irq(const RegisterState&) override;
|
||||
virtual bool handle_irq(RegisterState const&) override;
|
||||
|
||||
NonnullOwnPtrVector<Queue> m_queues;
|
||||
Vector<Configuration> m_configs;
|
||||
const Configuration* m_common_cfg { nullptr }; // Cached due to high usage
|
||||
const Configuration* m_notify_cfg { nullptr }; // Cached due to high usage
|
||||
const Configuration* m_isr_cfg { nullptr }; // Cached due to high usage
|
||||
Configuration const* m_common_cfg { nullptr }; // Cached due to high usage
|
||||
Configuration const* m_notify_cfg { nullptr }; // Cached due to high usage
|
||||
Configuration const* m_isr_cfg { nullptr }; // Cached due to high usage
|
||||
|
||||
IOAddress m_io_base;
|
||||
MappedMMIO m_mmio[6];
|
||||
|
|
|
@ -60,8 +60,8 @@ void Queue::disable_interrupts()
|
|||
|
||||
bool Queue::new_data_available() const
|
||||
{
|
||||
const auto index = AK::atomic_load(&m_device->index, AK::MemoryOrder::memory_order_relaxed);
|
||||
const auto used_tail = AK::atomic_load(&m_used_tail, AK::MemoryOrder::memory_order_relaxed);
|
||||
auto const index = AK::atomic_load(&m_device->index, AK::MemoryOrder::memory_order_relaxed);
|
||||
auto const used_tail = AK::atomic_load(&m_used_tail, AK::MemoryOrder::memory_order_relaxed);
|
||||
return index != used_tail;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ void Queue::reclaim_buffer_chain(u16 chain_start_index, u16 chain_end_index, siz
|
|||
|
||||
bool Queue::has_free_slots() const
|
||||
{
|
||||
const auto free_buffers = AK::atomic_load(&m_free_buffers, AK::MemoryOrder::memory_order_relaxed);
|
||||
auto const free_buffers = AK::atomic_load(&m_free_buffers, AK::MemoryOrder::memory_order_relaxed);
|
||||
return free_buffers > 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ private:
|
|||
|
||||
void reclaim_buffer_chain(u16 chain_start_index, u16 chain_end_index, size_t length_of_chain);
|
||||
|
||||
PhysicalAddress to_physical(const void* ptr) const
|
||||
PhysicalAddress to_physical(void const* ptr) const
|
||||
{
|
||||
auto offset = FlatPtr(ptr) - m_queue_region->vaddr().get();
|
||||
return m_queue_region->physical_page(0)->paddr().offset(offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue