6809test: get it building again just for some size measurements
authorAlan Cox <alan@linux.intel.com>
Sun, 17 May 2015 22:35:00 +0000 (23:35 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 17 May 2015 22:35:00 +0000 (23:35 +0100)
Kernel/platform-6809test/Makefile
Kernel/platform-6809test/config.h
Kernel/platform-6809test/devtty.c
Kernel/platform-6809test/kernel.def
Kernel/platform-6809test/libc.c
Kernel/platform-6809test/main.c
Kernel/platform-6809test/p6809.s
Kernel/platform-6809test/tricks.s

index f714464..0e6a34e 100644 (file)
@@ -29,5 +29,5 @@ image:
        tricks.o main.o ../timer.o ../kdata.o devrd.o devices.o \
        ../devio.o ../filesys.o ../process.o ../inode.o ../syscall_fs.o \
        ../syscall_proc.o ../syscall_other.o ../mm.o ../swap.o ../bank16k.o \
-       ../tty.o ../devsys.o ../usermem.o ../syscall_fs2.o ../syscall_exec.o \
+       ../tty.o ../devsys.o ../usermem.o ../syscall_fs2.o ../syscall_exec16.o \
        ../usermem_std-6809.o devlpr.o devtty.o libc.o
index c14154f..f8aeaba 100644 (file)
@@ -28,8 +28,6 @@
 
 /* Video terminal, not a serial tty */
 #define CONFIG_VT
-/* We want the 8x8 font */
-#define CONFIG_FONT_8X8
 /* Vt definitions */
 #define VT_WIDTH       64
 #define VT_HEIGHT      24
@@ -37,8 +35,9 @@
 #define VT_BOTTOM      23
 
 #define TICKSPERSEC 100   /* Ticks per second */
-#define PROGBASE    ((char *)(0x0100))  /* also data base */
-#define PROGTOP     ((char *)(0xF000))  /* Top of program, base of U_DATA */
+#define PROGBASE    0x0100  /* also data base */
+#define PROGLOAD    0x0800  /* also data base */
+#define PROGTOP     0x7000  /* Top of program, base of U_DATA */
 
 #define BOOT_TTY (512 + 1)   /* Set this to default device for stdio, stderr */
                           /* In this case, the default is the first TTY device */
 #define CMDLINE        NULL      /* Location of root dev name */
 
 /* Device parameters */
-#define NUM_DEV_TTY 3
+#define NUM_DEV_TTY 2
 #define NDEVS    1        /* Devices 0..NDEVS-1 are capable of being mounted */
                           /*  (add new mountable devices to beginning area.) */
 #define TTYDEV   BOOT_TTY /* Device used by kernel for messages, panics */
-#define NBUFS    10       /* Number of block buffers */
-#define NMOUNTS         1        /* Number of mounts at a time - nothing mountable! */
+#define NBUFS    7        /* Number of block buffers */
+#define NMOUNTS         2        /* Number of mounts at a time - nothing mountable! */
+
+#define swap_map(x)    ((uint8_t *)(x))
index bfaca91..bd844e5 100644 (file)
@@ -56,6 +56,11 @@ void tty_putc(uint8_t minor, unsigned char c)
        *uarta = c;
 }
 
+void tty_sleeping(uint8_t minor)
+{
+    used(minor);
+}
+
 void tty_setup(uint8_t minor)
 {
     minor;
index 39b9a0e..20c8036 100644 (file)
@@ -3,3 +3,15 @@
 U_DATA                      equ 0xF000       ; (this is struct u_data from kernel.h)
 U_DATA__TOTALSIZE           equ 0x300        ; 256+256+256 bytes.
 
+SAM_USER macro
+       endm
+
+SAM_KERNEL macro
+       endm
+
+SAM_SAVE macro
+       endm
+
+SAM_RESTORE macro
+       endm
+
index 8b3940b..311e411 100644 (file)
@@ -1,6 +1,6 @@
 #include "cpu.h"
 
-void *memcpy(void *d, void *s, size_t sz)
+void *memcpy(void *d, const void *s, size_t sz)
 {
   unsigned char *dp, *sp;
   while(sz--)
@@ -23,12 +23,3 @@ size_t strlen(const char *p)
   return e-p-1;
 }
 
-/* Until we pull out the bits of libgcc that are useful instead */
-void abort(void)
-{
-}
-
-void *malloc(size_t size)
-{
-  return 0;
-}
\ No newline at end of file
index 75ccedb..185152d 100644 (file)
@@ -4,22 +4,6 @@
 #include <printf.h>
 #include <devtty.h>
 
-/* The uarea is already synched to the stash which is written with the
-   process */
-uint8_t *swapout_prepare_uarea(ptptr p)
-{
-  p;
-  return NULL;
-}
-
-/* The switchin code will move the uarea into the process itself, we just
-   need to fix up the u_page pointer */
-uint8_t *swapin_prepare_uarea(ptptr p)
-{
-  p;
-  return NULL;
-}
-
 void platform_idle(void)
 {
 }
index 9f485a0..7022dd1 100644 (file)
@@ -14,6 +14,7 @@
            .globl map_process_always
            .globl map_save
            .globl map_restore
+           .globl _kernel_flag
 
             ; exported debugging tools
             .globl _trap_monitor
@@ -34,7 +35,7 @@
 ; -----------------------------------------------------------------------------
 ; COMMON MEMORY BANK (0xF000 upwards)
 ; -----------------------------------------------------------------------------
-            .area _COMMONMEM
+            .area .common
 
 trapmsg:    .ascii "Trapdoor: SP="
             .db 0
@@ -89,7 +90,7 @@ init_hardware:
 ;------------------------------------------------------------------------------
 ; COMMON MEMORY PROCEDURES FOLLOW
 
-            .area _COMMONMEM
+            .area .common
 
 _program_vectors:
            ;
@@ -221,3 +222,6 @@ outcharw:
            beq outcharw
            sta 0xffa1
            puls b,pc
+
+           .area .data
+_kernel_flag: .db 1
index 3fb76a3..1c85c08 100644 (file)
@@ -17,7 +17,7 @@
         include "kernel.def"
         include "../kernel09.def"
 
-        .area _COMMONMEM
+        .area .common
 
 ; ramtop must be in common for single process swapping cases
 ; and its a constant for the others from before init forks so it'll be fine