From: Alan Cox Date: Sat, 6 Oct 2018 21:04:22 +0000 (+0100) Subject: rc2014: turn on all the features X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b117e2df304a957f1d697b9d2cc80d2d03d40e71;p=FUZIX.git rc2014: turn on all the features This is a bit of a tight fit but the core works with this changed. The discard must not start below C300 to leave space for the arguments and bootup processing. --- diff --git a/Kernel/platform-rc2014/Makefile b/Kernel/platform-rc2014/Makefile index 4a62f2ff..2c674d95 100644 --- a/Kernel/platform-rc2014/Makefile +++ b/Kernel/platform-rc2014/Makefile @@ -28,7 +28,7 @@ $(AOBJS): %.rel: %.s $(CROSS_AS) $(ASOPTS) $< $(COBJS): %.rel: %.c - $(CROSS_CC) $(CROSS_CCOPTS) -c $< + $(CROSS_CC) $(CROSS_CCOPTS) --codeseg COMMONMEM -c $< $(DOBJS): %.rel: ../dev/%.c $(CROSS_CC) $(CROSS_CCOPTS) -c $< @@ -52,8 +52,7 @@ clean: # Compile up the boot block # image: bootblock - dd if=/dev/zero of=pad bs=256 count=1 - cat boot-romwbw.bin pad ../fuzix.bin >fuzix.romwbw + cat boot-romwbw.bin ../fuzix.bin >fuzix.romwbw bootblock: sdasz80 -o boot-romwbw.s diff --git a/Kernel/platform-rc2014/config.h b/Kernel/platform-rc2014/config.h index f45a1244..a16ebba4 100644 --- a/Kernel/platform-rc2014/config.h +++ b/Kernel/platform-rc2014/config.h @@ -21,16 +21,16 @@ #define TICKSPERSEC 10 /* Ticks per second */ #define PROGBASE 0x0000 /* also data base */ #define PROGLOAD 0x0100 /* also data base */ -#define PROGTOP 0xF000 /* Top of program, base of U_DATA copy */ +#define PROGTOP 0xD000 /* Top of program, base of U_DATA copy */ /* FIXME: check this... for discard looks wrong */ #define KERNTOP 0xC000 /* Top of kernel (first 3 banks), base of shared bank */ #define PROC_SIZE 64 /* Memory needed per process */ //#define SWAPDEV (swap_dev) /* A variable for dynamic, or a device major/minor */ extern unsigned int swap_dev; -#define SWAP_SIZE 0x79 /* 60.5K in blocks (prog + udata) */ +#define SWAP_SIZE 0x69 /* 60.5K in blocks (prog + udata) */ #define SWAPBASE 0x0000 /* start at the base of user mem */ -#define SWAPTOP 0xF200 /* Swap out udata and program */ +#define SWAPTOP 0xD200 /* Swap out udata and program */ #define MAX_SWAPS 16 /* We will size if from the partition */ /* Swap will be set up when a suitably labelled partition is seen */ #define CONFIG_DYNAMIC_SWAP @@ -60,7 +60,7 @@ extern unsigned int swap_dev; #define CONFIG_NO_CLOCK /* Floppy support */ -#undef CONFIG_FLOPPY /* #define CONFIG_FLOPPY to enable floppy */ +#define CONFIG_FLOPPY /* #define CONFIG_FLOPPY to enable floppy */ /* IDE/CF support */ #define CONFIG_IDE @@ -70,9 +70,9 @@ extern unsigned int swap_dev; #define CONFIG_INPUT_GRABMAX 0 /* No keyboard to grab */ /* Core Networking support */ -#undef CONFIG_NET +#define CONFIG_NET /* User mode uIP TCP/IP daemon */ -#undef CONFIG_NET_NATIVE +#define CONFIG_NET_NATIVE #define NUM_DEV_TTY 2 diff --git a/Kernel/platform-rc2014/crt0.s b/Kernel/platform-rc2014/crt0.s index 40f5de30..1fb6e38a 100644 --- a/Kernel/platform-rc2014/crt0.s +++ b/Kernel/platform-rc2014/crt0.s @@ -41,6 +41,10 @@ .include "kernel.def" + ; Dummy page0 area so binman doesn't pack us + + .area _PAGE0 + ; startup code .area _CODE init: ; must be at 0x0100 as we are loaded at that @@ -56,16 +60,7 @@ mappedok: ; switch to stack in high memory ld sp, #kstack_top - ; move the common memory where it belongs - ld hl, #s__DATA - ld de, #s__COMMONMEM - ld bc, #l__COMMONMEM - ldir - ; and the discard - ld de, #s__DISCARD - ld bc, #l__DISCARD - ldir - ; then zero the data area + ; Zero the data area ld hl, #s__DATA ld de, #s__DATA + 1 ld bc, #l__DATA - 1 diff --git a/Kernel/platform-rc2014/discard.c b/Kernel/platform-rc2014/discard.c index d1c517b8..22a5172b 100644 --- a/Kernel/platform-rc2014/discard.c +++ b/Kernel/platform-rc2014/discard.c @@ -17,7 +17,7 @@ void init_hardware_c(void) vfd_term_init(); #endif ramsize = 512; - procmem = 512 - 64; + procmem = 512 - 80; } void pagemap_init(void) diff --git a/Kernel/platform-rc2014/fuzix.lnk b/Kernel/platform-rc2014/fuzix.lnk index 7706252b..7d14b63a 100644 --- a/Kernel/platform-rc2014/fuzix.lnk +++ b/Kernel/platform-rc2014/fuzix.lnk @@ -1,8 +1,8 @@ -mwxuy -i fuzix.ihx -b _CODE=0x0100 --b _COMMONMEM=0xF000 --b _DISCARD=0xE000 +-b _COMMONMEM=0xD000 +-b _DISCARD=0xC300 -l z80 platform-rc2014/crt0.rel platform-rc2014/commonmem.rel diff --git a/Kernel/platform-rc2014/kernel.def b/Kernel/platform-rc2014/kernel.def index 881eece1..c0714fca 100644 --- a/Kernel/platform-rc2014/kernel.def +++ b/Kernel/platform-rc2014/kernel.def @@ -1,6 +1,6 @@ ; FUZIX mnemonics for memory addresses etc -U_DATA .equ 0xF000 ; (this is struct u_data from kernel.h) +U_DATA .equ 0xD000 ; (this is struct u_data from kernel.h) U_DATA__TOTALSIZE .equ 0x300 ; 256+256+256 bytes. Z80_TYPE .equ 0 ; just a old good Z80 USE_FANCY_MONITOR .equ 1 ; disabling this saves around approx 0.5KB diff --git a/Kernel/platform-rc2014/rc2014.s b/Kernel/platform-rc2014/rc2014.s index 6235ce52..e5a31e96 100644 --- a/Kernel/platform-rc2014/rc2014.s +++ b/Kernel/platform-rc2014/rc2014.s @@ -394,9 +394,9 @@ _copy_common: push hl ld a,e call map_for_swap - ld hl,#0xF300 - ld de,#0x7300 - ld bc,#0x0D00 + ld hl,#0xD300 + ld de,#0x4300 + ld bc,#0x2D00 ldir jr map_kernel