summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/ACPI/ACPI.hpp71
-rw-r--r--Private/HALKit/AMD64/ACPI/ACPIManager.hpp50
-rw-r--r--Private/HALKit/AMD64/HalACPIManager.cpp2
-rw-r--r--Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp2
4 files changed, 2 insertions, 123 deletions
diff --git a/Private/HALKit/AMD64/ACPI/ACPI.hpp b/Private/HALKit/AMD64/ACPI/ACPI.hpp
deleted file mode 100644
index f1a7c27c..00000000
--- a/Private/HALKit/AMD64/ACPI/ACPI.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Date Added: 13/02/2023
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#ifndef _INC_ACPI_MANAGER_H
-#define _INC_ACPI_MANAGER_H
-
-/**
- https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html
- https://wiki.osdev.org/RSDT
-*/
-
-#include <NewKit/Defines.hpp>
-
-namespace HCore {
-class SDT {
- public:
- Char Signature[4];
- UInt32 Length;
- UInt8 Revision;
- Char Checksum;
- Char OemId[6];
- Char OemTableId[8];
- UInt32 OemRev;
- UInt32 CreatorID;
- UInt32 CreatorRevision;
-};
-
-class RSDP : public SDT {
- public:
- UInt32 RsdtAddress;
- UIntPtr XsdtAddress;
- UInt8 ExtendedChecksum;
- UInt8 Reserved0[3];
-};
-
-class ConfigHeader {
- public:
- UInt64 BaseAddress;
- UInt16 PciSegGroup;
- UInt8 StartBus;
- UInt8 EndBus;
- UInt32 Reserved;
-};
-
-enum class AddressSpace : UInt8 {
- SystemMemory = 0,
- SystemIO = 1,
- Pci = 2,
- Controller = 3,
- SmBus = 4,
- Invalid = 0xFF,
-};
-
-class Address {
- public:
- AddressSpace AddressSpaceId;
- UInt8 RegisterBitWidth;
- UInt8 RegisterBitOffset;
- UInt8 Reserved;
- UIntPtr Address;
-};
-} // namespace HCore
-
-#endif // !_INC_ACPI_MANAGER_H
diff --git a/Private/HALKit/AMD64/ACPI/ACPIManager.hpp b/Private/HALKit/AMD64/ACPI/ACPIManager.hpp
deleted file mode 100644
index 2b447216..00000000
--- a/Private/HALKit/AMD64/ACPI/ACPIManager.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Date Added: 20/02/2023
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#ifndef _INC_ACPI_H
-#define _INC_ACPI_H
-
-#include <HALKit/AMD64/ACPI/ACPI.hpp>
-#include <KernelKit/DebugOutput.hpp>
-#include <NewKit/Defines.hpp>
-#include <NewKit/Ref.hpp>
-
-namespace HCore {
-class ACPIManager {
- public:
- explicit ACPIManager(voidPtr rsdptr);
-
- public:
- ~ACPIManager() = default;
-
- ACPIManager &operator=(const ACPIManager &) = default;
- ACPIManager(const ACPIManager &) = default;
-
- public:
- void Shutdown(); // shutdown
- void Reset(); // soft-reboot
-
- ErrorOr<voidPtr> Find(const char *signature);
-
- bool Checksum(const char *checksum, SSizeT len); // watch for collides!
-
- public:
- ErrorOr<voidPtr> operator[](const char *signature) {
- return this->Find(signature);
- }
-
- private:
- VoidPtr m_Rsdp; // pointer to root descriptor.
- SSizeT m_Entries; // number of entries, -1 tells that no invalid entries were
- // found.
-};
-} // namespace HCore
-
-#endif // !_INC_ACPI_H
diff --git a/Private/HALKit/AMD64/HalACPIManager.cpp b/Private/HALKit/AMD64/HalACPIManager.cpp
index db9263a1..20cbd327 100644
--- a/Private/HALKit/AMD64/HalACPIManager.cpp
+++ b/Private/HALKit/AMD64/HalACPIManager.cpp
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <HALKit/AMD64/ACPI/ACPIManager.hpp>
+#include <Drivers/ACPI/ACPIManager.hxx>
#include <HALKit/AMD64/Processor.hpp>
#include <NewKit/String.hpp>
diff --git a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
index 98ddb646..bf122415 100644
--- a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
+++ b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <HALKit/AMD64/ACPI/ACPIManager.hpp>
+#include <Drivers/ACPI/ACPIManager.hxx>
#include <HALKit/AMD64/Processor.hpp>
///////////////////////////////////////////////////////////////////////////////////////