1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

ACPI: Run clang-format on the definitions file

This commit is contained in:
Liav A 2020-02-22 19:49:20 +02:00 committed by Andreas Kling
parent 16055de978
commit a46120b4a8

View file

@ -34,26 +34,26 @@ namespace Kernel {
namespace ACPI_RAW { namespace ACPI_RAW {
struct [[gnu::packed]] RSDPDescriptor struct [[gnu::packed]] RSDPDescriptor
{ {
char sig[8]; char sig[8];
u8 checksum; u8 checksum;
char oem_id[6]; char oem_id[6];
u8 revision; u8 revision;
u32 rsdt_ptr; u32 rsdt_ptr;
}; };
struct [[gnu::packed]] RSDPDescriptor20 struct [[gnu::packed]] RSDPDescriptor20
{ {
RSDPDescriptor base; RSDPDescriptor base;
u32 length; u32 length;
u64 xsdt_ptr; u64 xsdt_ptr;
u8 ext_checksum; u8 ext_checksum;
u8 reserved[3]; u8 reserved[3];
}; };
struct [[gnu::packed]] SDTHeader struct [[gnu::packed]] SDTHeader
{ {
char sig[4]; char sig[4];
u32 length; u32 length;
u8 revision; u8 revision;
@ -63,38 +63,38 @@ struct [[gnu::packed]] SDTHeader
u32 oem_revision; u32 oem_revision;
u32 creator_id; u32 creator_id;
u32 creator_revision; u32 creator_revision;
}; };
struct [[gnu::packed]] RSDT struct [[gnu::packed]] RSDT
{ {
SDTHeader h; SDTHeader h;
u32 table_ptrs[]; u32 table_ptrs[];
}; };
struct [[gnu::packed]] XSDT struct [[gnu::packed]] XSDT
{ {
SDTHeader h; SDTHeader h;
u64 table_ptrs[]; u64 table_ptrs[];
}; };
struct [[gnu::packed]] GenericAddressStructure struct [[gnu::packed]] GenericAddressStructure
{ {
u8 address_space; u8 address_space;
u8 bit_width; u8 bit_width;
u8 bit_offset; u8 bit_offset;
u8 access_size; u8 access_size;
u64 address; u64 address;
}; };
struct [[gnu::packed]] TimerStructure struct [[gnu::packed]] TimerStructure
{ {
u64 configuration_capability; u64 configuration_capability;
u64 comparator_value; u64 comparator_value;
u64 fsb_interrupt_route; u64 fsb_interrupt_route;
}; };
struct [[gnu::packed]] HPET struct [[gnu::packed]] HPET
{ {
SDTHeader h; SDTHeader h;
u64 capabilities; u64 capabilities;
u64 reserved; u64 reserved;
@ -110,10 +110,10 @@ struct [[gnu::packed]] HPET
u64 reserved6; u64 reserved6;
TimerStructure timer2; TimerStructure timer2;
u64 reserved7; u64 reserved7;
}; };
struct [[gnu::packed]] FADT struct [[gnu::packed]] FADT
{ {
SDTHeader h; SDTHeader h;
u32 firmware_ctrl; u32 firmware_ctrl;
u32 dsdt_ptr; u32 dsdt_ptr;
@ -170,8 +170,8 @@ struct [[gnu::packed]] FADT
GenericAddressStructure sleep_control; GenericAddressStructure sleep_control;
GenericAddressStructure sleep_status; GenericAddressStructure sleep_status;
u64 hypervisor_vendor_identity; u64 hypervisor_vendor_identity;
}; };
enum class MADTEntryType { enum class MADTEntryType {
LocalAPIC = 0x0, LocalAPIC = 0x0,
IOAPIC = 0x1, IOAPIC = 0x1,
InterruptSourceOverride = 0x2, InterruptSourceOverride = 0x2,
@ -188,71 +188,71 @@ enum class MADTEntryType {
GIC_MSI = 0xD, GIC_MSI = 0xD,
GIC_Redistrbutor = 0xE, GIC_Redistrbutor = 0xE,
GIC_Interrupt_Translation = 0xF GIC_Interrupt_Translation = 0xF
}; };
struct [[gnu::packed]] MADTEntryHeader struct [[gnu::packed]] MADTEntryHeader
{ {
u8 type; u8 type;
u8 length; u8 length;
}; };
struct [[gnu::packed]] MADT_IOAPIC struct [[gnu::packed]] MADT_IOAPIC
{ {
MADTEntryHeader h; MADTEntryHeader h;
u8 ioapic_id; u8 ioapic_id;
u8 reserved; u8 reserved;
u32 ioapic_address; u32 ioapic_address;
u32 gsi_base; u32 gsi_base;
}; };
struct [[gnu::packed]] MADT_InterruptSourceOverride struct [[gnu::packed]] MADT_InterruptSourceOverride
{ {
MADTEntryHeader h; MADTEntryHeader h;
u8 bus; u8 bus;
u8 source; u8 source;
u32 global_system_interrupt; u32 global_system_interrupt;
u16 flags; u16 flags;
}; };
struct [[gnu::packed]] MADT struct [[gnu::packed]] MADT
{ {
SDTHeader h; SDTHeader h;
u32 lapic_address; u32 lapic_address;
u32 flags; u32 flags;
MADTEntryHeader entries[]; MADTEntryHeader entries[];
}; };
struct [[gnu::packed]] AMLTable struct [[gnu::packed]] AMLTable
{ {
SDTHeader h; SDTHeader h;
char aml_code[]; char aml_code[];
}; };
struct [[gnu::packed]] PCI_MMIO_Descriptor struct [[gnu::packed]] PCI_MMIO_Descriptor
{ {
u64 base_addr; u64 base_addr;
u16 seg_group_number; u16 seg_group_number;
u8 start_pci_bus; u8 start_pci_bus;
u8 end_pci_bus; u8 end_pci_bus;
u32 reserved; u32 reserved;
}; };
struct [[gnu::packed]] MCFG struct [[gnu::packed]] MCFG
{ {
SDTHeader header; SDTHeader header;
u64 reserved; u64 reserved;
PCI_MMIO_Descriptor descriptors[]; PCI_MMIO_Descriptor descriptors[];
}; };
} }
class ACPIStaticParser; class ACPIStaticParser;
namespace ACPI { namespace ACPI {
class SDT : public RefCounted<SDT> { class SDT : public RefCounted<SDT> {
}; };
struct GenericAddressStructure { struct GenericAddressStructure {
u8 address_space; u8 address_space;
u8 bit_width; u8 bit_width;
u8 bit_offset; u8 bit_offset;
@ -276,9 +276,9 @@ struct GenericAddressStructure {
this->address = (uintptr_t)other.address; this->address = (uintptr_t)other.address;
return *this; return *this;
} }
}; };
class FixedACPIData; class FixedACPIData;
} }
class ACPI::FixedACPIData : public ACPI::SDT { class ACPI::FixedACPIData : public ACPI::SDT {
@ -343,34 +343,34 @@ private:
namespace ACPI { namespace ACPI {
class MainSystemDescriptionTable : public SDT { class MainSystemDescriptionTable : public SDT {
public: public:
explicit MainSystemDescriptionTable(Vector<ACPI_RAW::SDTHeader*>&& sdt_pointers); explicit MainSystemDescriptionTable(Vector<ACPI_RAW::SDTHeader*>&& sdt_pointers);
Vector<ACPI_RAW::SDTHeader*>& get_sdt_pointers(); Vector<ACPI_RAW::SDTHeader*>& get_sdt_pointers();
private: private:
Vector<ACPI_RAW::SDTHeader*> m_sdt_pointers; Vector<ACPI_RAW::SDTHeader*> m_sdt_pointers;
}; };
class MCFG : public SDT { class MCFG : public SDT {
public: public:
MCFG(ACPI_RAW::MCFG&); MCFG(ACPI_RAW::MCFG&);
}; };
class FACS : public SDT { class FACS : public SDT {
public: public:
private: private:
u32 hardware_sig; u32 hardware_sig;
u32 waking_vector; u32 waking_vector;
u32 global_lock; u32 global_lock;
u32 flags; u32 flags;
u64 x_waking_vector; u64 x_waking_vector;
u32 ospm_flags; u32 ospm_flags;
}; };
class MADT : public SDT { class MADT : public SDT {
}; };
} }
} }