aboutsummaryrefslogtreecommitdiffstats
path: root/src/kdata.asm
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-18 00:46:26 +0200
committeruser <user@clank>2026-07-18 00:46:26 +0200
commit3fd3454212dc1d4dc396e393812833ec2e15e41a (patch)
treedf5888d9d7dcc377b5d8925b3cf05a3b56742318 /src/kdata.asm
parentrefactor: c/ -> usr/, compiled program blobs out of the source tree (diff)
downloadgbos-3fd3454212dc1d4dc396e393812833ec2e15e41a.tar.gz
gbos-3fd3454212dc1d4dc396e393812833ec2e15e41a.tar.xz
gbos-3fd3454212dc1d4dc396e393812833ec2e15e41a.zip
kernel: dmesg-style boot spew before init spawns
Print everything the kernel knows implicitly at boot, Linux-flavored, on the LCD console and mirrored over the link (gbhub logs each GB's boot): gbos sm83 microkernel console: CGB (boot a=$11) <- boot ROM's A/B, saved at entry cart: mbc5, 1M rom, 128K sram <- our own cart header ($0147-49) mem: 32K wram 16K vram 127B hram <- CGB constants proc: 8 slots, 31 programs <- link-time table sizes net: slip on link port, 4 sockets fs: gbfs v3 mounted, 120/128 blk free <- bitmap popcount; 'formatted' tty: 40x18 console, SELECT = osk on first boot init: spawning pid 1 New src/dmesg.asm with kernel print helpers (kputc/kputs/kputhex/kputdec) that bypass KPutc (no process context at boot). term_init now runs before net/fs init so the spew is visible as subsystems come up.
Diffstat (limited to 'src/kdata.asm')
-rw-r--r--src/kdata.asm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kdata.asm b/src/kdata.asm
index 83ed162..65a059a 100644
--- a/src/kdata.asm
+++ b/src/kdata.asm
@@ -62,3 +62,6 @@ wSleepLastDiv::DS 1 ; sys_sleep: previous DIV reading
wKillParent::DS 1 ; scratch for sys_kill
wPsBuf:: DS 2 ; scratch for sys_ps
wPnStart:: DS 2 ; scratch for sys_progname
+wBootA:: DS 1 ; A at entry: console model from the boot ROM
+wBootB:: DS 1 ; B at entry: bit0 set = AGB (GBA in CGB mode)
+wBootFsFresh::DS 1 ; fs_init formatted a blank disk this boot