8080: kernel.def
authorAlan Cox <alan@linux.intel.com>
Sat, 9 Feb 2019 21:52:32 +0000 (21:52 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 9 Feb 2019 21:52:32 +0000 (21:52 +0000)
The main thing here is the section stuff. The ACK toolchain just numbers sections
and if you name them differently or in a different order in a file it just doesn't
care. Nasty.... so define our order here at the start of each asm file hopefully

Kernel/kernel-8080.def [new file with mode: 0644]

diff --git a/Kernel/kernel-8080.def b/Kernel/kernel-8080.def
new file mode 100644 (file)
index 0000000..6b9c99a
--- /dev/null
@@ -0,0 +1,59 @@
+! Keep these in sync with struct u_data!!
+
+#include "platform/kernel.def"
+
+U_DATA__U_PTAB              = U_DATA+0   ! struct p_tab*
+U_DATA__U_PAGE              = U_DATA+2   ! uint16_t
+U_DATA__U_PAGE2             = U_DATA+4   ! uint16_t
+U_DATA__U_INSYS             = U_DATA+6   ! bool
+U_DATA__U_CALLNO            = U_DATA+7   ! uint8_t
+U_DATA__U_SYSCALL_SP        = U_DATA+8   ! void *
+U_DATA__U_RETVAL            = U_DATA+10   ! int16_t
+U_DATA__U_ERROR             = U_DATA+12  ! int16_t
+U_DATA__U_SP                = U_DATA+14  ! void *
+U_DATA__U_ININTERRUPT       = U_DATA+16  ! bool
+U_DATA__U_CURSIG            = U_DATA+17  ! int8_t
+U_DATA__U_ARGN              = U_DATA+18  ! uint16_t
+U_DATA__U_ARGN1             = U_DATA+20  ! uint16_t
+U_DATA__U_ARGN2             = U_DATA+22  ! uint16_t
+U_DATA__U_ARGN3             = U_DATA+24  ! uint16_t
+U_DATA__U_ISP               = U_DATA+26  ! void * initial stack pointer when _execing
+U_DATA__U_TOP               = U_DATA+28  ! uint16_t
+U_DATA__U_BREAK             = U_DATA+30  ! uint16_t
+U_DATA__U_SIGVEC            = U_DATA+32  ! table of function pointers void *
+U_DATA__U_BASE              = U_DATA+96  ! uint8_t *
+U_DATA__U_COUNT             = U_DATA+98 ! uint16_t
+U_DATA__U_OFFSET            = U_DATA+100 ! uint32_t
+
+! Keep these in sync with struct p_tab!!
+P_TAB__P_STATUS_OFFSET      = 0
+P_TAB__P_TTY_OFFSET         = 1
+P_TAB__P_PID_OFFSET         = 2
+P_TAB__P_PAGE_OFFSET        = 14
+P_TAB__P_PAGE2_OFFSET       = 16
+
+P_RUNNING                   = 1            ! value from include/kernel.h
+P_READY                     = 2            ! value from include/kernel.h
+
+OS_BANK                     = 0            ! value from include/kernel.h
+
+EAGAIN                      = 11           ! value from include/kernel.h
+
+! Keep in sync with struct blkbuf
+BUFSIZE                     = 520
+
+!
+!      Segments. This really is truely mindnumbingly brain dead to have
+!      to put the segments in the same order in each .s or it blows up
+!
+!      These must match the compiler
+!
+.sect .text                    ! 0
+.sect .rom                     ! 1 (only generated by the compiler) 
+.sect .data                    ! 2
+.sect .bss                     ! 3
+!
+!      Below this point are not generated by the compiler.
+!
+.sect .common                  ! 4
+.sect .discard                 ! 5