summaryrefslogtreecommitdiff
path: root/Kernel/Firmware
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-01 20:58:27 +0300
committerLinus Groh <mail@linusgroh.de>2022-04-01 21:24:45 +0100
commit086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch)
tree02b3699a66735ef806d9b46353491f18f8e4e7b4 /Kernel/Firmware
parent0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff)
downloadserenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip
Everywhere: Run clang-format
Diffstat (limited to 'Kernel/Firmware')
-rw-r--r--Kernel/Firmware/ACPI/Parser.cpp14
-rw-r--r--Kernel/Firmware/ACPI/Parser.h8
-rw-r--r--Kernel/Firmware/MultiProcessor/Parser.cpp4
3 files changed, 13 insertions, 13 deletions
diff --git a/Kernel/Firmware/ACPI/Parser.cpp b/Kernel/Firmware/ACPI/Parser.cpp
index 26811aa91f..41ebbecd12 100644
--- a/Kernel/Firmware/ACPI/Parser.cpp
+++ b/Kernel/Firmware/ACPI/Parser.cpp
@@ -117,7 +117,7 @@ void Parser::enumerate_static_tables(Function<void(StringView, PhysicalAddress,
static bool match_table_signature(PhysicalAddress table_header, StringView signature);
static Optional<PhysicalAddress> search_table_in_xsdt(PhysicalAddress xsdt, StringView signature);
static Optional<PhysicalAddress> search_table_in_rsdt(PhysicalAddress rsdt, StringView signature);
-static bool validate_table(const Structures::SDTHeader&, size_t length);
+static bool validate_table(Structures::SDTHeader const&, size_t length);
UNMAP_AFTER_INIT void Parser::locate_static_data()
{
@@ -144,7 +144,7 @@ UNMAP_AFTER_INIT Optional<PhysicalAddress> Parser::find_table(StringView signatu
return {};
}
-bool Parser::handle_irq(const RegisterState&)
+bool Parser::handle_irq(RegisterState const&)
{
TODO();
}
@@ -209,7 +209,7 @@ bool Parser::can_reboot()
return m_hardware_flags.reset_register_supported;
}
-void Parser::access_generic_address(const Structures::GenericAddressStructure& structure, u32 value)
+void Parser::access_generic_address(Structures::GenericAddressStructure const& structure, u32 value)
{
switch ((GenericAddressStructure::AddressSpace)structure.address_space) {
case GenericAddressStructure::AddressSpace::SystemIO: {
@@ -334,7 +334,7 @@ UNMAP_AFTER_INIT void Parser::initialize_main_system_description_table()
dmesgln("ACPI: Main Description Table valid? {}", validate_table(*sdt, length));
if (m_xsdt_supported) {
- auto& xsdt = (const Structures::XSDT&)*sdt;
+ auto& xsdt = (Structures::XSDT const&)*sdt;
dmesgln("ACPI: Using XSDT, enumerating tables @ {}", m_main_system_description_table);
dmesgln("ACPI: XSDT revision {}, total length: {}", revision, length);
dbgln_if(ACPI_DEBUG, "ACPI: XSDT pointer @ {}", VirtualAddress { &xsdt });
@@ -343,7 +343,7 @@ UNMAP_AFTER_INIT void Parser::initialize_main_system_description_table()
m_sdt_pointers.append(PhysicalAddress(xsdt.table_ptrs[i]));
}
} else {
- auto& rsdt = (const Structures::RSDT&)*sdt;
+ auto& rsdt = (Structures::RSDT const&)*sdt;
dmesgln("ACPI: Using RSDT, enumerating tables @ {}", m_main_system_description_table);
dmesgln("ACPI: RSDT revision {}, total length: {}", revision, length);
dbgln_if(ACPI_DEBUG, "ACPI: RSDT pointer @ V{}", &rsdt);
@@ -382,10 +382,10 @@ UNMAP_AFTER_INIT Parser::Parser(PhysicalAddress rsdp, PhysicalAddress fadt, u8 i
locate_static_data();
}
-static bool validate_table(const Structures::SDTHeader& v_header, size_t length)
+static bool validate_table(Structures::SDTHeader const& v_header, size_t length)
{
u8 checksum = 0;
- auto* sdt = (const u8*)&v_header;
+ auto* sdt = (u8 const*)&v_header;
for (size_t i = 0; i < length; i++)
checksum += sdt[i];
if (checksum == 0)
diff --git a/Kernel/Firmware/ACPI/Parser.h b/Kernel/Firmware/ACPI/Parser.h
index 77ba39b590..05356fd73e 100644
--- a/Kernel/Firmware/ACPI/Parser.h
+++ b/Kernel/Firmware/ACPI/Parser.h
@@ -53,7 +53,7 @@ public:
static void must_initialize(PhysicalAddress rsdp, PhysicalAddress fadt, u8 irq_number);
virtual StringView purpose() const override { return "ACPI Parser"sv; }
- virtual bool handle_irq(const RegisterState&) override;
+ virtual bool handle_irq(RegisterState const&) override;
Optional<PhysicalAddress> find_table(StringView signature);
@@ -75,8 +75,8 @@ public:
return m_x86_specific_flags.keyboard_8042;
}
- const FADTFlags::HardwareFeatures& hardware_features() const { return m_hardware_flags; }
- const FADTFlags::x86_Specific_Flags& x86_specific_flags() const { return m_x86_specific_flags; }
+ FADTFlags::HardwareFeatures const& hardware_features() const { return m_hardware_flags; }
+ FADTFlags::x86_Specific_Flags const& x86_specific_flags() const { return m_x86_specific_flags; }
~Parser() = default;
@@ -91,7 +91,7 @@ private:
void process_fadt_data();
bool validate_reset_register(Memory::TypedMapping<Structures::FADT> const&);
- void access_generic_address(const Structures::GenericAddressStructure&, u32 value);
+ void access_generic_address(Structures::GenericAddressStructure const&, u32 value);
PhysicalAddress m_rsdp;
PhysicalAddress m_main_system_description_table;
diff --git a/Kernel/Firmware/MultiProcessor/Parser.cpp b/Kernel/Firmware/MultiProcessor/Parser.cpp
index 933c35b5b3..1883afc775 100644
--- a/Kernel/Firmware/MultiProcessor/Parser.cpp
+++ b/Kernel/Firmware/MultiProcessor/Parser.cpp
@@ -56,14 +56,14 @@ UNMAP_AFTER_INIT void MultiProcessorParser::parse_configuration_table()
entry = (MultiProcessor::EntryHeader*)(FlatPtr)entry + sizeof(MultiProcessor::ProcessorEntry);
break;
case ((u8)MultiProcessor::ConfigurationTableEntryType::Bus):
- MUST(m_bus_entries.try_append(*(const MultiProcessor::BusEntry*)entry));
+ MUST(m_bus_entries.try_append(*(MultiProcessor::BusEntry const*)entry));
entry = (MultiProcessor::EntryHeader*)(FlatPtr)entry + sizeof(MultiProcessor::BusEntry);
break;
case ((u8)MultiProcessor::ConfigurationTableEntryType::IOAPIC):
entry = (MultiProcessor::EntryHeader*)(FlatPtr)entry + sizeof(MultiProcessor::IOAPICEntry);
break;
case ((u8)MultiProcessor::ConfigurationTableEntryType::IO_Interrupt_Assignment):
- MUST(m_io_interrupt_assignment_entries.try_append(*(const MultiProcessor::IOInterruptAssignmentEntry*)entry));
+ MUST(m_io_interrupt_assignment_entries.try_append(*(MultiProcessor::IOInterruptAssignmentEntry const*)entry));
entry = (MultiProcessor::EntryHeader*)(FlatPtr)entry + sizeof(MultiProcessor::IOInterruptAssignmentEntry);
break;
case ((u8)MultiProcessor::ConfigurationTableEntryType::Local_Interrupt_Assignment):