duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit a0ee5fb718b9a0e975d4d2354725139b956cf4d5
parent 6b674bac400c0e4dea286daecae9838c03e99fe6
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Fri, 26 May 2023 15:29:47 -0400

rpi: begin bringing in bootlo

: baz foo bar ; baz

Diffstat:
MMakefile | 4+++-
Mfs/xcomp/arm/rpi/kernel.fs | 10+++++++++-
Mfs/xcomp/rpiboot.fs | 1+
3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -45,9 +45,11 @@ rpi.img: dusk $(ALLSRCS) dd if=/dev/zero of=$@ bs=1K count=1 ./dusk < buildrpi.fs +# To quit, you have to first drop to QEMU monitor through CTRL+A then 'c', and +# then type "quit" (or use QEMU's monitor for debugging). .PHONY: rpirun rpirun: rpi.img - qemu-system-arm -M raspi1ap -serial stdio -display none \ + qemu-system-arm -M raspi1ap -serial mon:stdio -display none \ -device loader,addr=0x8000,file=rpi.img .PHONY: run diff --git a/fs/xcomp/arm/rpi/kernel.fs b/fs/xcomp/arm/rpi/kernel.fs @@ -79,6 +79,8 @@ xcode abort mov) rPSP rd) PSTOP i) ,) wjmp, quit +xcode bye 0 b) ,) + xcode emit ( c -- ) pc ldr) r3 rd) r8 rn) UART0_FR +i) ,) @@ -252,7 +254,7 @@ pc to lblwriterange \ r0=addr r1=len str) r3 rd) r2 rn) ,) lret, -pc to lblrel \ r0=abs addr -- r0=rel offset +pc to lblrel \ r0=abs addr -- r0=rel offset | preserves r6 lblhere r2 pc>reg, ldr) r1 rd) r2 rn) ,) sub) r0 rdn) r1 rm) ,) @@ -304,11 +306,17 @@ xcode exit, ldr) r0 rdn) ,) lbldwrite abs>rel b) ,) +pc rLR push, rLR pop, xcode execute, ( w -- ) + ( pc ) r6 pc>reg, + ldr) r0 rd) r6 rn) 4 +i) post) ,) + lbldwrite abscall, mov) r0 rd) rTOP rm) ,) xdrop, lblrel abscall, \ r0=offset orr) r0 rdn) $eb000000 i) ,) + lbldwrite abscall, + ldr) r0 rd) r6 rn) ,) lbldwrite abs>rel b) ,) xcode ; ximm diff --git a/fs/xcomp/rpiboot.fs b/fs/xcomp/rpiboot.fs @@ -1,2 +1,3 @@ +code : ] code ] ; uartinit prompt interactive!