1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17: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:
Liav A 2021-08-21 06:58:43 +03:00 committed by Andreas Kling
parent 7b9c3439ec
commit aacb1f0bf4
30 changed files with 50 additions and 54 deletions

View file

@ -63,7 +63,7 @@ UNMAP_AFTER_INIT NonnullRefPtr<BochsGraphicsAdapter> BochsGraphicsAdapter::initi
}
UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::Address pci_address)
: PCI::DeviceController(pci_address)
: PCI::Device(pci_address)
, m_mmio_registers(PCI::get_BAR2(pci_address) & 0xfffffff0)
, m_registers(Memory::map_typed_writable<BochsDisplayMMIORegisters volatile>(m_mmio_registers))
{

View file

@ -8,7 +8,7 @@
#include <AK/String.h>
#include <AK/Types.h>
#include <Kernel/Bus/PCI/DeviceController.h>
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
#include <Kernel/Graphics/FramebufferDevice.h>
#include <Kernel/Graphics/GraphicsDevice.h>
@ -21,7 +21,7 @@ class GraphicsManagement;
struct BochsDisplayMMIORegisters;
class BochsGraphicsAdapter final : public GraphicsDevice
, public PCI::DeviceController {
, public PCI::Device {
AK_MAKE_ETERNAL
friend class GraphicsManagement;
@ -64,5 +64,4 @@ private:
bool m_console_enabled { false };
bool m_io_required { false };
};
}

View file

@ -8,7 +8,7 @@
#include <AK/String.h>
#include <AK/Types.h>
#include <Kernel/Bus/PCI/DeviceController.h>
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/Graphics/Definitions.h>
#include <Kernel/Graphics/FramebufferDevice.h>
#include <Kernel/Graphics/VGACompatibleAdapter.h>

View file

@ -38,7 +38,7 @@ UNMAP_AFTER_INIT void VGACompatibleAdapter::initialize_framebuffer_devices()
}
UNMAP_AFTER_INIT VGACompatibleAdapter::VGACompatibleAdapter(PCI::Address address)
: PCI::DeviceController(address)
: PCI::Device(address)
{
m_framebuffer_console = Graphics::TextModeConsole::initialize(*this);
// FIXME: This is a very wrong way to do this...
@ -46,7 +46,7 @@ UNMAP_AFTER_INIT VGACompatibleAdapter::VGACompatibleAdapter(PCI::Address address
}
UNMAP_AFTER_INIT VGACompatibleAdapter::VGACompatibleAdapter(PCI::Address address, PhysicalAddress framebuffer_address, size_t framebuffer_width, size_t framebuffer_height, size_t framebuffer_pitch)
: PCI::DeviceController(address)
: PCI::Device(address)
, m_framebuffer_address(framebuffer_address)
, m_framebuffer_width(framebuffer_width)
, m_framebuffer_height(framebuffer_height)

View file

@ -8,7 +8,7 @@
#include <AK/String.h>
#include <AK/Types.h>
#include <Kernel/Bus/PCI/DeviceController.h>
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/Graphics/Console/Console.h>
#include <Kernel/Graphics/FramebufferDevice.h>
#include <Kernel/Graphics/GraphicsDevice.h>
@ -17,7 +17,7 @@
namespace Kernel {
class VGACompatibleAdapter : public GraphicsDevice
, public PCI::DeviceController {
, public PCI::Device {
AK_MAKE_ETERNAL
public:
static NonnullRefPtr<VGACompatibleAdapter> initialize_with_preset_resolution(PCI::Address, PhysicalAddress, size_t framebuffer_width, size_t framebuffer_height, size_t framebuffer_pitch);
@ -53,5 +53,4 @@ protected:
RefPtr<FramebufferDevice> m_framebuffer_device;
RefPtr<Graphics::Console> m_framebuffer_console;
};
}

View file

@ -19,7 +19,7 @@ NonnullRefPtr<GraphicsAdapter> GraphicsAdapter::initialize(PCI::Address base_add
}
GraphicsAdapter::GraphicsAdapter(PCI::Address base_address)
: PCI::DeviceController(base_address)
: PCI::Device(base_address)
{
m_gpu_device = adopt_ref(*new GPU(base_address)).leak_ref();
}

View file

@ -14,7 +14,7 @@ namespace Kernel::Graphics::VirtIOGPU {
class GraphicsAdapter final
: public GraphicsDevice
, public PCI::DeviceController {
, public PCI::Device {
AK_MAKE_ETERNAL
public:
@ -40,5 +40,4 @@ private:
RefPtr<GPU> m_gpu_device;
bool m_created_framebuffer_devices { false };
};
}