summaryrefslogtreecommitdiff
path: root/Kernel/ACPI
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-23 23:59:27 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-25 09:47:36 +0100
commit8465683dcf1ede4dbab46915113dd2ce4e4b7dfb (patch)
tree392cdf423fabec6af5550d831e07217fd0e3287b /Kernel/ACPI
parentbb483f7ef4693582d34aa7a30fa2916fdcc8b6f4 (diff)
downloadserenity-8465683dcf1ede4dbab46915113dd2ce4e4b7dfb.zip
Everywhere: Debug macros instead of constexpr.
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
Diffstat (limited to 'Kernel/ACPI')
-rw-r--r--Kernel/ACPI/MultiProcessorParser.cpp2
-rw-r--r--Kernel/ACPI/Parser.cpp18
2 files changed, 10 insertions, 10 deletions
diff --git a/Kernel/ACPI/MultiProcessorParser.cpp b/Kernel/ACPI/MultiProcessorParser.cpp
index bc6340ea54..b0968adc9a 100644
--- a/Kernel/ACPI/MultiProcessorParser.cpp
+++ b/Kernel/ACPI/MultiProcessorParser.cpp
@@ -67,7 +67,7 @@ void MultiProcessorParser::parse_configuration_table()
size_t entry_count = config_table->entry_count;
auto* entry = config_table->entries;
while (entry_count > 0) {
- dbgln<debug_multiprocessor>("MultiProcessor: Entry Type {} detected.", entry->entry_type);
+ dbgln<MULTIPROCESSOR_DEBUG>("MultiProcessor: Entry Type {} detected.", entry->entry_type);
switch (entry->entry_type) {
case ((u8)MultiProcessor::ConfigurationTableEntryType::Processor):
entry = (MultiProcessor::EntryHeader*)(FlatPtr)entry + sizeof(MultiProcessor::ProcessorEntry);
diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp
index c7e54570f6..64db353a2d 100644
--- a/Kernel/ACPI/Parser.cpp
+++ b/Kernel/ACPI/Parser.cpp
@@ -66,12 +66,12 @@ void Parser::locate_static_data()
PhysicalAddress Parser::find_table(const StringView& signature)
{
- dbgln<debug_acpi>("ACPI: Calling Find Table method!");
+ dbgln<ACPI_DEBUG>("ACPI: Calling Find Table method!");
for (auto p_sdt : m_sdt_pointers) {
auto sdt = map_typed<Structures::SDTHeader>(p_sdt);
- dbgln<debug_acpi>("ACPI: Examining Table @ {}", p_sdt);
+ dbgln<ACPI_DEBUG>("ACPI: Examining Table @ {}", p_sdt);
if (!strncmp(sdt->sig, signature.characters_without_null_termination(), 4)) {
- dbgln<debug_acpi>("ACPI: Found Table @ {}", p_sdt);
+ dbgln<ACPI_DEBUG>("ACPI: Found Table @ {}", p_sdt);
return p_sdt;
}
}
@@ -93,7 +93,7 @@ void Parser::init_fadt()
auto sdt = map_typed<Structures::FADT>(m_fadt);
- dbgln<debug_acpi>("ACPI: FADT @ V{}, {}", &sdt, m_fadt);
+ dbgln<ACPI_DEBUG>("ACPI: FADT @ V{}, {}", &sdt, m_fadt);
klog() << "ACPI: Fixed ACPI data, Revision " << sdt->h.revision << ", Length " << sdt->h.length << " bytes";
klog() << "ACPI: DSDT " << PhysicalAddress(sdt->dsdt_ptr);
@@ -219,7 +219,7 @@ void Parser::try_acpi_reboot()
klog() << "ACPI: Reboot, Not supported!";
return;
}
- dbgln<debug_acpi>("ACPI: Rebooting, Probing FADT ({})", m_fadt);
+ dbgln<ACPI_DEBUG>("ACPI: Rebooting, Probing FADT ({})", m_fadt);
auto fadt = map_typed<Structures::FADT>(m_fadt);
ASSERT(validate_reset_register());
@@ -267,18 +267,18 @@ void Parser::initialize_main_system_description_table()
auto& xsdt = (const Structures::XSDT&)*sdt;
klog() << "ACPI: Using XSDT, Enumerating tables @ " << m_main_system_description_table;
klog() << "ACPI: XSDT Revision " << revision << ", Total length - " << length;
- dbgln<debug_acpi>("ACPI: XSDT pointer @ V{}", &xsdt);
+ dbgln<ACPI_DEBUG>("ACPI: XSDT pointer @ V{}", &xsdt);
for (u32 i = 0; i < ((length - sizeof(Structures::SDTHeader)) / sizeof(u64)); i++) {
- dbgln<debug_acpi>("ACPI: Found new table [{0}], @ V{1:p} - P{1:p}", i, &xsdt.table_ptrs[i]);
+ dbgln<ACPI_DEBUG>("ACPI: Found new table [{0}], @ V{1:p} - P{1:p}", i, &xsdt.table_ptrs[i]);
m_sdt_pointers.append(PhysicalAddress(xsdt.table_ptrs[i]));
}
} else {
auto& rsdt = (const Structures::RSDT&)*sdt;
klog() << "ACPI: Using RSDT, Enumerating tables @ " << m_main_system_description_table;
klog() << "ACPI: RSDT Revision " << revision << ", Total length - " << length;
- dbgln<debug_acpi>("ACPI: RSDT pointer @ V{}", &rsdt);
+ dbgln<ACPI_DEBUG>("ACPI: RSDT pointer @ V{}", &rsdt);
for (u32 i = 0; i < ((length - sizeof(Structures::SDTHeader)) / sizeof(u32)); i++) {
- dbgln<debug_acpi>("ACPI: Found new table [{0}], @ V{1:p} - P{1:p}", i, &rsdt.table_ptrs[i]);
+ dbgln<ACPI_DEBUG>("ACPI: Found new table [{0}], @ V{1:p} - P{1:p}", i, &rsdt.table_ptrs[i]);
m_sdt_pointers.append(PhysicalAddress(rsdt.table_ptrs[i]));
}
}