fb_scroll_rows() hardcoded the pixel distance it physically shifts the framebuffer by as char_rows * 16 * scale -- the bitmap-font (font_8x16.c) cell height -- regardless of which glyph mode vt100.c actually had active. In TTF mode (the REPL's default, cell height 24px via VT100_TTF_CELL_H_PX) this meant every scroll_up(1) call physically shifted the framebuffer by only 16px while the text model (g_vt.rows, py_of()) placed each row 24px apart. That 8px-per-scroll shortfall compounds with every subsequent scroll: a few scrolls barely show it, but enough scrolls -- or scrolling quickly, which is just many scrolls in a short span -- accumulates into visible pixel overlap between rows, with newer lines drawn on top of the tail end of older ones. fb_scroll_rect() (the box-confined scroll added later for 4.4t) already carried a doc comment calling this out explicitly, describing its own explicit pixel_rows parameter as the fix for fb_scroll_rows()'s "fixed 16px-row assumption" -- fb_scroll_rows() itself was just never updated to match. Fixed by changing fb_scroll_rows()'s parameter from an implicit char_rows count to an explicit pixel_rows count (matching fb_scroll_rect()'s existing convention), and having its one caller (vt100.c's scroll_up()) pass lines * cell_h() -- the real active cell height -- instead of a raw line count for the callee to guess at. Verified: booted amd64 to the REPL (TTF mode active per sk_repl()'s own console_fb_enable_ttf() call), let boot chatter + WORDS output scroll the screen through thousands of accumulated scroll_up() calls, then measured every visible line's y-position via a QMP screendump. Spacing held at a perfectly consistent 24px (TTF cell height) top to bottom with zero drift -- the old hardcoded-16px bug could not have produced that after this many scrolls. Re-verified boot to ok> on all three architectures (amd64/aarch64/riscv64) per repo acceptance policy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
include/starkernel/
Headers for LithosAnanke, the bare-metal UEFI kernel (src/starkernel/).
Built only via Makefile.starkernel; gated by __STARKERNEL__ when shared
with hosted code.
uefi.h— UEFI protocol/type definitions consumed by the loader.elf64.h,elf_loader.h— ELF64 parsing and kernel-image loading.boot_info_offsets.h— struct-offset constants shared between the assembly bootstrap and the C boot path.arch.h,apic.h,timer.h— architecture init, APIC interrupt controller, timer (TSC/HPET/APIC, 100 Hz heartbeat).console.h,framebuffer.h,vt100.h— UART 16550 console, framebuffer driver, and VT100 terminal emulation over the framebuffer.pmm.h,vmm.h,kmalloc.h— physical memory manager (bitmap allocator), 4-level x86_64 paging, kernel heap allocator.pci.h,virtio_blk.h— PCI enumeration and the VirtIO block device driver (disk backend for the kernel block subsystem).capsule.h,capsule_birth.h,capsule_loader.h,capsule_run.h,capsule_vm_physics.h,capsule_generated.h— capsule system types, birth protocol, physics-runtime capsule bindings, and the build-time- generated capsule directory (seetools/mkcapsule.c).kernel_args.h,cmdline.h— boot-time kernel argument parsing (starforth.cfg/ command line).repl.h— kernel REPL.log.h,doe_log.h— kernel logging and DoE metrics logging.q48_16.h— kernel-build copy of Q48.16 fixed-point arithmetic.xxhash64.h— content-addressing hash used for capsule IDs.hal_memory.h— hardware-abstraction-layer memory interface.
Subdirectories:
hal/— top-level hardware-abstraction-layer interface.vm/— kernel VM subsystem headers (capsule arena, parity logging, bootstrap wiring).freestanding/— minimal libc-shim headers (assert.h,ctype.h,errno.h,inttypes.h,math.h,sched.h,signal.h,stdio.h,stdlib.h,string.h,time.h,sys/time.h,sys/types.h) for building shared VM code in the freestanding kernel environment, where no real libc is available.