|
| 1 | +/* |
| 2 | + * PROJECT: FreeLoader |
| 3 | + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) |
| 4 | + * PURPOSE: Define ACPI Structures |
| 5 | + * COPYRIGHT: Copyright 2006-2019 Aleksey Bragin <[email protected]> |
| 6 | + * Copyright 2024 Daniel Victor <[email protected]> |
| 7 | + */ |
| 8 | + |
| 9 | +#pragma once |
| 10 | + |
| 11 | +#include <pshpack1.h> |
| 12 | + |
| 13 | +typedef struct /* ACPI Description Header */ |
| 14 | +{ |
| 15 | + CHAR Signature[4]; |
| 16 | + ULONG Length; |
| 17 | + UCHAR Revision; |
| 18 | + UCHAR Checksum; |
| 19 | + CHAR OEMID[6]; |
| 20 | + CHAR OEMTableID[8]; |
| 21 | + ULONG OEMRevision; |
| 22 | + ULONG CreatorID; |
| 23 | + ULONG CreatorRev; |
| 24 | +} DESCRIPTION_HEADER, *PDESCRIPTION_HEADER; |
| 25 | + |
| 26 | +typedef struct /* Root System Descriptor Table */ |
| 27 | +{ |
| 28 | + DESCRIPTION_HEADER Header; |
| 29 | + ULONG PointerToOtherSDT[]; |
| 30 | +} RSDT_DESCRIPTOR, *PRSDT_DESCRIPTOR; |
| 31 | + |
| 32 | +typedef struct /* eXtended System Descriptor Table */ |
| 33 | +{ |
| 34 | + DESCRIPTION_HEADER Header; |
| 35 | + ULONGLONG PointerToOtherSDT[]; |
| 36 | +} XSDT_DESCRIPTOR, *PXSDT_DESCRIPTOR; |
| 37 | + |
| 38 | +typedef struct /* Root System Descriptor Pointer */ |
| 39 | +{ |
| 40 | + CHAR signature [8]; /* contains "RSD PTR " */ |
| 41 | + UCHAR checksum; /* to make sum of struct == 0 */ |
| 42 | + CHAR oem_id [6]; /* OEM identification */ |
| 43 | + UCHAR revision; /* Must be 0 for 1.0, 2 for 2.0 */ |
| 44 | + ULONG rsdt_physical_address; /* 32-bit physical address of RSDT */ |
| 45 | + ULONG length; /* XSDT Length in bytes including hdr */ |
| 46 | + ULONGLONG xsdt_physical_address; /* 64-bit physical address of XSDT */ |
| 47 | + UCHAR extended_checksum; /* Checksum of entire table */ |
| 48 | + CHAR reserved [3]; /* reserved field must be 0 */ |
| 49 | +} RSDP_DESCRIPTOR, *PRSDP_DESCRIPTOR; |
| 50 | + |
| 51 | +#include <poppack.h> |
0 commit comments