diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-10-03 05:32:46 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-10-03 05:32:46 +0200 |
| commit | 36b8e46de0e92aff31664470bb3587a91517ab99 (patch) | |
| tree | 780ce906e9273ebbee00a96230557e0b7e9ac9d9 /dev/modules/ACPI/ACPI.hxx | |
| parent | 3e30ee1749d19f5188560f9a5cdab922180c71ca (diff) | |
IMP: Fixes improvements and new APIs and implementations.
- Add more threading API calls.
- Moved /dev/zka/modules/ to /dev/modules/.
- Add APM API inside /dev/modules.
- Add SInt{x} types inside Defines.hxx.
- Fix formatting inside PRM.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/modules/ACPI/ACPI.hxx')
| -rw-r--r-- | dev/modules/ACPI/ACPI.hxx | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/dev/modules/ACPI/ACPI.hxx b/dev/modules/ACPI/ACPI.hxx new file mode 100644 index 00000000..00ba4f9e --- /dev/null +++ b/dev/modules/ACPI/ACPI.hxx @@ -0,0 +1,88 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#ifndef __ACPI__ +#define __ACPI__ + +/** + https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html +*/ + +#include <NewKit/Defines.hxx> + +namespace Kernel +{ + 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 ACPI_ADDRESS_SPACE_KIND : UInt8 + { + eSystemMemory = 0, + eSystemIO = 1, + ePci = 2, + eController = 3, + eSmBus = 4, + eCount = 5, + eInvalid = 0xFF, + }; + + class PACKED ACPI_ADDRESS final + { + public: + UInt8 AddressSpaceId; + UInt8 RegisterBitWidth; + UInt8 RegisterBitOffset; + UInt8 Reserved; + UIntPtr Address; + }; + + class PACKED RSDT final + { + 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 Kernel + +#endif // !__ACPI__ |
