Initial Spring 2016 commit.

This commit is contained in:
Geoffrey Challen
2015-12-23 00:50:04 +00:00
commit cafa9f5690
732 changed files with 92195 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
#
# The machine dependent sources for MIPS.
#
# Standard C functions
machine mips file ../common/libc/arch/mips/setjmp.S
# 64-bit integer ops support for gcc
machine mips file ../common/gcc-millicode/adddi3.c
machine mips file ../common/gcc-millicode/anddi3.c
machine mips file ../common/gcc-millicode/ashldi3.c
machine mips file ../common/gcc-millicode/ashrdi3.c
machine mips file ../common/gcc-millicode/cmpdi2.c
machine mips file ../common/gcc-millicode/divdi3.c
machine mips file ../common/gcc-millicode/iordi3.c
machine mips file ../common/gcc-millicode/lshldi3.c
machine mips file ../common/gcc-millicode/lshrdi3.c
machine mips file ../common/gcc-millicode/moddi3.c
machine mips file ../common/gcc-millicode/muldi3.c
machine mips file ../common/gcc-millicode/negdi2.c
machine mips file ../common/gcc-millicode/notdi2.c
machine mips file ../common/gcc-millicode/qdivrem.c
machine mips file ../common/gcc-millicode/subdi3.c
machine mips file ../common/gcc-millicode/ucmpdi2.c
machine mips file ../common/gcc-millicode/udivdi3.c
machine mips file ../common/gcc-millicode/umoddi3.c
machine mips file ../common/gcc-millicode/xordi3.c
#
# Low-level stuff ("locore")
# The platform should select cache handling and exception handling from
# among these:
#
# cache-mips1.S
# cache-mips161.S
# cache-mips32.S
#
# exception-mips1.S
# exception-mips32.S
#
machine mips file arch/mips/locore/trap.c # Common trap handler.
#
# Thread subsystem
#
machine mips file arch/mips/thread/cpu.c # CPU control.
machine mips file arch/mips/thread/switch.S # Thread context switch
machine mips file arch/mips/thread/switchframe.c # New thread prep
machine mips file arch/mips/thread/thread_machdep.c # MD thread code
machine mips file arch/mips/thread/threadstart.S # New thread startup
#
# VM system
# The platform should select TLB handling from among these:
#
# tlb-mips1.S
# tlb-mips161.S
# tlb-mips32.S
#
machine mips file arch/mips/vm/ram.c # Physical memory accounting
# This is included here rather than in conf.kern because
# it may not be suitable for all architectures.
machine mips file vm/copyinout.c # copyin/out et al.
# For the early assignments, we supply a very stupid MIPS-only skeleton
# of a VM system. It is just barely capable of running a single userlevel
# program as long as that program's not very large.
defoption dumbvm
machine mips optfile dumbvm arch/mips/vm/dumbvm.c
#
# System call layer
#
machine mips file arch/mips/syscall/syscall.c # System call handler

View File

@@ -0,0 +1,98 @@
/*
* This is a pile of crap that tells the linker how to link the kernel,
* because it's too stupid to be able to work it out on its own.
*/
ENTRY(__start)
_DYNAMIC_LINK = 0;
SECTIONS
{
/*
* Base address for the kernel.
*/
. = 0x80000200;
/*
* Read-only loaded sections.
*/
/* code */
.text : { *(.text) }
/* linker-provided symbol for end of code */
_etext = .;
/* read-only data */
.rodata : { *(.rodata) *(.rodata.*) }
/* MIPS register-usage blather */
.reginfo : { *(.reginfo) }
/*
* Move to a fresh page. This method puts read-only and
* read-write material on separate pages without having to
* waste space on page-alignment in the on-disk file; the
* on-disk page that contains both text and data is mapped
* twice.
*
* For mips kernels we can't write-protect the text anyhow so
* there's no point doing it.
*/
/* . = . + 0x1000; */
/*
* Read-write loaded sections.
*/
/* initialized data */
.data : {
*(.data)
CONSTRUCTORS
}
/* Value for GP register */
_gp = ALIGN(16) + 0x7ff0;
/* Small data accessed via GP register */
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
.sdata : { *(.sdata) }
/* cleared-to-zero data */
.sbss : { *(.sbss *.scommon) }
.bss : { *(.bss) *(COMMON) }
/* linker-provided symbol for end of program */
_end = .;
/*
* Debug info
*/
/* stabs debug sections */
.stab 0: { *(.stab) }
.stabstr 0: { *(.stabstr) }
/* DWARF debug sections */
.debug 0: { *(.debug) }
.line 0: { *(.line) }
.debug_srcinfo 0: { *(.debug_srcinfo) }
.debug_sfnames 0: { *(.debug_sfnames) }
.debug_aranges 0: { *(.debug_aranges) }
.debug_pubnames 0: { *(.debug_pubnames) }
.debug_info 0: { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0: { *(.debug_abbrev) }
.debug_line 0: { *(.debug_line) }
.debug_frame 0: { *(.debug_frame) }
.debug_str 0: { *(.debug_str) }
.debug_loc 0: { *(.debug_loc) }
.debug_macinfo 0: { *(.debug_macinfo) }
.debug_weaknames 0: { *(.debug_weaknames) }
.debug_funcnames 0: { *(.debug_funcnames) }
.debug_typenames 0: { *(.debug_typenames) }
.debug_varnames 0: { *(.debug_varnames) }
/* These must appear regardless of . */
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
}