diff options
author | Ian Moffett <ian@osmora.org> | 2025-02-21 13:15:10 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-02-21 13:26:21 -0500 |
commit | d7e2dc844666cf3f488fd69409640f1f8a9844d4 (patch) | |
tree | 2535df387fe0d21408c46ae4da81e7cc66432858 /sys/arch/amd64 | |
parent | 5d7bb645345ff30124767289f3fa1b552df76cf1 (diff) |
kernel: Update kernel log style
Kernel logs must now all be lowercase for consistency. A new style
called Peripheral Description Notation (PDN) has also been introduced
to describe devices.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/hpet.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/ioapic.c | 12 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/lapic.c | 13 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/mp.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/trap.c | 8 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/tss.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/pci/pci_resource.c | 2 |
8 files changed, 28 insertions, 28 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 49f70ac..7533621 100644 --- a/sys/arch/amd64/amd64/acpi_machdep.c +++ b/sys/arch/amd64/amd64/acpi_machdep.c @@ -46,7 +46,7 @@ acpi_init_madt(void) uint8_t *cur, *end; if (madt == NULL) { - panic("Could not find MADT!\n"); + panic("could not find MADT!\n"); } cur = (uint8_t *)(madt + 1); @@ -60,15 +60,12 @@ acpi_init_madt(void) * TODO: Figure out how to use multiple I/O APICs */ if (ioapic != NULL) { - pr_trace("Skipping I/O APIC with ID %d\n", ioapic->ioapic_id); + pr_trace("skipping I/O APIC with ID %d\n", ioapic->ioapic_id); break; } ioapic = (struct ioapic *)cur; - pr_trace("Detected I/O APIC (id=%d, gsi_base=%d)\n", - ioapic->ioapic_id, ioapic->gsi_base); - - ioapic_init((void *)(uintptr_t)ioapic->ioapic_addr); + ioapic_init(ioapic); } cur += apichdr->length; diff --git a/sys/arch/amd64/amd64/hpet.c b/sys/arch/amd64/amd64/hpet.c index 28baa35..1670546 100644 --- a/sys/arch/amd64/amd64/hpet.c +++ b/sys/arch/amd64/amd64/hpet.c @@ -157,7 +157,7 @@ hpet_init(void) /* Ensure caps aren't bogus */ caps = hpet_read(HPET_REG_CAPS); if (CAP_REV_ID(caps) == 0) { - pr_error("Found bogus revision, assuming faulty\n"); + pr_error("found bogus revision, assuming faulty\n"); return -1; } if (CAP_CLK_PERIOD(caps) > 0x05F5E100) { @@ -166,7 +166,7 @@ hpet_init(void) * be <= 0x05F5E100. So we'll consider it as bogus * if it exceeds this value */ - pr_error("Found bogus COUNTER_CLK_PERIOD, assuming faulty\n"); + pr_error("found bogus COUNTER_CLK_PERIOD, assuming faulty\n"); return 1; } diff --git a/sys/arch/amd64/amd64/ioapic.c b/sys/arch/amd64/amd64/ioapic.c index 8c92b95..943839f 100644 --- a/sys/arch/amd64/amd64/ioapic.c +++ b/sys/arch/amd64/amd64/ioapic.c @@ -59,7 +59,7 @@ irq_to_gsi(uint8_t irq) if (madt == NULL) madt = acpi_query("APIC"); if (madt == NULL) - panic("Failed to fetch MADT\n"); + panic("failed to fetch MADT\n"); cur = (uint8_t *)(madt + 1); end = (uint8_t *)madt + madt->hdr.length; @@ -211,20 +211,20 @@ ioapic_set_vec(uint8_t irq, uint8_t vector) } void -ioapic_init(void *base) +ioapic_init(struct ioapic *p) { size_t tmp; uint8_t redir_ent_cnt, ver; - ioapic_base = base; + ioapic_base = (void *)((uintptr_t)p->ioapic_addr); tmp = ioapic_readl(IOAPICVER); ver = tmp & 0xFF; redir_ent_cnt = ((tmp >> 16) & 0xFF) + 1; - pr_trace("version=%d, address=0x%x\n", ver, base); - pr_trace("Masking %d GSIs...\n", redir_ent_cnt); - for (uint8_t i = 0; i < redir_ent_cnt; ++i) { ioapic_gsi_mask(i); } + + pr_trace("ioapic0 at mainbus0: ver %d, addr %p\n", ver, ioapic_base); + pr_trace("%d GSIs masked\n", redir_ent_cnt); } diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index f74aea4..70d36a5 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -321,18 +321,19 @@ lapic_init(void) { struct cpu_info *ci = this_cpu(); union tss_stack tmr_stack; + char *modestr; /* * Hyra currently depends on the existance * of a Local APIC. */ if (!lapic_supported()) { - panic("This machine does not support LAPIC!\n"); + panic("this machine does not support LAPIC!\n"); } /* Try to allocate LAPIC timer interrupt stack */ if (tss_alloc_stack(&tmr_stack, DEFAULT_PAGESIZE) != 0) { - panic("Failed to allocate LAPIC TMR stack!\n"); + panic("failed to allocate LAPIC TMR stack!\n"); } tss_update_ist(ci, tmr_stack, IST_SCHED); @@ -346,7 +347,7 @@ lapic_init(void) /* Ensure the LAPIC base is valid */ if (g_lapic_base == 0) { - panic("Invalid LAPIC base\n"); + panic("invalid LAPIC base\n"); } ci->has_x2apic = lapic_has_x2apic(); @@ -354,8 +355,10 @@ lapic_init(void) ci->apicid = lapic_read_id(ci); ci->lapic_tmr_freq = lapic_timer_init(); - bsp_trace("BSP LAPIC enabled in %s mode (id=%d)\n", - ci->has_x2apic ? "x2APIC" : "xAPIC", ci->apicid); + modestr = ci->has_x2apic ? "x2apic" : "xapic"; + + bsp_trace("lapic0 at cpu0: apicid %d\n"); + bsp_trace("lapic0 in %s mode\n", modestr); /* Try to register the timer */ lapic_timer.name = "LAPIC_INTEGRATED_TIMER"; diff --git a/sys/arch/amd64/amd64/mp.c b/sys/arch/amd64/amd64/mp.c index 501f7e8..a8a36c7 100644 --- a/sys/arch/amd64/amd64/mp.c +++ b/sys/arch/amd64/amd64/mp.c @@ -81,10 +81,10 @@ mp_bootstrap_aps(struct cpu_info *ci) return; } - pr_trace("Bootstrapping %d cores...\n", cpu_init_counter); + pr_trace("bootstrapping %d cores...\n", cpu_init_counter); for (size_t i = 0; i < resp->cpu_count; ++i) { if (ci->apicid == cpus[i]->lapic_id) { - pr_trace("Skip %d (BSP)... continue\n", ci->apicid); + pr_trace("skip %d (BSP)... continue\n", ci->apicid); continue; } diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 6705e1a..29056b0 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -105,7 +105,7 @@ trap_user(struct trapframe *tf) sigaddset(&sigset, SIGFPE); break; default: - kprintf("Got unknown user trap %d\n", tf->trapno); + kprintf("got unknown user trap %d\n", tf->trapno); sigaddset(&sigset, SIGKILL); break; } @@ -142,10 +142,10 @@ trap_handler(struct trapframe *tf) splraise(IPL_HIGH); if (tf->trapno >= NELEM(trap_type)) { - panic("Got unknown trap %d\n", tf->trapno); + panic("got unknown trap %d\n", tf->trapno); } - pr_error("Got %s\n", trap_type[tf->trapno]); + pr_error("got %s\n", trap_type[tf->trapno]); /* Handle traps from userland */ if (ISSET(tf->cs, 3)) { @@ -154,5 +154,5 @@ trap_handler(struct trapframe *tf) } regdump(tf); - panic("Fatal trap - halting\n"); + panic("fatal trap - halting\n"); } diff --git a/sys/arch/amd64/amd64/tss.c b/sys/arch/amd64/amd64/tss.c index bfda31c..b82a230 100644 --- a/sys/arch/amd64/amd64/tss.c +++ b/sys/arch/amd64/amd64/tss.c @@ -57,14 +57,14 @@ alloc_resources(struct cpu_info *ci) tss = dynalloc(sizeof(*tss)); if (tss == NULL) { - panic("Failed to alloc TSS\n"); + panic("failed to alloc TSS\n"); } memset(tss, 0, sizeof(*tss)); rsp0_base = vm_alloc_frame(1) + VM_HIGHER_HALF; if (rsp0_base == 0) { - panic("Could not allocate RSP0 base\n"); + panic("could not allocate RSP0 base\n"); } rsp0 = rsp0_base + STACK_SIZE; diff --git a/sys/arch/amd64/pci/pci_resource.c b/sys/arch/amd64/pci/pci_resource.c index 5ca597b..92d8a5f 100644 --- a/sys/arch/amd64/pci/pci_resource.c +++ b/sys/arch/amd64/pci/pci_resource.c @@ -73,7 +73,7 @@ pcir_enable_dma(struct bus_resource *brp, void *devp) * is disabled. */ if (!ISSET(brp->sem, BUS_DMA)) { - pr_trace("Bus marked non DMA capable, DMA not enabled\n"); + pr_trace("bus marked non DMA capable, DMA not enabled\n"); return -EACCES; } |