LSRCS = ../lib/65c816.s
LOBJS = $(patsubst ../lib/%.s,%.o, $(LSRCS))
+NSRCS = ../dev/net/net_native.c
+NOBJS = $(patsubst ../dev/net/%.c,%.o, $(NSRCS))
+
ASRCS = v65.s crt0.s
ASRCS += commonmem.s
COBJS = $(CSRCS:.c=$(BINEXT))
AOBJS = $(ASRCS:.s=$(BINEXT))
-OBJS = $(COBJS) $(AOBJS) $(LOBJS)
+OBJS = $(COBJS) $(AOBJS) $(LOBJS) $(NOBJS)
JUNK = $(CSRCS:.c=.o) $(CSRCS:.c=.s) $(ASRCS:.s=.o)
$(COBJS): %$(BINEXT): %.c
$(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEG1) $<
+$(NOBJS): %$(BINEXT): ../dev/net/%.c
+ $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEG1) -o $@ $<
+
$(AOBJS): %$(BINEXT): %.s
$(CROSS_AS) $(ASOPTS) $< -o $*$(BINEXT)
../devio.o ../filesys.o ../process.o ../inode.o ../syscall_fs.o \
../syscall_proc.o ../syscall_other.o ../mm.o ../bank65c816.o \
../tty.o ../devsys.o ../syscall_fs2.o ../syscall_fs3.o \
- ../syscall_exec16.o ../usermem.o ../usermem_std-65c816.o devtty.o
+ ../syscall_exec16.o ../usermem.o ../usermem_std-65c816.o devtty.o \
+ ../syscall_net.o net_native.o
dd if=../fuzix.bin of=fuzix.img bs=256 skip=255 count=1
dd if=../fuzix.bin of=fuzix.img bs=256 seek=1 skip=1 conv=notrunc
\ No newline at end of file
0xF000 7 x 256 byte CPU stacks for processes paired
with their direct pages
0xFE00 I/O page
- 0xFF00 Vectors [packed at 0 in image]
+ 0xFF00 Vectors and IRQ DP [packed at 0 in image]
And in user space
#define CONFIG_CALL_R2L /* Runtime stacks arguments backwards */
+/* Networking (not usable yet but for debug/development) */
+#define CONFIG_NET
+#define CONFIG_NET_NATIVE
+
/*
* We have 512K of RAM and have to allocate it in banks due to the CPU
* bank granularity. That gives us 7 processes plus kernel and more
#define MAX_MAPS 7
#define MAP_SIZE 0xFC00 /* 0-FBFF */
-#define STACK_BANKOFF 0xF0 /* F000-FBFF */
+/* 0xEE because our first bank is 1 and 0xEE + 2 * 1 = 0xF0 */
+#define STACK_BANKOFF 0xEE /* F000-FDFF */
#define TICKSPERSEC 100 /* Ticks per second */
#define MAPBASE 0x0000 /* We map from 0 */
/* Device parameters */
#define NUM_DEV_TTY 1
#define TTYDEV BOOT_TTY /* Device used by kernel for messages, panics */
-#define NBUFS 8 /* Number of block buffers */
-#define NMOUNTS 2 /* Number of mounts at a time */
+#define NBUFS 8 /* Number of block buffers */
+#define NMOUNTS 4 /* Number of mounts at a time */
#define platform_discard() /* for now - wants fixing */
+
+
+#define OFTSIZE 24
+#define ITABSIZE 32
KERNEL_BANK .set $0 ; bank number
KERNEL_FAR .set $000000 ; 24 bit
-; Add this to the bank number to get the high 8bits of the 16bit CPU stack
+; Add this to twice the bank number to get the high 8bits of the 16bit CPU stack
; for this process
-STACK_BANKOFF .set $F0 ; F000-FBFF
+STACK_BANKOFF .set $EE ; F000-FDFF
; Direct page for IRQ processing (saves us saving/restoring DP registers)
; Can probably use the same page as the IRQ CPU stack... FIXME
-IRQ_DP .set $FD00 ; FD00-FDFF
+; FIXME clashes with end of stack banks
+IRQ_DP .set $FF00 ; FF00-FF3F
KERNEL_DP .set $00 ; We use the real ZP for kernel DP
MAP_SIZE .set $FC00
RAMZ: start = $0000, size = $0100, type = rw, fill = yes;
UDATA: start = $0100, size = $0200, type = rw, fill = yes;
MAIN: start = $0300, size = $ED00, type = rw, fill = yes;
- USEG: start = $F000, size = $0E00, type = rw, fill = yes;
+ USEG: start = $F000, size = $0200, type = rw, fill = yes;
+ USEGH: start = $F200, size = $0C00, type = rw, fill = yes;
IO: start = $FE00, size = $0100, type = rw, fill = yes;
STUB: start = $FF00, size = $00E0, type = rw, fill = yes;
VECTOR: start = $FFE0, size = $0020, type = rw, fill = yes;
DATA: load = MAIN, type = rw, define = yes;
BSS: load = MAIN, type = bss, define = yes;
- DISCARD: load = MAIN, type = ro;
- DISCARDDATA: load = MAIN, type = ro;
+ DISCARD: load = USEGH, type = ro;
+ DISCARDDATA: load = USEGH, type = ro;
STUBS: load = STUB, type = ro;
VECTORS: load = VECTOR, type = ro;