trs80m1: sort out the memory mappings
authorAlan Cox <alan@linux.intel.com>
Thu, 24 May 2018 22:20:56 +0000 (23:20 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 24 May 2018 22:20:56 +0000 (23:20 +0100)
We should have 0 bytes in _CODE

Kernel/platform-trs80m1/crt0.s
Kernel/platform-trs80m1/fuzix.lnk
Kernel/platform-trs80m1/main.c
Kernel/platform-trs80m1/trs80-bank.s
Kernel/platform-trs80m1/trs80.s

index a31b6c9..bef2263 100644 (file)
@@ -42,7 +42,7 @@
                .globl _discard_size
 
                ; startup code
-               .area _CODE
+               .area _BOOT
 
 ;
 ;      Once the loader completes it jumps here
index 213593f..ecd6538 100644 (file)
@@ -2,10 +2,10 @@
 -r
 -i fuzix.ihx
 -b _INITIALIZER=0x0001
--b _CODE=0x4200
+-b _BOOT=0x4300
 -b _CODE1=0x8000
 -b _CODE2=0x8000
--b _COMMONMEM=0x4300
+-b _COMMONMEM=0x4400
 -l z80
 platform-trs80m1/crt0.rel
 platform-trs80m1/commonmem.rel
index ecb7474..75d3c0c 100644 (file)
@@ -74,3 +74,15 @@ uint8_t platform_rtc_secs(void)
 
 #endif
 
+/*
+ *     So that we don't suck in a library routine we can't use from
+ *     the runtime
+ */
+
+int strlen(const char *p)
+{
+  int len = 0;
+  while(*p++)
+    len++;
+  return len;
+}
index a30065b..51d60ff 100644 (file)
@@ -29,7 +29,7 @@
 ; -----------------------------------------------------------------------------
 ; KERNEL MEMORY BANK (above 08000, only accessible when the kernel is mapped)
 ; -----------------------------------------------------------------------------
-            .area _CODE
+            .area _BOOT
 
 init_hardware:
             ; set system RAM size
index dbcedf2..f17d8af 100644 (file)
@@ -6,7 +6,6 @@
 
             ; exported symbols
             .globl init_early
-            .globl init_hardware
             .globl interrupt_handler
             .globl _program_vectors
            .globl platform_interrupt_all
@@ -74,9 +73,9 @@ _platform_reboot:
           rst 0
 
 ; -----------------------------------------------------------------------------
-; KERNEL MEMORY BANK (above 0x8000)
+; BOOT MEMORY BANK (below 0x8000)
 ; -----------------------------------------------------------------------------
-            .area _CODE
+            .area _BOOT
 
 
 init_early: