ret
; -----------------------------------------------------------------------------
-; KERNEL MEMORY BANK (below 0xC000, only accessible when the kernel is mapped)
+; KERNEL MEMORY BANK (only accessible when the kernel is mapped)
; -----------------------------------------------------------------------------
.area _CODE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; -----------------------------------------------------------------------------
-; COMMON MEMORY BANK (0xF000 upwards)
+; COMMON MEMORY BANK
; -----------------------------------------------------------------------------
.area _COMMONMEM
-;
-; Common on z80pack is at 0xF000 as defined by hardware.
-;
-
.module commonmem
-
.area _COMMONMEM
-
.include "../cpu-z80/std-commonmem.s"
#undef CONFIG_SINGLETASK
/* CP/M emulation */
#undef CONFIG_CPM_EMU
-/* Fixed banking */
+/* Fixed banking: 8 x 64K banks, top 4KB is shared with kernel, 60KB-62KB is user memory */
#define CONFIG_BANK_FIXED
/* Permit large I/O requests to bypass cache and go direct to userspace */
#define CONFIG_LARGE_IO_DIRECT
/* 8 60K banks, 1 is kernel */
#define MAX_MAPS 8
-#define MAP_SIZE 0xF000U
+#define MAP_SIZE PROGTOP /* WRS: I feel this should be 60KB, but setting it so breaks pagemap_realloc() when exec calls it */
/* Banks as reported to user space */
#define CONFIG_BANKS 1
#define TICKSPERSEC 40U /* 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 0xF800 /* Top of program, base of U_DATA copy */
#define PROC_SIZE 64 /* Memory needed per process */
-/* WRS: this is probably wrong -- we want to swap the full 64K minus the common code */
-/* For now let's just use something and fix this up later when we have a swap device */
-#define SWAP_SIZE 0x7F /* 63.5K in blocks (which is the wrong number) */
-#define SWAPBASE 0x0000 /* start at the base of user mem */
-#define SWAPTOP 0xFF00 /* can we stop at the top? not sure how. let's stop short. */
-#define MAX_SWAPS 10 /* Well, that depends really, hmmmmmm. Pick a number, any number. */
-
/* We need a tidier way to do this from the loader */
#define CMDLINE (0x0081) /* Location of root dev name */
#define BOOTDEVICENAMES "hd#"
-//#define SWAPDEV (256 + 1) /* Device for swapping. (z80pack drive J) */
#define NBUFS 10 /* Number of block buffers */
#define NMOUNTS 4 /* Number of mounts at a time */
-mwxuy
-i fuzix.ihx
-b _CODE=0x0088
--b _COMMONMEM=0xF000
+-b _COMMONMEM=0xF800
-b _DISCARD=0xE000
-l z180
platform-n8vem-mark4/crt0.rel
; UZI mnemonics for memory addresses etc
-U_DATA .equ 0xF000 ; (this is struct u_data from kernel.h)
+U_DATA .equ 0xF800 ; (this is struct u_data from kernel.h)
U_DATA__TOTALSIZE .equ 0x300 ; 256+256+256 bytes.
Z80_TYPE .equ 2
jp z180_init_hardware
; -----------------------------------------------------------------------------
-; COMMON MEMORY BANK (0xF000 upwards)
+; COMMON MEMORY BANK
; -----------------------------------------------------------------------------
.area _COMMONMEM
-;
-; Common on z80pack is at 0xF000 as defined by hardware.
-;
-
.module commonmem
-
.area _COMMONMEM
-
.include "../cpu-z80/std-commonmem.s"
#undef CONFIG_SINGLETASK
/* CP/M emulation */
#undef CONFIG_CPM_EMU
-/* Fixed banking */
+/* Fixed banking: 8 x 64K banks, top 4KB is shared with kernel */
#define CONFIG_BANK_FIXED
/* Permit large I/O requests to bypass cache and go direct to userspace */
#define CONFIG_LARGE_IO_DIRECT
/* 8 60K banks, 1 is kernel */
#define MAX_MAPS 16
-#define MAP_SIZE 0xF000U
+#define MAP_SIZE PROGTOP /* 0xF000 breaks pagemap_realloc() / exec() */
/* Banks as reported to user space */
#define CONFIG_BANKS 1
#define TICKSPERSEC 40U /* 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 0xF800 /* Top of program, base of U_DATA copy */
#define PROC_SIZE 64 /* Memory needed per process */
-/* WRS: this is probably wrong -- we want to swap the full 64K minus the common code */
-/* For now let's just use something and fix this up later when we have a swap device */
-#define SWAP_SIZE 0x7F /* 63.5K in blocks (which is the wrong number) */
-#define SWAPBASE 0x0000 /* start at the base of user mem */
-#define SWAPTOP 0xFF00 /* can we stop at the top? not sure how. let's stop short. */
-#define MAX_SWAPS 10 /* Well, that depends really, hmmmmmm. Pick a number, any number. */
-
#define BOOT_TTY (512 + 1)/* Set this to default device for stdio, stderr */
/* In this case, the default is the first TTY device */
#define NUM_DEV_TTY 4
#define TTYDEV BOOT_TTY /* Device used by kernel for messages, panics */
-//#define SWAPDEV (256 + 1) /* Device for swapping. (z80pack drive J) */
#define NBUFS 10 /* Number of block buffers */
#define NMOUNTS 4 /* Number of mounts at a time */
-mwxuy
-i fuzix.ihx
-b _CODE=0x0088
--b _COMMONMEM=0xF000
+-b _COMMONMEM=0xF800
-b _DISCARD=0xE000
-l z180
platform-p112/crt0.rel
; UZI mnemonics for memory addresses etc
-U_DATA .equ 0xF000 ; (this is struct u_data from kernel.h)
+U_DATA .equ 0xF800 ; (this is struct u_data from kernel.h)
U_DATA__TOTALSIZE .equ 0x300 ; 256+256+256 bytes.
OS_BANK .equ 0x00 ; value from include/kernel.h
ret
; -----------------------------------------------------------------------------
-; COMMON MEMORY BANK (0xF000 upwards)
+; COMMON MEMORY BANK
; -----------------------------------------------------------------------------
.area _COMMONMEM