diff options
Diffstat (limited to 'src/boot.asm')
| -rw-r--r-- | src/boot.asm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/boot.asm b/src/boot.asm index 7c175ce..1f4a048 100644 --- a/src/boot.asm +++ b/src/boot.asm @@ -49,7 +49,14 @@ KernelInit: call ClearKernelRAM call CopyHramCode ; move context-switch trampoline into HRAM call ProcInit ; wipe process table - call fs_init ; set up the RAM filesystem + ; point wCurProc at the (zeroed) kernel PCB so disk I/O during boot restores + ; RAM bank 0 after each block transfer (wKernelPCB.PROC_RAMB = 0). + ld a, LOW(wKernelPCB) + ld [wCurProc], a + ld a, HIGH(wKernelPCB) + ld [wCurProc+1], a + call blk_init ; format the disk if needed (persists otherwise) + call fs_init ; (legacy WRAMX filesystem, still used by tools) ; --- spawn the init task (pid 1); it fork()s the rest --- ld hl, TaskInit |
