rc2014: turn on all the features
authorAlan Cox <alan@linux.intel.com>
Sat, 6 Oct 2018 21:04:22 +0000 (22:04 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 6 Oct 2018 21:04:22 +0000 (22:04 +0100)
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.

Kernel/platform-rc2014/Makefile
Kernel/platform-rc2014/config.h
Kernel/platform-rc2014/crt0.s
Kernel/platform-rc2014/discard.c
Kernel/platform-rc2014/fuzix.lnk
Kernel/platform-rc2014/kernel.def
Kernel/platform-rc2014/rc2014.s

index 4a62f2f..2c674d9 100644 (file)
@@ -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
index f45a124..a16ebba 100644 (file)
 #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
 
index 40f5de3..1fb6e38 100644 (file)
 
        .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
index d1c517b..22a5172 100644 (file)
@@ -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)
index 7706252..7d14b63 100644 (file)
@@ -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
index 881eece..c0714fc 100644 (file)
@@ -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
index 6235ce5..e5a31e9 100644 (file)
@@ -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