From 26ceef5cccbb40b00a302979ed297243b356feff Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 1 Feb 2024 17:00:17 +0100 Subject: Kernel: Some groundwork done, this is a bumping commit. Signed-off-by: Amlal El Mahrouss --- Internal/.gitkeep | 0 Private/EFIKit/EFiLib.cxx | 14 ----------- Private/KernelKit/DebugOutput.hpp | 48 ++++++++++++++++++-------------------- Private/KernelKit/DriveManager.hpp | 2 +- Private/KernelKit/OSErr.hpp | 31 ++++++++++++------------ Private/NewBoot/Source/EFILib.cxx | 14 +++++++++++ 6 files changed, 53 insertions(+), 56 deletions(-) create mode 100644 Internal/.gitkeep delete mode 100644 Private/EFIKit/EFiLib.cxx create mode 100644 Private/NewBoot/Source/EFILib.cxx diff --git a/Internal/.gitkeep b/Internal/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Private/EFIKit/EFiLib.cxx b/Private/EFIKit/EFiLib.cxx deleted file mode 100644 index b90cfa3a..00000000 --- a/Private/EFIKit/EFiLib.cxx +++ /dev/null @@ -1,14 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - - File: EFILib.hxx - Purpose: EFI C++ library - - Revision History: - - 01/02/24: Added file (amlel) - -------------------------------------------- */ - -#include diff --git a/Private/KernelKit/DebugOutput.hpp b/Private/KernelKit/DebugOutput.hpp index a651cb8b..875884ba 100644 --- a/Private/KernelKit/DebugOutput.hpp +++ b/Private/KernelKit/DebugOutput.hpp @@ -13,28 +13,26 @@ #include #include -namespace HCore -{ - // @brief Emulates a VT100 terminal. - class TerminalDevice final : public DeviceInterface - { - public: - TerminalDevice(void (*print)(const char *), void (*get)(const char *)) : DeviceInterface(print, get) {} - virtual ~TerminalDevice() {} - - /// @brief returns device name (terminal name) - /// @return string type (const char*) - virtual const char* Name() const override { return ("TerminalDevice"); } - - TerminalDevice &operator=(const TerminalDevice &) = default; - TerminalDevice(const TerminalDevice &) = default; - - }; - - namespace Detail - { - bool serial_init(); - } - - extern TerminalDevice kcout; -} // namespace HCore +namespace HCore { +// @brief Emulates a VT100 terminal. +class TerminalDevice final : public DeviceInterface { + public: + TerminalDevice(void (*print)(const char *), void (*get)(const char *)) + : DeviceInterface(print, get) {} + + virtual ~TerminalDevice() {} + + /// @brief returns device name (terminal name) + /// @return string type (const char*) + virtual const char *Name() const override { return ("TerminalDevice"); } + + TerminalDevice &operator=(const TerminalDevice &) = default; + TerminalDevice(const TerminalDevice &) = default; +}; + +namespace Detail { +bool serial_init(); +} + +extern TerminalDevice kcout; +} // namespace HCore diff --git a/Private/KernelKit/DriveManager.hpp b/Private/KernelKit/DriveManager.hpp index 223414d2..ac39c177 100644 --- a/Private/KernelKit/DriveManager.hpp +++ b/Private/KernelKit/DriveManager.hpp @@ -34,7 +34,7 @@ enum { typedef Int64 DriveID; -// Mounted drive. +/// @brief Mounted drive traits. struct DriveTraits final { char fName[kDriveNameLen]; // /System, /Boot, /USBDevice... Int32 fKind; // fMassStorage, fFloppy, fOpticalDisc. diff --git a/Private/KernelKit/OSErr.hpp b/Private/KernelKit/OSErr.hpp index 975de898..62916959 100644 --- a/Private/KernelKit/OSErr.hpp +++ b/Private/KernelKit/OSErr.hpp @@ -11,20 +11,19 @@ #include -namespace HCore -{ - typedef Int32 OSErr; +namespace HCore { +typedef Int32 OSErr; - inline constexpr OSErr kErrorExecutable = 33; - inline constexpr OSErr kErrorExecutableLib = 34; - inline constexpr OSErr kErrorFileNotFound = 35; - inline constexpr OSErr kErrorDirectoryNotFound = 36; - inline constexpr OSErr kErrorDiskReadOnly = 37; - inline constexpr OSErr kErrorDiskIsFull = 38; - inline constexpr OSErr kErrorProcessFault = 39; - inline constexpr OSErr kErrorSocketHangUp = 40; - inline constexpr OSErr kErrorThreadLocalStorage = 41; - inline constexpr OSErr kErrorMath = 42; - inline constexpr OSErr kErrorNoNetwork = 43; - inline constexpr OSErr kErrorHeapOutOfMemory = 44; -} \ No newline at end of file +inline constexpr OSErr kErrorExecutable = 33; +inline constexpr OSErr kErrorExecutableLib = 34; +inline constexpr OSErr kErrorFileNotFound = 35; +inline constexpr OSErr kErrorDirectoryNotFound = 36; +inline constexpr OSErr kErrorDiskReadOnly = 37; +inline constexpr OSErr kErrorDiskIsFull = 38; +inline constexpr OSErr kErrorProcessFault = 39; +inline constexpr OSErr kErrorSocketHangUp = 40; +inline constexpr OSErr kErrorThreadLocalStorage = 41; +inline constexpr OSErr kErrorMath = 42; +inline constexpr OSErr kErrorNoNetwork = 43; +inline constexpr OSErr kErrorHeapOutOfMemory = 44; +} // namespace HCore diff --git a/Private/NewBoot/Source/EFILib.cxx b/Private/NewBoot/Source/EFILib.cxx new file mode 100644 index 00000000..3e30e0d3 --- /dev/null +++ b/Private/NewBoot/Source/EFILib.cxx @@ -0,0 +1,14 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + + File: EFI.cxx + Purpose: EFI Library for NewBoot. + + Revision History: + + 01/02/24: Added file (amlel) + +------------------------------------------- */ + +#include -- cgit v1.2.3