boot: driver chatter goes to the log; the console clears its margins
ACPI, DMI, SMP, xHCI, USB, I2C, NVMe, r8169 and ramdisk progress lines are kinfo now: in dmesg and on a verbose boot, off the screen of a working machine. Failures stay cprintf. vt_repaint also paints the strip right of the last column and below the last row, which kept the bottom of the X desktop after Ctrl+Alt+F-key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
f6c4b6377f
commit
c65bfa3fa3
16 changed files with 57 additions and 42 deletions
|
|
@ -1062,7 +1062,7 @@ attach_device(struct xhci *x, const struct usb_dev *proto, int parent,
|
|||
// cprintf does not pad: "%04x" prints like "%x". It used to be worse -- an
|
||||
// unknown directive consumed no argument and every one after it landed in
|
||||
// the wrong place, which is what once turned this line into rubbish.
|
||||
cprintf("usb: port %d%s slot %d %x:%x %s, %s speed, %d configuration%s\n",
|
||||
kinfo("usb: port %d%s slot %d %x:%x %s, %s speed, %d configuration%s\n",
|
||||
proto->port, proto->route ? " (via hub)" : "", slot,
|
||||
desc->idVendor, desc->idProduct,
|
||||
class_name(desc->bDeviceClass), speed_name(speed),
|
||||
|
|
@ -1192,7 +1192,7 @@ xhci_detach(struct usb_dev *hub, int hub_port)
|
|||
for(i = 1; i <= MAX_SLOTS; i++)
|
||||
if(x->slot[i].used && x->slot[i].parent == hub->slot &&
|
||||
x->slot[i].pport == hub_port){
|
||||
cprintf("usb: slot %d unplugged from hub slot %d port %d\n",
|
||||
kinfo("usb: slot %d unplugged from hub slot %d port %d\n",
|
||||
i, hub->slot, hub_port);
|
||||
free_slot(x, i);
|
||||
}
|
||||
|
|
@ -1492,7 +1492,7 @@ bios_handoff(struct xhci *x)
|
|||
for(i = 0; i < 1000 && (rd32(x->cap, off) & LEGSUP_BIOS_OWNED); i++)
|
||||
microdelay(1000);
|
||||
if(rd32(x->cap, off) & LEGSUP_BIOS_OWNED){
|
||||
cprintf("xhci: firmware would not hand over; taking it anyway\n");
|
||||
kinfo("xhci: firmware would not hand over; taking it anyway\n");
|
||||
wr32(x->cap, off,
|
||||
(rd32(x->cap, off) & ~LEGSUP_BIOS_OWNED) | LEGSUP_OS_OWNED);
|
||||
} else
|
||||
|
|
@ -1583,7 +1583,7 @@ xhci_probe(struct pci_dev *d)
|
|||
// dword and take the top half.
|
||||
{
|
||||
uint32 v = rd32(x->cap, 0) >> 16;
|
||||
cprintf("xhci: version %d.%d%d, %d ports, %d slots, %d-byte contexts\n",
|
||||
kinfo("xhci: version %d.%d%d, %d ports, %d slots, %d-byte contexts\n",
|
||||
(v >> 8) & 0xFF, (v >> 4) & 0xF, v & 0xF,
|
||||
x->maxports, x->maxslots, x->ctxsize);
|
||||
}
|
||||
|
|
@ -1670,7 +1670,7 @@ xhci_probe(struct pci_dev *d)
|
|||
}
|
||||
|
||||
if(x->ndevices == 0)
|
||||
cprintf("xhci: no devices attached\n");
|
||||
kinfo("xhci: no devices attached\n");
|
||||
|
||||
|
||||
// Now, and only now, turn interrupts on. The order is: claim the line
|
||||
|
|
@ -1689,7 +1689,7 @@ xhci_probe(struct pci_dev *d)
|
|||
// can sleep rather than spin -- but only if something will wake it. With
|
||||
// no interrupt at all, transfers go on spinning as they did during probe.
|
||||
if(pci_irq_attach(d, xhci_irq, x, "xhci", PCI_IRQF_MSIX) < 0){
|
||||
cprintf("xhci: no interrupt; transfers will be polled\n");
|
||||
kinfo("xhci: no interrupt; transfers will be polled\n");
|
||||
} else {
|
||||
x->can_sleep = 1;
|
||||
x->running = 1;
|
||||
|
|
@ -1754,13 +1754,13 @@ scan_ports(struct xhci *x)
|
|||
if(!(sc & PORT_CCS)){
|
||||
x->port_failed[port] = 0;
|
||||
if(slot){
|
||||
cprintf("usb: port %d: unplugged\n", port);
|
||||
kinfo("usb: port %d: unplugged\n", port);
|
||||
free_slot(x, slot);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if(slot && (chg & PORT_CSC)){
|
||||
cprintf("usb: port %d: replugged\n", port);
|
||||
kinfo("usb: port %d: replugged\n", port);
|
||||
free_slot(x, slot);
|
||||
slot = 0;
|
||||
}
|
||||
|
|
@ -1772,7 +1772,7 @@ scan_ports(struct xhci *x)
|
|||
sleep_ticks(100 / MSEC_PER_TICK);
|
||||
if(!(rd32(x->op, XHCI_PORTSC(port)) & PORT_CCS))
|
||||
continue;
|
||||
cprintf("usb: port %d: plugged in\n", port);
|
||||
kinfo("usb: port %d: plugged in\n", port);
|
||||
if(enumerate_port(x, port) < 0)
|
||||
x->port_failed[port] = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue