mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
ACPI: Run clang-format on the definitions file
This commit is contained in:
parent
16055de978
commit
a46120b4a8
Notes:
sideshowbarker
2024-07-19 09:06:53 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/a46120b4a81 Pull-request: https://github.com/SerenityOS/serenity/pull/1274 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/shannonbooth
1 changed files with 245 additions and 245 deletions
|
@ -34,251 +34,251 @@ namespace Kernel {
|
|||
|
||||
namespace ACPI_RAW {
|
||||
|
||||
struct [[gnu::packed]] RSDPDescriptor
|
||||
{
|
||||
char sig[8];
|
||||
u8 checksum;
|
||||
char oem_id[6];
|
||||
u8 revision;
|
||||
u32 rsdt_ptr;
|
||||
};
|
||||
struct [[gnu::packed]] RSDPDescriptor
|
||||
{
|
||||
char sig[8];
|
||||
u8 checksum;
|
||||
char oem_id[6];
|
||||
u8 revision;
|
||||
u32 rsdt_ptr;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] RSDPDescriptor20
|
||||
{
|
||||
RSDPDescriptor base;
|
||||
u32 length;
|
||||
u64 xsdt_ptr;
|
||||
u8 ext_checksum;
|
||||
u8 reserved[3];
|
||||
};
|
||||
struct [[gnu::packed]] RSDPDescriptor20
|
||||
{
|
||||
RSDPDescriptor base;
|
||||
u32 length;
|
||||
u64 xsdt_ptr;
|
||||
u8 ext_checksum;
|
||||
u8 reserved[3];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] SDTHeader
|
||||
{
|
||||
char sig[4];
|
||||
u32 length;
|
||||
u8 revision;
|
||||
u8 checksum;
|
||||
char oem_id[6];
|
||||
char oem_table_id[8];
|
||||
u32 oem_revision;
|
||||
u32 creator_id;
|
||||
u32 creator_revision;
|
||||
};
|
||||
struct [[gnu::packed]] SDTHeader
|
||||
{
|
||||
char sig[4];
|
||||
u32 length;
|
||||
u8 revision;
|
||||
u8 checksum;
|
||||
char oem_id[6];
|
||||
char oem_table_id[8];
|
||||
u32 oem_revision;
|
||||
u32 creator_id;
|
||||
u32 creator_revision;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] RSDT
|
||||
{
|
||||
SDTHeader h;
|
||||
u32 table_ptrs[];
|
||||
};
|
||||
struct [[gnu::packed]] RSDT
|
||||
{
|
||||
SDTHeader h;
|
||||
u32 table_ptrs[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] XSDT
|
||||
{
|
||||
SDTHeader h;
|
||||
u64 table_ptrs[];
|
||||
};
|
||||
struct [[gnu::packed]] XSDT
|
||||
{
|
||||
SDTHeader h;
|
||||
u64 table_ptrs[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] GenericAddressStructure
|
||||
{
|
||||
u8 address_space;
|
||||
u8 bit_width;
|
||||
u8 bit_offset;
|
||||
u8 access_size;
|
||||
u64 address;
|
||||
};
|
||||
struct [[gnu::packed]] GenericAddressStructure
|
||||
{
|
||||
u8 address_space;
|
||||
u8 bit_width;
|
||||
u8 bit_offset;
|
||||
u8 access_size;
|
||||
u64 address;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] TimerStructure
|
||||
{
|
||||
u64 configuration_capability;
|
||||
u64 comparator_value;
|
||||
u64 fsb_interrupt_route;
|
||||
};
|
||||
struct [[gnu::packed]] TimerStructure
|
||||
{
|
||||
u64 configuration_capability;
|
||||
u64 comparator_value;
|
||||
u64 fsb_interrupt_route;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] HPET
|
||||
{
|
||||
SDTHeader h;
|
||||
u64 capabilities;
|
||||
u64 reserved;
|
||||
u64 configuration;
|
||||
u64 reserved2;
|
||||
u64 interrupt_status;
|
||||
u64 reserved3;
|
||||
u64 main_counter_value;
|
||||
u64 reserved4;
|
||||
TimerStructure timer0;
|
||||
u64 reserved5;
|
||||
TimerStructure timer1;
|
||||
u64 reserved6;
|
||||
TimerStructure timer2;
|
||||
u64 reserved7;
|
||||
};
|
||||
struct [[gnu::packed]] HPET
|
||||
{
|
||||
SDTHeader h;
|
||||
u64 capabilities;
|
||||
u64 reserved;
|
||||
u64 configuration;
|
||||
u64 reserved2;
|
||||
u64 interrupt_status;
|
||||
u64 reserved3;
|
||||
u64 main_counter_value;
|
||||
u64 reserved4;
|
||||
TimerStructure timer0;
|
||||
u64 reserved5;
|
||||
TimerStructure timer1;
|
||||
u64 reserved6;
|
||||
TimerStructure timer2;
|
||||
u64 reserved7;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] FADT
|
||||
{
|
||||
SDTHeader h;
|
||||
u32 firmware_ctrl;
|
||||
u32 dsdt_ptr;
|
||||
u8 reserved;
|
||||
u8 preferred_pm_profile;
|
||||
u16 sci_int;
|
||||
u32 smi_cmd;
|
||||
u8 acpi_enable_value;
|
||||
u8 acpi_disable_value;
|
||||
u8 s4bios_req;
|
||||
u8 pstate_cnt;
|
||||
u32 PM1a_EVT_BLK;
|
||||
u32 PM1b_EVT_BLK;
|
||||
u32 PM1a_CNT_BLK;
|
||||
u32 PM1b_CNT_BLK;
|
||||
u32 PM2_CNT_BLK;
|
||||
u32 PM_TMR_BLK;
|
||||
u32 GPE0_BLK;
|
||||
u32 GPE1_BLK;
|
||||
u8 PM1_EVT_LEN;
|
||||
u8 PM1_CNT_LEN;
|
||||
u8 PM2_CNT_LEN;
|
||||
u8 PM_TMR_LEN;
|
||||
u8 GPE0_BLK_LEN;
|
||||
u8 GPE1_BLK_LEN;
|
||||
u8 GPE1_BASE;
|
||||
u8 cst_cnt;
|
||||
u16 P_LVL2_LAT;
|
||||
u16 P_LVL3_LAT;
|
||||
u16 flush_size;
|
||||
u16 flush_stride;
|
||||
u8 duty_offset;
|
||||
u8 duty_width;
|
||||
u8 day_alrm;
|
||||
u8 mon_alrm;
|
||||
u8 century;
|
||||
u16 ia_pc_boot_arch_flags;
|
||||
u8 reserved2;
|
||||
u32 flags;
|
||||
GenericAddressStructure reset_reg;
|
||||
u8 reset_value;
|
||||
u16 arm_boot_arch;
|
||||
u8 fadt_minor_version;
|
||||
u64 x_firmware_ctrl;
|
||||
u64 x_dsdt;
|
||||
GenericAddressStructure x_pm1a_evt_blk;
|
||||
GenericAddressStructure x_pm1b_evt_blk;
|
||||
GenericAddressStructure x_pm1a_cnt_blk;
|
||||
GenericAddressStructure x_pm1b_cnt_blk;
|
||||
GenericAddressStructure x_pm2_cnt_blk;
|
||||
GenericAddressStructure x_pm_tmr_blk;
|
||||
GenericAddressStructure x_gpe0_blk;
|
||||
GenericAddressStructure x_gpe1_blk;
|
||||
GenericAddressStructure sleep_control;
|
||||
GenericAddressStructure sleep_status;
|
||||
u64 hypervisor_vendor_identity;
|
||||
};
|
||||
enum class MADTEntryType {
|
||||
LocalAPIC = 0x0,
|
||||
IOAPIC = 0x1,
|
||||
InterruptSourceOverride = 0x2,
|
||||
NMI_Source = 0x3,
|
||||
LocalAPIC_NMI = 0x4,
|
||||
LocalAPIC_Address_Override = 0x5,
|
||||
IO_SAPIC = 0x6,
|
||||
Local_SAPIC = 0x7,
|
||||
Platform_interrupt_Sources = 0x8,
|
||||
Local_x2APIC = 0x9,
|
||||
Local_x2APIC_NMI = 0xA,
|
||||
GIC_CPU = 0xB,
|
||||
GIC_Distributor = 0xC,
|
||||
GIC_MSI = 0xD,
|
||||
GIC_Redistrbutor = 0xE,
|
||||
GIC_Interrupt_Translation = 0xF
|
||||
};
|
||||
struct [[gnu::packed]] FADT
|
||||
{
|
||||
SDTHeader h;
|
||||
u32 firmware_ctrl;
|
||||
u32 dsdt_ptr;
|
||||
u8 reserved;
|
||||
u8 preferred_pm_profile;
|
||||
u16 sci_int;
|
||||
u32 smi_cmd;
|
||||
u8 acpi_enable_value;
|
||||
u8 acpi_disable_value;
|
||||
u8 s4bios_req;
|
||||
u8 pstate_cnt;
|
||||
u32 PM1a_EVT_BLK;
|
||||
u32 PM1b_EVT_BLK;
|
||||
u32 PM1a_CNT_BLK;
|
||||
u32 PM1b_CNT_BLK;
|
||||
u32 PM2_CNT_BLK;
|
||||
u32 PM_TMR_BLK;
|
||||
u32 GPE0_BLK;
|
||||
u32 GPE1_BLK;
|
||||
u8 PM1_EVT_LEN;
|
||||
u8 PM1_CNT_LEN;
|
||||
u8 PM2_CNT_LEN;
|
||||
u8 PM_TMR_LEN;
|
||||
u8 GPE0_BLK_LEN;
|
||||
u8 GPE1_BLK_LEN;
|
||||
u8 GPE1_BASE;
|
||||
u8 cst_cnt;
|
||||
u16 P_LVL2_LAT;
|
||||
u16 P_LVL3_LAT;
|
||||
u16 flush_size;
|
||||
u16 flush_stride;
|
||||
u8 duty_offset;
|
||||
u8 duty_width;
|
||||
u8 day_alrm;
|
||||
u8 mon_alrm;
|
||||
u8 century;
|
||||
u16 ia_pc_boot_arch_flags;
|
||||
u8 reserved2;
|
||||
u32 flags;
|
||||
GenericAddressStructure reset_reg;
|
||||
u8 reset_value;
|
||||
u16 arm_boot_arch;
|
||||
u8 fadt_minor_version;
|
||||
u64 x_firmware_ctrl;
|
||||
u64 x_dsdt;
|
||||
GenericAddressStructure x_pm1a_evt_blk;
|
||||
GenericAddressStructure x_pm1b_evt_blk;
|
||||
GenericAddressStructure x_pm1a_cnt_blk;
|
||||
GenericAddressStructure x_pm1b_cnt_blk;
|
||||
GenericAddressStructure x_pm2_cnt_blk;
|
||||
GenericAddressStructure x_pm_tmr_blk;
|
||||
GenericAddressStructure x_gpe0_blk;
|
||||
GenericAddressStructure x_gpe1_blk;
|
||||
GenericAddressStructure sleep_control;
|
||||
GenericAddressStructure sleep_status;
|
||||
u64 hypervisor_vendor_identity;
|
||||
};
|
||||
enum class MADTEntryType {
|
||||
LocalAPIC = 0x0,
|
||||
IOAPIC = 0x1,
|
||||
InterruptSourceOverride = 0x2,
|
||||
NMI_Source = 0x3,
|
||||
LocalAPIC_NMI = 0x4,
|
||||
LocalAPIC_Address_Override = 0x5,
|
||||
IO_SAPIC = 0x6,
|
||||
Local_SAPIC = 0x7,
|
||||
Platform_interrupt_Sources = 0x8,
|
||||
Local_x2APIC = 0x9,
|
||||
Local_x2APIC_NMI = 0xA,
|
||||
GIC_CPU = 0xB,
|
||||
GIC_Distributor = 0xC,
|
||||
GIC_MSI = 0xD,
|
||||
GIC_Redistrbutor = 0xE,
|
||||
GIC_Interrupt_Translation = 0xF
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MADTEntryHeader
|
||||
{
|
||||
u8 type;
|
||||
u8 length;
|
||||
};
|
||||
struct [[gnu::packed]] MADTEntryHeader
|
||||
{
|
||||
u8 type;
|
||||
u8 length;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MADT_IOAPIC
|
||||
{
|
||||
MADTEntryHeader h;
|
||||
u8 ioapic_id;
|
||||
u8 reserved;
|
||||
u32 ioapic_address;
|
||||
u32 gsi_base;
|
||||
};
|
||||
struct [[gnu::packed]] MADT_IOAPIC
|
||||
{
|
||||
MADTEntryHeader h;
|
||||
u8 ioapic_id;
|
||||
u8 reserved;
|
||||
u32 ioapic_address;
|
||||
u32 gsi_base;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MADT_InterruptSourceOverride
|
||||
{
|
||||
MADTEntryHeader h;
|
||||
u8 bus;
|
||||
u8 source;
|
||||
u32 global_system_interrupt;
|
||||
u16 flags;
|
||||
};
|
||||
struct [[gnu::packed]] MADT_InterruptSourceOverride
|
||||
{
|
||||
MADTEntryHeader h;
|
||||
u8 bus;
|
||||
u8 source;
|
||||
u32 global_system_interrupt;
|
||||
u16 flags;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MADT
|
||||
{
|
||||
SDTHeader h;
|
||||
u32 lapic_address;
|
||||
u32 flags;
|
||||
MADTEntryHeader entries[];
|
||||
};
|
||||
struct [[gnu::packed]] MADT
|
||||
{
|
||||
SDTHeader h;
|
||||
u32 lapic_address;
|
||||
u32 flags;
|
||||
MADTEntryHeader entries[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] AMLTable
|
||||
{
|
||||
SDTHeader h;
|
||||
char aml_code[];
|
||||
};
|
||||
struct [[gnu::packed]] AMLTable
|
||||
{
|
||||
SDTHeader h;
|
||||
char aml_code[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] PCI_MMIO_Descriptor
|
||||
{
|
||||
u64 base_addr;
|
||||
u16 seg_group_number;
|
||||
u8 start_pci_bus;
|
||||
u8 end_pci_bus;
|
||||
u32 reserved;
|
||||
};
|
||||
struct [[gnu::packed]] PCI_MMIO_Descriptor
|
||||
{
|
||||
u64 base_addr;
|
||||
u16 seg_group_number;
|
||||
u8 start_pci_bus;
|
||||
u8 end_pci_bus;
|
||||
u32 reserved;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MCFG
|
||||
{
|
||||
SDTHeader header;
|
||||
u64 reserved;
|
||||
PCI_MMIO_Descriptor descriptors[];
|
||||
};
|
||||
struct [[gnu::packed]] MCFG
|
||||
{
|
||||
SDTHeader header;
|
||||
u64 reserved;
|
||||
PCI_MMIO_Descriptor descriptors[];
|
||||
};
|
||||
}
|
||||
|
||||
class ACPIStaticParser;
|
||||
|
||||
namespace ACPI {
|
||||
|
||||
class SDT : public RefCounted<SDT> {
|
||||
};
|
||||
class SDT : public RefCounted<SDT> {
|
||||
};
|
||||
|
||||
struct GenericAddressStructure {
|
||||
u8 address_space;
|
||||
u8 bit_width;
|
||||
u8 bit_offset;
|
||||
u8 access_size;
|
||||
u64 address;
|
||||
GenericAddressStructure& operator=(const GenericAddressStructure& other)
|
||||
{
|
||||
this->address_space = other.address_space;
|
||||
this->bit_width = other.bit_width;
|
||||
this->bit_offset = other.bit_offset;
|
||||
this->access_size = other.access_size;
|
||||
this->address = (uintptr_t)other.address;
|
||||
return *this;
|
||||
}
|
||||
GenericAddressStructure& operator=(const ACPI_RAW::GenericAddressStructure& other)
|
||||
{
|
||||
this->address_space = other.address_space;
|
||||
this->bit_width = other.bit_width;
|
||||
this->bit_offset = other.bit_offset;
|
||||
this->access_size = other.access_size;
|
||||
this->address = (uintptr_t)other.address;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
struct GenericAddressStructure {
|
||||
u8 address_space;
|
||||
u8 bit_width;
|
||||
u8 bit_offset;
|
||||
u8 access_size;
|
||||
u64 address;
|
||||
GenericAddressStructure& operator=(const GenericAddressStructure& other)
|
||||
{
|
||||
this->address_space = other.address_space;
|
||||
this->bit_width = other.bit_width;
|
||||
this->bit_offset = other.bit_offset;
|
||||
this->access_size = other.access_size;
|
||||
this->address = (uintptr_t)other.address;
|
||||
return *this;
|
||||
}
|
||||
GenericAddressStructure& operator=(const ACPI_RAW::GenericAddressStructure& other)
|
||||
{
|
||||
this->address_space = other.address_space;
|
||||
this->bit_width = other.bit_width;
|
||||
this->bit_offset = other.bit_offset;
|
||||
this->access_size = other.access_size;
|
||||
this->address = (uintptr_t)other.address;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class FixedACPIData;
|
||||
class FixedACPIData;
|
||||
}
|
||||
|
||||
class ACPI::FixedACPIData : public ACPI::SDT {
|
||||
|
@ -343,34 +343,34 @@ private:
|
|||
|
||||
namespace ACPI {
|
||||
|
||||
class MainSystemDescriptionTable : public SDT {
|
||||
public:
|
||||
explicit MainSystemDescriptionTable(Vector<ACPI_RAW::SDTHeader*>&& sdt_pointers);
|
||||
Vector<ACPI_RAW::SDTHeader*>& get_sdt_pointers();
|
||||
class MainSystemDescriptionTable : public SDT {
|
||||
public:
|
||||
explicit MainSystemDescriptionTable(Vector<ACPI_RAW::SDTHeader*>&& sdt_pointers);
|
||||
Vector<ACPI_RAW::SDTHeader*>& get_sdt_pointers();
|
||||
|
||||
private:
|
||||
Vector<ACPI_RAW::SDTHeader*> m_sdt_pointers;
|
||||
};
|
||||
private:
|
||||
Vector<ACPI_RAW::SDTHeader*> m_sdt_pointers;
|
||||
};
|
||||
|
||||
class MCFG : public SDT {
|
||||
public:
|
||||
MCFG(ACPI_RAW::MCFG&);
|
||||
};
|
||||
class MCFG : public SDT {
|
||||
public:
|
||||
MCFG(ACPI_RAW::MCFG&);
|
||||
};
|
||||
|
||||
class FACS : public SDT {
|
||||
class FACS : public SDT {
|
||||
|
||||
public:
|
||||
private:
|
||||
u32 hardware_sig;
|
||||
u32 waking_vector;
|
||||
u32 global_lock;
|
||||
u32 flags;
|
||||
u64 x_waking_vector;
|
||||
u32 ospm_flags;
|
||||
};
|
||||
public:
|
||||
private:
|
||||
u32 hardware_sig;
|
||||
u32 waking_vector;
|
||||
u32 global_lock;
|
||||
u32 flags;
|
||||
u64 x_waking_vector;
|
||||
u32 ospm_flags;
|
||||
};
|
||||
|
||||
class MADT : public SDT {
|
||||
};
|
||||
class MADT : public SDT {
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue