summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Modules/ACPI/ACPI.hxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-06-24 14:33:40 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-06-24 14:34:18 +0200
commit9784f940cf71aef91ccbeb1a11651a83a3eff213 (patch)
treebf0294e5ad8161372aaa27cacbfba4eb3e81eda0 /Kernel/Modules/ACPI/ACPI.hxx
parent7738550a55d6fa79447d0298c53fe6320a3135b2 (diff)
IMP: UIAccessibilty class, work in progress Core CoreGraphics (GPU/FB
SDK). REFACTOR: Moved Builtins to Modules/ Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Modules/ACPI/ACPI.hxx')
-rw-r--r--Kernel/Modules/ACPI/ACPI.hxx88
1 files changed, 88 insertions, 0 deletions
diff --git a/Kernel/Modules/ACPI/ACPI.hxx b/Kernel/Modules/ACPI/ACPI.hxx
new file mode 100644
index 00000000..019bcb11
--- /dev/null
+++ b/Kernel/Modules/ACPI/ACPI.hxx
@@ -0,0 +1,88 @@
+/* -------------------------------------------
+
+ Copyright Zeta Electronics Corporation
+
+------------------------------------------- */
+
+#ifndef __ACPI__
+#define __ACPI__
+
+/**
+ https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html
+*/
+
+#include <NewKit/Defines.hpp>
+
+namespace NewOS
+{
+ class PACKED SDT
+ {
+ public:
+ Char Signature[4];
+ UInt32 Length;
+ UInt8 Revision;
+ Char Checksum;
+ Char OemId[6];
+ Char OemTableId[8];
+ UInt32 OemRev;
+ UInt32 CreatorID;
+ UInt32 CreatorRevision;
+ };
+
+ class PACKED RSDP : public SDT
+ {
+ public:
+ UInt32 RsdtAddress;
+ UIntPtr XsdtAddress;
+ UInt8 ExtendedChecksum;
+ UInt8 Reserved0[3];
+ };
+
+ class PACKED 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,
+ Count = 5,
+ Invalid = 0xFF,
+ };
+
+ class PACKED Address
+ {
+ public:
+ AddressSpace AddressSpaceId;
+ UInt8 RegisterBitWidth;
+ UInt8 RegisterBitOffset;
+ UInt8 Reserved;
+ UIntPtr Address;
+ };
+
+ class PACKED RSDT
+ {
+ public:
+ Char Signature[4];
+ UInt32 Length;
+ UInt8 Revision;
+ Char Checksum;
+ Char OemId[6];
+ Char OemTableId[8];
+ UInt32 OemRev;
+ UInt32 CreatorID;
+ UInt32 CreatorRevision;
+ UInt32 AddressArr[];
+ };
+} // namespace NewOS
+
+#endif // !__ACPI__