From b69c498953dc47900e6ccdd0f501727480836f23 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 18 Apr 2025 18:24:44 +0200 Subject: kernel, IMP: GfxKit: GraphicsKit. kernel, IMP: StorageKit: Remove usage of cleanup method on AHCI, DMA, and PIO. Signed-off-by: Amlal El Mahrouss --- dev/kernel/GfxKit/Gfx.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 dev/kernel/GfxKit/Gfx.h (limited to 'dev/kernel/GfxKit') diff --git a/dev/kernel/GfxKit/Gfx.h b/dev/kernel/GfxKit/Gfx.h new file mode 100644 index 00000000..ce5751dc --- /dev/null +++ b/dev/kernel/GfxKit/Gfx.h @@ -0,0 +1,51 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include +#include + +namespace Kernel +{ + class FBDeviceInterface; + struct FBDevicePacket; + + /// @brief Framebuffer device interface packet. + /// @details This structure is used to send and receive data from the framebuffer device. + /// @note The structure is packed to ensure that the data is aligned correctly for the device. + struct PACKED FBDevicePacket final + { + UInt32 fX; + UInt32 fY; + UInt32 fWidth; + UInt32 fHeight; + UInt32 fColor; + UInt32 fFlags; + }; + + /// @brief Framebuffer device interface. + /// @details This class is used to send and receive data from the framebuffer device. + /// @note The class is derived from the IDeviceObject class. + class FBDeviceInterface NE_DEVICE + { + public: + explicit FBDeviceInterface(void (*out)(IDeviceObject* self, FBDevicePacket* out), + void (*in)(IDeviceObject* self, FBDevicePacket* in)); + + virtual ~FBDeviceInterface() override; + + public: + FBDeviceInterface& operator=(const FBDeviceInterface&) = default; + FBDeviceInterface(const FBDeviceInterface&) = default; + + const Char* Name() const override; + + public: + FBDeviceInterface& operator<<(FBDevicePacket* Data) override; + FBDeviceInterface& operator>>(FBDevicePacket* Data) override; + }; +} // namespace Kernel -- cgit v1.2.3 From 815a1d6538b6748393f6a631a64a1043e49bf3a1 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 18 Apr 2025 18:35:56 +0200 Subject: GfxKit: Gave the correct name for FB device. Signed-off-by: Amlal El Mahrouss --- dev/kernel/GfxKit/FB.h | 51 +++++++++++++++++++++++++++++++++ dev/kernel/GfxKit/Gfx.h | 51 --------------------------------- dev/kernel/src/Gfx/FBDeviceInterface.cc | 2 +- 3 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 dev/kernel/GfxKit/FB.h delete mode 100644 dev/kernel/GfxKit/Gfx.h (limited to 'dev/kernel/GfxKit') diff --git a/dev/kernel/GfxKit/FB.h b/dev/kernel/GfxKit/FB.h new file mode 100644 index 00000000..ce5751dc --- /dev/null +++ b/dev/kernel/GfxKit/FB.h @@ -0,0 +1,51 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include +#include + +namespace Kernel +{ + class FBDeviceInterface; + struct FBDevicePacket; + + /// @brief Framebuffer device interface packet. + /// @details This structure is used to send and receive data from the framebuffer device. + /// @note The structure is packed to ensure that the data is aligned correctly for the device. + struct PACKED FBDevicePacket final + { + UInt32 fX; + UInt32 fY; + UInt32 fWidth; + UInt32 fHeight; + UInt32 fColor; + UInt32 fFlags; + }; + + /// @brief Framebuffer device interface. + /// @details This class is used to send and receive data from the framebuffer device. + /// @note The class is derived from the IDeviceObject class. + class FBDeviceInterface NE_DEVICE + { + public: + explicit FBDeviceInterface(void (*out)(IDeviceObject* self, FBDevicePacket* out), + void (*in)(IDeviceObject* self, FBDevicePacket* in)); + + virtual ~FBDeviceInterface() override; + + public: + FBDeviceInterface& operator=(const FBDeviceInterface&) = default; + FBDeviceInterface(const FBDeviceInterface&) = default; + + const Char* Name() const override; + + public: + FBDeviceInterface& operator<<(FBDevicePacket* Data) override; + FBDeviceInterface& operator>>(FBDevicePacket* Data) override; + }; +} // namespace Kernel diff --git a/dev/kernel/GfxKit/Gfx.h b/dev/kernel/GfxKit/Gfx.h deleted file mode 100644 index ce5751dc..00000000 --- a/dev/kernel/GfxKit/Gfx.h +++ /dev/null @@ -1,51 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include -#include - -namespace Kernel -{ - class FBDeviceInterface; - struct FBDevicePacket; - - /// @brief Framebuffer device interface packet. - /// @details This structure is used to send and receive data from the framebuffer device. - /// @note The structure is packed to ensure that the data is aligned correctly for the device. - struct PACKED FBDevicePacket final - { - UInt32 fX; - UInt32 fY; - UInt32 fWidth; - UInt32 fHeight; - UInt32 fColor; - UInt32 fFlags; - }; - - /// @brief Framebuffer device interface. - /// @details This class is used to send and receive data from the framebuffer device. - /// @note The class is derived from the IDeviceObject class. - class FBDeviceInterface NE_DEVICE - { - public: - explicit FBDeviceInterface(void (*out)(IDeviceObject* self, FBDevicePacket* out), - void (*in)(IDeviceObject* self, FBDevicePacket* in)); - - virtual ~FBDeviceInterface() override; - - public: - FBDeviceInterface& operator=(const FBDeviceInterface&) = default; - FBDeviceInterface(const FBDeviceInterface&) = default; - - const Char* Name() const override; - - public: - FBDeviceInterface& operator<<(FBDevicePacket* Data) override; - FBDeviceInterface& operator>>(FBDevicePacket* Data) override; - }; -} // namespace Kernel diff --git a/dev/kernel/src/Gfx/FBDeviceInterface.cc b/dev/kernel/src/Gfx/FBDeviceInterface.cc index 525f32b4..c2eb2ca7 100644 --- a/dev/kernel/src/Gfx/FBDeviceInterface.cc +++ b/dev/kernel/src/Gfx/FBDeviceInterface.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include +#include using namespace Kernel; -- cgit v1.2.3