summaryrefslogtreecommitdiff
path: root/sys/firmware/acpi
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-26 23:42:50 -0400
committerIan Moffett <ian@osmora.org>2024-05-26 23:44:35 -0400
commitc3e50e6a2101afeadca9568481b6ed4395ae560b (patch)
tree96cd08853bdde8a77a6d89511502f2a72ec4ea61 /sys/firmware/acpi
parenta59842033c0a29f774f895278597c8fc8141f7ac (diff)
kernel: Fixup logging to work with syslog changes
This commit removes the KINFO(), KERR(), ... macros Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/firmware/acpi')
-rw-r--r--sys/firmware/acpi/acpi_init.c12
-rw-r--r--sys/firmware/acpi/acpi_madt.c5
2 files changed, 11 insertions, 6 deletions
diff --git a/sys/firmware/acpi/acpi_init.c b/sys/firmware/acpi/acpi_init.c
index c23506b..a98e429 100644
--- a/sys/firmware/acpi/acpi_init.c
+++ b/sys/firmware/acpi/acpi_init.c
@@ -39,6 +39,8 @@ __MODULE_NAME("acpi");
__KERNEL_META("$Hyra$: acpi_init.c, Ian Marco Moffett, "
"ACPI init logic");
+#define pr_trace(fmt, ...) kprintf("acpi: " fmt, ##__VA_ARGS__)
+
static volatile struct limine_rsdp_request rsdp_req = {
.id = LIMINE_RSDP_REQUEST,
.revision = 0
@@ -58,13 +60,13 @@ static void
acpi_print_oemid(const char *type, char oemid[OEMID_SIZE])
{
if (type != NULL) {
- KINFO("%s OEMID: ", type);
+ pr_trace("%s OEMID: ", type);
}
for (size_t i = 0; i < OEMID_SIZE; ++i) {
- kprintf("%c", oemid[i]);
+ kprintf(OMIT_TIMESTAMP "%c", oemid[i]);
}
- kprintf("\n");
+ kprintf(OMIT_TIMESTAMP "\n");
}
struct acpi_root_sdt *
@@ -97,10 +99,10 @@ acpi_init(void)
if (rsdp->revision >= 2) {
using_xsdt = true;
root_sdt = PHYS_TO_VIRT(rsdp->xsdt_addr);
- KINFO("Using XSDT as root SDT\n");
+ pr_trace("Using XSDT as root SDT\n");
} else {
root_sdt = PHYS_TO_VIRT(rsdp->rsdt_addr);
- KINFO("Using RSDT as root SDT\n");
+ pr_trace("Using RSDT as root SDT\n");
}
if (!acpi_is_checksum_valid(&root_sdt->hdr)) {
panic("Root SDT has an invalid checksum!\n");
diff --git a/sys/firmware/acpi/acpi_madt.c b/sys/firmware/acpi/acpi_madt.c
index 055ebd2..0e2b338 100644
--- a/sys/firmware/acpi/acpi_madt.c
+++ b/sys/firmware/acpi/acpi_madt.c
@@ -40,10 +40,13 @@
#define APIC_TYPE_IO_APIC 1
#define APIC_TYPE_INTERRUPT_OVERRIDE 2
+#define pr_trace(fmt, ...) kprintf("acpi: " fmt, ##__VA_ARGS__)
+
__MODULE_NAME("acpi");
__KERNEL_META("$Hyra$: acpi_madt.c, Ian Marco Moffett, "
"ACPI MADT parsing");
+
static struct acpi_madt *madt = NULL;
void *
@@ -84,7 +87,7 @@ do_parse(struct cpu_info *ci)
ioapic = (struct ioapic *)cur;
- KINFO("Detected I/O APIC (id=%d, gsi_base=%d)\n",
+ pr_trace("Detected I/O APIC (id=%d, gsi_base=%d)\n",
ioapic->ioapic_id, ioapic->gsi_base);
ioapic_mmio_base = (void *)(uintptr_t)ioapic->ioapic_addr;