mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
Kernel/ACPI: Sprinkle links to the specification all over
The latest version of the ACPI specification (6.4) now has a web version, making it possible to link directly to the relevant sections of the specification. I added links to the stuff that was easy to find. The spec can be found here: https://uefi.org/specs/ACPI/6.4/index.html
This commit is contained in:
parent
10ba6f254c
commit
4ee58d36c0
2 changed files with 21 additions and 2 deletions
|
@ -16,6 +16,8 @@ namespace Kernel {
|
|||
namespace ACPI {
|
||||
|
||||
namespace FADTFlags {
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fixed-acpi-description-table-fixed-feature-flags
|
||||
enum class FeatureFlags : u32 {
|
||||
WBINVD = 1 << 0,
|
||||
WBINVD_FLUSH = 1 << 1,
|
||||
|
@ -41,6 +43,7 @@ enum class FeatureFlags : u32 {
|
|||
LOW_POWER_S0_IDLE_CAPABLE = 1 << 21
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fixed-acpi-description-table-boot-ia-pc-boot-architecture-flags
|
||||
enum class IA_PC_Flags : u8 {
|
||||
Legacy_Devices = 1 << 0,
|
||||
PS2_8042 = 1 << 1,
|
||||
|
@ -110,6 +113,8 @@ enum class BitWidth {
|
|||
}
|
||||
|
||||
namespace Structures {
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#root-system-description-pointer-rsdp-structure
|
||||
struct [[gnu::packed]] RSDPDescriptor {
|
||||
char sig[8];
|
||||
u8 checksum;
|
||||
|
@ -126,6 +131,7 @@ struct [[gnu::packed]] RSDPDescriptor20 {
|
|||
u8 reserved[3];
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#system-description-table-header
|
||||
struct [[gnu::packed]] SDTHeader {
|
||||
char sig[4];
|
||||
u32 length;
|
||||
|
@ -138,11 +144,13 @@ struct [[gnu::packed]] SDTHeader {
|
|||
u32 creator_revision;
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#root-system-description-table-rsdt
|
||||
struct [[gnu::packed]] RSDT {
|
||||
SDTHeader h;
|
||||
u32 table_ptrs[];
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#extended-system-description-table-xsdt
|
||||
struct [[gnu::packed]] XSDT {
|
||||
SDTHeader h;
|
||||
u64 table_ptrs[];
|
||||
|
@ -167,6 +175,7 @@ struct [[gnu::packed]] HPET {
|
|||
u8 page_protection;
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fixed-acpi-description-table-fadt
|
||||
struct [[gnu::packed]] FADT {
|
||||
SDTHeader h;
|
||||
u32 firmware_ctrl;
|
||||
|
@ -225,6 +234,8 @@ struct [[gnu::packed]] FADT {
|
|||
GenericAddressStructure sleep_status;
|
||||
u64 hypervisor_vendor_identity;
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#interrupt-controller-structure-types
|
||||
enum class MADTEntryType {
|
||||
LocalAPIC = 0x0,
|
||||
IOAPIC = 0x1,
|
||||
|
@ -250,6 +261,8 @@ struct [[gnu::packed]] MADTEntryHeader {
|
|||
};
|
||||
|
||||
namespace MADTEntries {
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#i-o-apic-structure
|
||||
struct [[gnu::packed]] IOAPIC {
|
||||
MADTEntryHeader h;
|
||||
u8 ioapic_id;
|
||||
|
@ -258,6 +271,7 @@ struct [[gnu::packed]] IOAPIC {
|
|||
u32 gsi_base;
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#processor-local-apic-structure
|
||||
struct [[gnu::packed]] ProcessorLocalAPIC {
|
||||
MADTEntryHeader h;
|
||||
u8 acpi_processor_id;
|
||||
|
@ -265,6 +279,7 @@ struct [[gnu::packed]] ProcessorLocalAPIC {
|
|||
u32 flags;
|
||||
};
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#interrupt-source-override-structure
|
||||
struct [[gnu::packed]] InterruptSourceOverride {
|
||||
MADTEntryHeader h;
|
||||
u8 bus;
|
||||
|
@ -274,6 +289,7 @@ struct [[gnu::packed]] InterruptSourceOverride {
|
|||
};
|
||||
}
|
||||
|
||||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#multiple-apic-description-table-madt-format
|
||||
struct [[gnu::packed]] MADT {
|
||||
SDTHeader h;
|
||||
u32 lapic_address;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue