mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00

A virtual method named device_name() was added to Kernel::PCI to support logging the PCI::Device name and address using dmesgln_pci. Previously, PCI::Device did not store the device name. All devices inheriting from PCI::Device now use dmesgln_pci where they previously used dmesgln.
38 lines
1 KiB
C++
38 lines
1 KiB
C++
/*
|
|
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <Kernel/Bus/PCI/Device.h>
|
|
#include <Kernel/Graphics/Bochs/Definitions.h>
|
|
#include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
|
|
#include <Kernel/Graphics/GenericGraphicsAdapter.h>
|
|
#include <Kernel/Memory/TypedMapping.h>
|
|
#include <Kernel/PhysicalAddress.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class GraphicsManagement;
|
|
struct BochsDisplayMMIORegisters;
|
|
|
|
class BochsGraphicsAdapter final : public GenericGraphicsAdapter
|
|
, public PCI::Device {
|
|
friend class GraphicsManagement;
|
|
|
|
public:
|
|
static NonnullLockRefPtr<BochsGraphicsAdapter> initialize(PCI::DeviceIdentifier const&);
|
|
virtual ~BochsGraphicsAdapter() = default;
|
|
virtual StringView device_name() const override { return "BochsGraphicsAdapter"sv; }
|
|
|
|
private:
|
|
ErrorOr<void> initialize_adapter(PCI::DeviceIdentifier const&);
|
|
|
|
explicit BochsGraphicsAdapter(PCI::DeviceIdentifier const&);
|
|
|
|
LockRefPtr<DisplayConnector> m_display_connector;
|
|
};
|
|
}
|