]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: remove all #if x86 guards from shell.c, migrate to kprintf + HAL
authorTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 05:47:20 +0000 (02:47 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 05:47:20 +0000 (02:47 -0300)
commitc0a88a8652d761ca1e17b1a342266c96f21079db
treefe4f5f051d921ea16d54f1012949ba1616e42ea1
parentf6f684e125ed63ade43bdd526a03a3f77e8a18ca
refactor: remove all #if x86 guards from shell.c, migrate to kprintf + HAL

shell.c is generic kernel code and should not contain any
architecture-specific guards or inline assembly.

Changes:
- Replace all uart_print() calls with kprintf() so output goes
  through the console subsystem and into the kernel log buffer
- Replace x86 'cli; ud2' panic asm with hal_cpu_disable_interrupts()
  + hal_cpu_idle() loop
- Replace #if x86 ring3 guard with arch_platform_usermode_test_start()
  which is already a generic wrapper with per-arch implementations
- Use console_write() for echo/backspace (no log buffer pollution)
- Remove unnecessary uart_console.h and vga_console.h includes

Passes: make, cppcheck, QEMU smoke test.
src/kernel/shell.c