Skip to content

Commit

Permalink
rcbus-z8: baby steps
Browse files Browse the repository at this point in the history
  • Loading branch information
EtchedPixels committed Dec 3, 2024
1 parent 3cf7eea commit 15ae0d7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Kernel/platform/platform-rcbus-z8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ clean:
rm -f $(OBJS) $(JUNK) core *~ bootblock.bin bootblock fuzix.bin loader.tmp

image:
$(CROSS_LD) -i -b -Z 48 -C 0x0100 -D 0x0000 -S 0xF000 -f CXSDLBbs -o fuzix.bin crt0.o devices.o main.o \
$(CROSS_LD) -b -Z 48 -C 0x0100 -S 0xF000 -f CLDBbXSs -o fuzix.bin crt0.o devices.o main.o \
discard.o commonmem.o tricks.o rcbus-z8.o devtty.o \
../../start.o ../../version.o ../../cpu-z8/lowlevel-z8.o \
../../mm/bankfixed.o ../../timer.o ../../kdata.o ../../mm/memalloc_none.o \
Expand Down
7 changes: 5 additions & 2 deletions Kernel/platform/platform-rcbus-z8/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@
#if 0
#define SWAPDEV (256 + 1) /* Device for swapping. (FIXME) */
#endif
#define NBUFS 8 /* Number of block buffers */
#define NMOUNTS 4 /* Number of mounts at a time */
/* TODO make dynamic */
#define NBUFS 5 /* Number of block buffers */
#define NMOUNTS 3 /* Number of mounts at a time */

#define plt_discard()
#define plt_copyright()

#define BOOTDEVICENAMES "hd#"

#define CONFIG_SMALL
30 changes: 10 additions & 20 deletions Kernel/platform/platform-rcbus-z8/crt0.S
Original file line number Diff line number Diff line change
@@ -1,38 +1,28 @@
#include "../../cpu-z8/kernel-z8.def"


;
; Loaded at 0x0100
; Execution begins at 0x0102
; Loaded as a direct image map
;
.code
.export init

.word 0x5A38 ; magic
; Next 5 words and this get trampled by IRQ vectors

init:
di
srp #0x10
ld 254,#>kstack_top
ld 255,#<kstack_top

call init_early
; Must run before any C code to set up the fast pointers
call __reginit

; Shuffle up the segments we packed at the end and which
; cover E000-FFFF areas. We put them in the upper 8K of
; the data area in the load (C000-DFFF)
ld r12,#0xC0
clr r13
ld r14,#>__common
ld r15,#<__common
ld r10,#>__common_size
ld r11,#<__common_size
copy_common:
lde r9,@rr12
ldc @rr14,r9 ; From data to code map
incw rr12
incw rr14
decw rr10
jr nz, copy_common
call init_early

copy_commondata:
; Currently no commondata - add if needed
; Wipe the BSS

ld r12,#>__bss
ld r13,#<__bss
Expand Down

0 comments on commit 15ae0d7

Please sign in to comment.