mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
Everywhere: Re-format with clang-format-11
Compared to version 10 this fixes a bunch of formatting issues, mostly around structs/classes with attributes like [[gnu::packed]], and incorrect insertion of spaces in parameter types ("T &"/"T &&"). I also removed a bunch of // clang-format off/on and FIXME comments that are no longer relevant - on the other hand it tried to destroy a couple of neatly formatted comments, so I had to add some as well.
This commit is contained in:
parent
2568a93b5d
commit
bbe787a0af
54 changed files with 130 additions and 230 deletions
|
@ -70,8 +70,7 @@ enum class IA_PC_Flags : u8 {
|
|||
CMOS_RTC_Not_Present = 1 << 5
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] HardwareFeatures
|
||||
{
|
||||
struct [[gnu::packed]] HardwareFeatures {
|
||||
bool wbinvd : 1;
|
||||
bool wbinvd_flush : 1;
|
||||
bool processor_c1 : 1;
|
||||
|
@ -95,8 +94,7 @@ struct [[gnu::packed]] HardwareFeatures
|
|||
bool hardware_reduced_acpi : 1;
|
||||
bool low_power_s0_idle_capable : 1;
|
||||
};
|
||||
struct [[gnu::packed]] x86_Specific_Flags
|
||||
{
|
||||
struct [[gnu::packed]] x86_Specific_Flags {
|
||||
bool legacy_devices : 1;
|
||||
bool keyboard_8042 : 1;
|
||||
bool vga_not_present : 1;
|
||||
|
@ -132,8 +130,7 @@ enum class BitWidth {
|
|||
}
|
||||
|
||||
namespace Structures {
|
||||
struct [[gnu::packed]] RSDPDescriptor
|
||||
{
|
||||
struct [[gnu::packed]] RSDPDescriptor {
|
||||
char sig[8];
|
||||
u8 checksum;
|
||||
char oem_id[6];
|
||||
|
@ -141,8 +138,7 @@ struct [[gnu::packed]] RSDPDescriptor
|
|||
u32 rsdt_ptr;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] RSDPDescriptor20
|
||||
{
|
||||
struct [[gnu::packed]] RSDPDescriptor20 {
|
||||
RSDPDescriptor base;
|
||||
u32 length;
|
||||
u64 xsdt_ptr;
|
||||
|
@ -150,8 +146,7 @@ struct [[gnu::packed]] RSDPDescriptor20
|
|||
u8 reserved[3];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] SDTHeader
|
||||
{
|
||||
struct [[gnu::packed]] SDTHeader {
|
||||
char sig[4];
|
||||
u32 length;
|
||||
u8 revision;
|
||||
|
@ -163,20 +158,17 @@ struct [[gnu::packed]] SDTHeader
|
|||
u32 creator_revision;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] RSDT
|
||||
{
|
||||
struct [[gnu::packed]] RSDT {
|
||||
SDTHeader h;
|
||||
u32 table_ptrs[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] XSDT
|
||||
{
|
||||
struct [[gnu::packed]] XSDT {
|
||||
SDTHeader h;
|
||||
u64 table_ptrs[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] GenericAddressStructure
|
||||
{
|
||||
struct [[gnu::packed]] GenericAddressStructure {
|
||||
u8 address_space;
|
||||
u8 bit_width;
|
||||
u8 bit_offset;
|
||||
|
@ -184,8 +176,7 @@ struct [[gnu::packed]] GenericAddressStructure
|
|||
u64 address;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] HPET
|
||||
{
|
||||
struct [[gnu::packed]] HPET {
|
||||
SDTHeader h;
|
||||
u8 hardware_revision_id;
|
||||
u8 attributes;
|
||||
|
@ -196,8 +187,7 @@ struct [[gnu::packed]] HPET
|
|||
u8 page_protection;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] FADT
|
||||
{
|
||||
struct [[gnu::packed]] FADT {
|
||||
SDTHeader h;
|
||||
u32 firmware_ctrl;
|
||||
u32 dsdt_ptr;
|
||||
|
@ -274,15 +264,13 @@ enum class MADTEntryType {
|
|||
GIC_Interrupt_Translation = 0xF
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MADTEntryHeader
|
||||
{
|
||||
struct [[gnu::packed]] MADTEntryHeader {
|
||||
u8 type;
|
||||
u8 length;
|
||||
};
|
||||
|
||||
namespace MADTEntries {
|
||||
struct [[gnu::packed]] IOAPIC
|
||||
{
|
||||
struct [[gnu::packed]] IOAPIC {
|
||||
MADTEntryHeader h;
|
||||
u8 ioapic_id;
|
||||
u8 reserved;
|
||||
|
@ -290,16 +278,14 @@ struct [[gnu::packed]] IOAPIC
|
|||
u32 gsi_base;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] ProcessorLocalAPIC
|
||||
{
|
||||
struct [[gnu::packed]] ProcessorLocalAPIC {
|
||||
MADTEntryHeader h;
|
||||
u8 acpi_processor_id;
|
||||
u8 apic_id;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] InterruptSourceOverride
|
||||
{
|
||||
struct [[gnu::packed]] InterruptSourceOverride {
|
||||
MADTEntryHeader h;
|
||||
u8 bus;
|
||||
u8 source;
|
||||
|
@ -308,22 +294,19 @@ struct [[gnu::packed]] InterruptSourceOverride
|
|||
};
|
||||
}
|
||||
|
||||
struct [[gnu::packed]] MADT
|
||||
{
|
||||
struct [[gnu::packed]] MADT {
|
||||
SDTHeader h;
|
||||
u32 lapic_address;
|
||||
u32 flags;
|
||||
MADTEntryHeader entries[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] AMLTable
|
||||
{
|
||||
struct [[gnu::packed]] AMLTable {
|
||||
SDTHeader h;
|
||||
char aml_code[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] PCI_MMIO_Descriptor
|
||||
{
|
||||
struct [[gnu::packed]] PCI_MMIO_Descriptor {
|
||||
u64 base_addr;
|
||||
u16 seg_group_number;
|
||||
u8 start_pci_bus;
|
||||
|
@ -331,8 +314,7 @@ struct [[gnu::packed]] PCI_MMIO_Descriptor
|
|||
u32 reserved;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MCFG
|
||||
{
|
||||
struct [[gnu::packed]] MCFG {
|
||||
SDTHeader header;
|
||||
u64 reserved;
|
||||
PCI_MMIO_Descriptor descriptors[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue