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
|
|
@ -273,7 +273,7 @@ dmi_init(void)
|
|||
|
||||
find();
|
||||
if (tab == 0) {
|
||||
cprintf("DMI: not present or invalid.\n");
|
||||
kinfo("DMI: not present or invalid.\n");
|
||||
return;
|
||||
}
|
||||
if (dmi_field(DMI_SYS_VENDOR, v, sizeof v) < 0) v[0] = 0;
|
||||
|
|
@ -281,5 +281,5 @@ dmi_init(void)
|
|||
if (dmi_field(DMI_BOARD_NAME, b, sizeof b) < 0) b[0] = 0;
|
||||
if (dmi_field(DMI_BIOS_VERSION, bv, sizeof bv) < 0) bv[0] = 0;
|
||||
if (dmi_field(DMI_BIOS_DATE, bd, sizeof bd) < 0) bd[0] = 0;
|
||||
cprintf("DMI: %s %s/%s, BIOS %s %s\n", v, p, b, bv, bd);
|
||||
kinfo("DMI: %s %s/%s, BIOS %s %s\n", v, p, b, bv, bd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ ramdiskinit(void)
|
|||
rd_scff = h;
|
||||
rd_blocks = (uint)(h->image_bytes / BSIZE);
|
||||
rd_first = 0;
|
||||
cprintf("ramdisk: SCFF, %u MB in %u MB, %u chunks of %u KB\n",
|
||||
kinfo("ramdisk: SCFF, %u MB in %u MB, %u chunks of %u KB\n",
|
||||
(uint)(h->image_bytes >> 20), (uint)(rd_size >> 20),
|
||||
h->nchunks, h->chunk_bytes >> 10);
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ ramdiskinit(void)
|
|||
panic("ramdiskinit: embedded image smaller than a superblock");
|
||||
|
||||
if(!rd_scff)
|
||||
cprintf("ramdisk: %u blocks (%u KB) at %p\n",
|
||||
kinfo("ramdisk: %u blocks (%u KB) at %p\n",
|
||||
rd_blocks, (uint)(rd_size / 1024), rd_base);
|
||||
#else
|
||||
rd_base = 0;
|
||||
|
|
@ -155,7 +155,7 @@ ramdisk_blocks(void)
|
|||
if (extra > room)
|
||||
extra = room;
|
||||
rd_total = rd_blocks + extra;
|
||||
cprintf("ramdisk: %u MB image, %u MB of memory to grow into\n",
|
||||
kinfo("ramdisk: %u MB image, %u MB of memory to grow into\n",
|
||||
(uint)(rd_size >> 20), (uint)(extra * BSIZE >> 20));
|
||||
}
|
||||
release(&rd_lock);
|
||||
|
|
|
|||
|
|
@ -240,6 +240,21 @@ vt_repaint(struct vt *v)
|
|||
{
|
||||
if (!is_active(v))
|
||||
return;
|
||||
|
||||
// The margins first: the screen is rarely a whole number of cells, and the
|
||||
// strip right of the last column and below the last row belongs to nobody.
|
||||
// Coming back from X, that strip still held the bottom of the desktop.
|
||||
int cw, ch;
|
||||
gfx_cell_size(&cw, &ch);
|
||||
if (cw > 0 && ch > 0) {
|
||||
int w = (int)gfx_width(), h = (int)gfx_height();
|
||||
uint32 bg = vt_rgb(v->bg);
|
||||
if (w > v->cols * cw)
|
||||
gfx_fill_rect(v->cols * cw, 0, w - v->cols * cw, h, bg);
|
||||
if (h > v->rows * ch)
|
||||
gfx_fill_rect(0, v->rows * ch, w, h - v->rows * ch, bg);
|
||||
}
|
||||
|
||||
for (int r = 0; r < v->rows; r++)
|
||||
for (int c = 0; c < v->cols; c++) {
|
||||
struct vtcell *k = cell_at(v, c, r);
|
||||
|
|
|
|||
Loading…
Reference in a new issue