Changeset ffc277e in mainline


Ignore:
Timestamp:
2005-09-10T00:52:13Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3a6c8e5
Parents:
b02e5d1
Message:

Cleanup of makefiles to have common options in one main makefile.

Add simple build process for different simulators for MIPS.
Added FPU context & lazy FPU context switching to MIPS.
Cleanup of MIPS linker script.
Moved MIPS kernel above 1MB. Not tested on real machine yet, but it might help.

There is something broken with gcc inlined memcpy (either simulator or gcc), it is disabled on BigEndian mips now.

Files:
1 added
27 edited
1 moved

Legend:

Unmodified
Added
Removed
  • arch/amd64/Makefile.inc

    rb02e5d1 rffc277e  
    2222
    2323
    24 CPPFLAGS=$(DEFS) -nostdinc -I../include
    25 CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fno-unwind-tables -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -march=opteron -m64 -mcmodel=kernel -mno-red-zone
     24CFLAGS=$(DEFS) -nostdlib -fno-builtin -fno-unwind-tables -O3 -march=opteron -m64 -mcmodel=kernel -mno-red-zone
    2625LFLAGS=-M
    2726
    2827../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
    29         $(CC) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
     28        $(CC) $(CFLAGS) -C -E -x c $< | grep -v "^\#" > $@
    3029
    3130arch_sources = arch/dummy.s \
  • arch/amd64/src/fpu_context.c

    rb02e5d1 rffc277e  
    4646void fpu_context_restore(fpu_context_t *fctx)
    4747{
    48         /* TODO: We need malloc that allocates on 16-byte boundary !! */
     48        /* Align on 16-byte boundary */
    4949        if (((__u64)fctx) & 0xf)
    5050                fctx = (fpu_context_t *)((((__u64)fctx) | 0xf) + 1);
     
    5757void fpu_init(void)
    5858{
     59        /* TODO: Zero all SSE, MMX etc. registers */
    5960        __asm__ volatile (
    6061                "fninit;"
  • arch/ia32/Makefile.inc

    rb02e5d1 rffc277e  
    1818endif
    1919
    20 CPPFLAGS=$(DEFS) -nostdinc -I../include
    21 CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
     20CFLAGS=$(DEFS) -nostdlib -fno-builtin -fomit-frame-pointer -O3
    2221LFLAGS=-M -no-check-sections
    2322
    2423../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
    25         $(CC) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
     24        $(CC) $(CFLAGS) -C -E -x c $< | grep -v "^\#" > $@
    2625
    2726arch_sources= \
  • arch/ia64/Makefile.inc

    rb02e5d1 rffc277e  
    1616
    1717DEFS=-DARCH=$(ARCH)
    18 CPPFLAGS=$(DEFS) -nostdinc -I../include
    19 CFLAGS=$(CPPFLAGS) -mconstant-gp -nostdlib -fno-builtin -fno-unwind-tables -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
     18CFLAGS=$(DEFS) -mconstant-gp -nostdlib -fno-builtin -fno-unwind-tables -O3
    2019LFLAGS=-EL -M
    2120
  • arch/mips/Makefile.inc

    rb02e5d1 rffc277e  
    1414ASFLAGS=-mips3
    1515
    16 DEFS=-DARCH=$(ARCH)
    17 CPPFLAGS=$(DEFS) -mno-abicalls -nostdinc -I../include
    18 CFLAGS=$(CPPFLAGS) -mips2 -G 0 -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2 -msoft-float
     16DEFS=-DARCH=$(ARCH) -DMACHINE=${MACHINE}
     17CFLAGS=$(DEFS) -mno-abicalls -mips3 -G 0 -nostdlib -fno-builtin -O2
    1918LFLAGS=-mips2 -M -no-check-sections
     19
     20# It seems that on big endian either GCC or the simulators
     21# have the swl/swr/lwl/lwr instructions wrong. Just for sure,
     22# disable it with -mmemcpy (force calling memcpy instead of inlining)
     23
     24ifeq (${MACHINE},indy)
     25 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY
     26 BFD = elf32-big
     27endif
     28
     29ifeq (${MACHINE},lgxemul)
     30 CFLAGS += -DHAVE_FPU -DFPU_LAZY
     31 BFD = ecoff-littlemips
     32endif
     33
     34ifeq (${MACHINE},bgxemul)
     35 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY
     36 BFD = ecoff-bigmips
     37endif
     38
     39ifeq (${MACHINE},msim)
     40 BFD = binary
     41 CFLAGS += -msoft-float
     42endif
     43
     44ifeq (${MACHINE},simics)
     45 BFD = elf32-little
     46 CFLAGS += -msoft-float
     47endif
     48
     49../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
     50        $(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@
    2051
    2152arch_sources= \
  • arch/mips/_link.ld.in

    rb02e5d1 rffc277e  
    66 * 
    77 */
     8#undef mips
     9#define mips mips
    810
    9 /* OUTPUT_FORMAT(ecoff-littlemips) */
    10 OUTPUT_FORMAT(binary)
    11 /* OUTPUT_FORMAT(elf32-little) */
     11OUTPUT_FORMAT(BFD)
     12
     13OUTPUT_ARCH(mips)
    1214
    1315ENTRY(kernel_image_start)
    1416
    1517SECTIONS {
    16         .image 0x80000000: AT (0) {
    17                 _gp = 0x00000000;
    18                
     18        . = 0x80100000;
     19        .text : {
    1920                ktext_start = .;
    2021                *(.text);
    2122                ktext_end = .;
    22 
     23        }
     24        .data : {
    2325                kdata_start = .;
    24                 *(.reginfo);
    25                 *(.rodata);
    26                 *(.rodata.*);
    27                 *(.rdata);
    2826                *(.data);               /* initialized data */
    29                 *(.lit8);
    30                 *(.lit4);
    31                 *(.sdata);
    32                 *(.sbss);
    33                 *(.comment);
    34                 *(.pdr);
    35 
    3627                hardcoded_ktext_size = .;
    3728                LONG(ktext_end - ktext_start); 
     
    3930                LONG(kdata_end - kdata_start);
    4031                hardcoded_load_address = .;
    41                 LONG(0x80000000);
    42                 *(.bss);                /* uninitialized static variables */   
     32                LONG(0x80100000);
     33        }
     34        _gp = . + 0x8000;
     35        .lit8 : { *(.lit8) }
     36        .lit4 : { *(.lit4) }
     37        .sdata : { *(.sdata) }
     38        .sbss : {
     39                *(.sbss);
    4340                *(.scommon);
     41        }
     42        .bss : {
     43                *(.bss);                /* uninitialized static variables */
    4444                *(COMMON);              /* global variables */
    45 
     45        }
     46        mysymtable : {
    4647                symbol_table = .;
    4748                *(symtab.*);            /* Symbol table, must be LAST symbol!*/
     49        }
     50        kdata_end = .;
    4851
    49                 kdata_end = .;
    50 
    51         }
     52        .mdebug : { *(.mdebug) }
     53        .stab 0 : { *(.stab) }
     54        .stabstr 0 : { *(.stabstr) }
     55        .comment : { *(.comment) }
     56        .note : { *(.note) }
    5257}
  • arch/mips/boot/boot.S

    rb02e5d1 rffc277e  
    3737.global start
    3838start:
    39         lui     $ra, KERNEL_STARTUP_ADDRESS >> 16
    40         ori     $ra, KERNEL_STARTUP_ADDRESS & 0xffff
     39        lui     $ra, KERNEL_LOAD_ADDRESS >> 16
     40        ori     $ra, KERNEL_LOAD_ADDRESS & 0xffff
    4141
    4242        j $ra
  • arch/mips/include/asm.h

    rb02e5d1 rffc277e  
    3434#include <config.h>
    3535
    36 #define cpu_sleep()     ;
     36
     37static inline void cpu_sleep(void)
     38{
     39        /* Most of the simulators do not support */
     40/*      __asm__ volatile ("wait"); */
     41}
    3742
    3843/** Return base address of current stack
  • arch/mips/include/asm/boot.h

    rb02e5d1 rffc277e  
    3535
    3636/* Kernel startup address */
    37 #define KERNEL_STARTUP_ADDRESS 0x80000300
     37#define KERNEL_LOAD_ADDRESS 0x80100000
    3838
    3939
  • arch/mips/include/byteorder.h

    rb02e5d1 rffc277e  
    3131
    3232/* MIPS is little-endian */
    33 #define native_le2host(n)               n
     33#ifdef BIG_ENDIAN
     34static inline __native native_le2host(__native n)
     35{
     36        return ((n & 0xff) << 24) |
     37                ((n & 0xff00) << 8) |
     38                ((n & 0xff0000) >> 8) |
     39                ((n & 0xff000000) >> 24);
     40}
     41#else
     42#  define native_le2host(n)             n
     43#endif
    3444
    3545#endif
  • arch/mips/include/cp0.h

    rb02e5d1 rffc277e  
    3535#define cp0_status_exl_exception_bit    (1<<1)
    3636#define cp0_status_erl_error_bit        (1<<2)
     37#define cp0_status_um_bit               (1<<4)
    3738#define cp0_status_bev_bootstrap_bit    (1<<22)
    38 #define cp0_status_um_bit               (1<<4)
     39#define cp0_status_fpu_bit              (1<<29)
    3940
    4041#define cp0_status_im7_shift            15
     
    4445 */
    4546#define cp0_compare_value               10000
     47
     48static inline void tlbp(void)
     49{
     50        __asm__ volatile ("tlbp");
     51}
     52
     53static inline void tlbr(void)
     54{
     55        __asm__ volatile ("tlbr");
     56}
     57static inline void tlbwi(void)
     58{
     59        __asm__ volatile ("tlbwi");
     60}
     61static inline void tlbwr(void)
     62{
     63        __asm__ volatile ("tlbwr");
     64}
     65
     66
    4667
    4768extern  __u32 cp0_index_read(void);
     
    87108extern __u32 cp0_prid_read(void);
    88109
    89 extern void tlbp(void);
    90 extern void tlbr(void);
    91 extern void tlbwi(void);
    92 extern void tlbwr(void);
    93 
    94110#endif
  • arch/mips/include/exception.h

    rb02e5d1 rffc277e  
    9292
    9393extern void exception(struct exception_regdump *pstate);
    94 
     94extern void tlb_refill_entry(void);
     95extern void exception_entry(void);
     96extern void cache_error_entry(void);
    9597#endif
  • arch/mips/include/fpu_context.h

    rb02e5d1 rffc277e  
    3333
    3434struct fpu_context {
    35 /* TODO: define MIPS FPU context */
     35        __native dregs[32];
     36        __native cregs[32];
    3637};
    3738
    38 
    39 
    40 
    4139#endif
  • arch/mips/include/thread.h

    rb02e5d1 rffc277e  
    3030#define __mips_THREAD_H__
    3131
    32 #define ARCH_THREAD_DATA
     32#include <arch/exception.h>
     33
     34#define ARCH_THREAD_DATA   struct exception_regdump *pstate
    3335
    3436#endif
  • arch/mips/src/asm.S

    rb02e5d1 rffc277e  
    2727#
    2828
     29#include <arch/asm/regname.h>
     30       
    2931.text
    3032
     
    116118
    117119
    118 .global tlbp
    119 tlbp:
    120         tlbp
    121         j $31
    122         nop
    123 
    124 .global tlbr
    125 tlbr:
    126         tlbr
    127         j $31
    128         nop
    129 
    130 .global tlbwi
    131 tlbwi:
    132         tlbwi
    133         j $31
    134         nop
    135 
    136 .global tlbwr
    137 tlbwr:
    138         tlbwr
    139         j $31
    140         nop
    141 
    142120.global cpu_halt
    143121cpu_halt:
     
    156134        nop
    157135
     136.macro fpu_gp_save reg ctx
     137        mfc1 $t0,$\reg
     138        sw $t0, \reg*4(\ctx)
     139.endm
     140
     141.macro fpu_gp_restore reg ctx
     142        lw $t0, \reg*4(\ctx)
     143        mtc1 $t0,$\reg
     144.endm
     145
     146.macro fpu_ct_save reg ctx
     147        cfc1 $t0,$1
     148        sw $t0, (\reg+32)*4(\ctx)
     149.endm   
     150
     151.macro fpu_ct_restore reg ctx
     152        lw $t0, (\reg+32)*4(\ctx)
     153        ctc1 $t0,$\reg
     154.endm
     155
     156
     157.global fpu_context_save
     158fpu_context_save:
     159#ifdef HAVE_FPU
     160        fpu_gp_save 0,$a0
     161        fpu_gp_save 1,$a0
     162        fpu_gp_save 2,$a0
     163        fpu_gp_save 3,$a0
     164        fpu_gp_save 4,$a0
     165        fpu_gp_save 5,$a0
     166        fpu_gp_save 6,$a0
     167        fpu_gp_save 7,$a0
     168        fpu_gp_save 8,$a0
     169        fpu_gp_save 9,$a0
     170        fpu_gp_save 10,$a0
     171        fpu_gp_save 11,$a0
     172        fpu_gp_save 12,$a0
     173        fpu_gp_save 13,$a0
     174        fpu_gp_save 14,$a0
     175        fpu_gp_save 15,$a0
     176        fpu_gp_save 16,$a0
     177        fpu_gp_save 17,$a0
     178        fpu_gp_save 18,$a0
     179        fpu_gp_save 19,$a0
     180        fpu_gp_save 20,$a0
     181        fpu_gp_save 21,$a0
     182        fpu_gp_save 22,$a0
     183        fpu_gp_save 23,$a0
     184        fpu_gp_save 24,$a0
     185        fpu_gp_save 25,$a0
     186        fpu_gp_save 26,$a0
     187        fpu_gp_save 27,$a0
     188        fpu_gp_save 28,$a0
     189        fpu_gp_save 29,$a0
     190        fpu_gp_save 30,$a0
     191        fpu_gp_save 31,$a0
     192
     193        fpu_ct_save 1,$a0
     194        fpu_ct_save 2,$a0
     195        fpu_ct_save 3,$a0
     196        fpu_ct_save 4,$a0
     197        fpu_ct_save 5,$a0
     198        fpu_ct_save 6,$a0
     199        fpu_ct_save 7,$a0
     200        fpu_ct_save 8,$a0
     201        fpu_ct_save 9,$a0
     202        fpu_ct_save 10,$a0
     203        fpu_ct_save 11,$a0
     204        fpu_ct_save 12,$a0
     205        fpu_ct_save 13,$a0
     206        fpu_ct_save 14,$a0
     207        fpu_ct_save 15,$a0
     208        fpu_ct_save 16,$a0
     209        fpu_ct_save 17,$a0
     210        fpu_ct_save 18,$a0
     211        fpu_ct_save 19,$a0
     212        fpu_ct_save 20,$a0
     213        fpu_ct_save 21,$a0
     214        fpu_ct_save 22,$a0
     215        fpu_ct_save 23,$a0
     216        fpu_ct_save 24,$a0
     217        fpu_ct_save 25,$a0
     218        fpu_ct_save 26,$a0
     219        fpu_ct_save 27,$a0
     220        fpu_ct_save 28,$a0
     221        fpu_ct_save 29,$a0
     222        fpu_ct_save 30,$a0
     223        fpu_ct_save 31,$a0
     224#endif         
     225        j $ra
     226        nop
     227
     228.global fpu_context_restore
     229fpu_context_restore:
     230#ifdef HAVE_FPU
     231        fpu_gp_restore 0,$a0
     232        fpu_gp_restore 1,$a0
     233        fpu_gp_restore 2,$a0
     234        fpu_gp_restore 3,$a0
     235        fpu_gp_restore 4,$a0
     236        fpu_gp_restore 5,$a0
     237        fpu_gp_restore 6,$a0
     238        fpu_gp_restore 7,$a0
     239        fpu_gp_restore 8,$a0
     240        fpu_gp_restore 9,$a0
     241        fpu_gp_restore 10,$a0
     242        fpu_gp_restore 11,$a0
     243        fpu_gp_restore 12,$a0
     244        fpu_gp_restore 13,$a0
     245        fpu_gp_restore 14,$a0
     246        fpu_gp_restore 15,$a0
     247        fpu_gp_restore 16,$a0
     248        fpu_gp_restore 17,$a0
     249        fpu_gp_restore 18,$a0
     250        fpu_gp_restore 19,$a0
     251        fpu_gp_restore 20,$a0
     252        fpu_gp_restore 21,$a0
     253        fpu_gp_restore 22,$a0
     254        fpu_gp_restore 23,$a0
     255        fpu_gp_restore 24,$a0
     256        fpu_gp_restore 25,$a0
     257        fpu_gp_restore 26,$a0
     258        fpu_gp_restore 27,$a0
     259        fpu_gp_restore 28,$a0
     260        fpu_gp_restore 29,$a0
     261        fpu_gp_restore 30,$a0
     262        fpu_gp_restore 31,$a0
     263
     264        fpu_ct_restore 1,$a0
     265        fpu_ct_restore 2,$a0
     266        fpu_ct_restore 3,$a0
     267        fpu_ct_restore 4,$a0
     268        fpu_ct_restore 5,$a0
     269        fpu_ct_restore 6,$a0
     270        fpu_ct_restore 7,$a0
     271        fpu_ct_restore 8,$a0
     272        fpu_ct_restore 9,$a0
     273        fpu_ct_restore 10,$a0
     274        fpu_ct_restore 11,$a0
     275        fpu_ct_restore 12,$a0
     276        fpu_ct_restore 13,$a0
     277        fpu_ct_restore 14,$a0
     278        fpu_ct_restore 15,$a0
     279        fpu_ct_restore 16,$a0
     280        fpu_ct_restore 17,$a0
     281        fpu_ct_restore 18,$a0
     282        fpu_ct_restore 19,$a0
     283        fpu_ct_restore 20,$a0
     284        fpu_ct_restore 21,$a0
     285        fpu_ct_restore 22,$a0
     286        fpu_ct_restore 23,$a0
     287        fpu_ct_restore 24,$a0
     288        fpu_ct_restore 25,$a0
     289        fpu_ct_restore 26,$a0
     290        fpu_ct_restore 27,$a0
     291        fpu_ct_restore 28,$a0
     292        fpu_ct_restore 29,$a0
     293        fpu_ct_restore 30,$a0
     294        fpu_ct_restore 31,$a0
     295#endif 
     296        j $ra
     297        nop
     298       
    158299# THIS IS USERSPACE CODE
    159300.global utext
  • arch/mips/src/console.c

    rb02e5d1 rffc277e  
    3232#include <arch/console.h>
    3333
    34 static void (*putchar_func)(const char ch) = NULL;
    35 
    3634static void cons_putchar(const char ch)
    3735{
     
    5351}
    5452
     53static void (*putchar_func)(const char ch) = cons_putchar;
     54
    5555void console_init(void)
    5656{
  • arch/mips/src/dummy.S

    rb02e5d1 rffc277e  
    3333.global asm_delay_loop
    3434.global dummy
    35 .global fpu_enable
    36 .global fpu_disable
    37 .global fpu_init
    3835       
    3936calibrate_delay_loop:
    4037asm_delay_loop:
    41 fpu_enable:
    42 fpu_disable:
    43 fpu_init:       
    4438
    4539dummy:
  • arch/mips/src/exception.c

    rb02e5d1 rffc277e  
    5252        cp0_status_write(cp0_status_read() & ~ (cp0_status_exl_exception_bit |
    5353                                                cp0_status_um_bit));
     54        /* Save pstate so that the threads can access it */
     55        if (THREAD)
     56                THREAD->pstate = pstate;
    5457
    5558        /* decode exception number and process the exception */
     
    8689                        break;
    8790                case EXC_CpU:
     91#ifdef FPU_LAZY     
     92                        scheduler_fpu_lazy_request();
     93#else
    8894                        panic("unhandled Coprocessor Unusable Exception\n");
     95#endif
    8996                        break;
    9097                case EXC_Ov:
     
    111118       
    112119        pstate->epc += epc_shift;
     120        /* Probable not needed, but just for sure that nobody
     121         * will continue accessing it */
     122        if (THREAD)
     123                THREAD->pstate = NULL;
    113124}
  • arch/mips/src/fpu_context.c

    rb02e5d1 rffc277e  
    2929
    3030#include <fpu_context.h>
     31#include <arch.h>
     32#include <arch/cp0.h>
    3133
    32 void fpu_context_save(fpu_context_t *fctx)
    33 {
     34void fpu_disable(void)
     35{       
     36#ifdef HAVE_FPU
     37        cp0_status_write(cp0_status_read() & ~cp0_status_fpu_bit);
     38        if (THREAD && THREAD->pstate)
     39                THREAD->pstate->status &= ~cp0_status_fpu_bit;
     40#endif
    3441}
    3542
    36 
    37 void fpu_context_restore(fpu_context_t *fctx)
     43void fpu_enable(void)
    3844{
     45#ifdef HAVE_FPU
     46        cp0_status_write(cp0_status_read() | cp0_status_fpu_bit);
     47        if (THREAD && THREAD->pstate)
     48                THREAD->pstate->status |= cp0_status_fpu_bit;
     49#endif
    3950}
    4051
     52void fpu_init(void)
     53{
     54        /* TODO: Zero all registers */
     55}
  • arch/mips/src/mips.c

    rb02e5d1 rffc277e  
    3535#include <userspace.h>
    3636#include <arch/console.h>
     37#include <memstr.h>
     38
     39/* Size of the code jumping to the exception handler code
     40 * - J+NOP
     41 */
     42#define EXCEPTION_JUMP_SIZE    8
     43
     44#define TLB_EXC ((char *) 0x80000000)
     45#define NORM_EXC ((char *) 0x80000180)
     46#define CACHE_EXC ((char *) 0x80000100)
     47
     48#include <arch/debug.h>
    3749
    3850void arch_pre_mm_init(void)
    3951{
     52        /* Copy the exception vectors to the right places */
     53        memcpy(TLB_EXC, (char *)tlb_refill_entry, EXCEPTION_JUMP_SIZE);
     54        memcpy(NORM_EXC, (char *)exception_entry, EXCEPTION_JUMP_SIZE);
     55        memcpy(CACHE_EXC, (char *)cache_error_entry, EXCEPTION_JUMP_SIZE);
     56
     57
    4058        /*
    4159         * Switch to BEV normal level so that exception vectors point to the kernel.
  • arch/mips/src/mm/frame.c

    rb02e5d1 rffc277e  
    3232void frame_arch_init(void)
    3333{
     34        /* Disable first megabyte (God knows why) */
     35        frame_region_not_free(0, 1024*1024);
    3436}
  • arch/mips/src/panic.S

    rb02e5d1 rffc277e  
    3333.set nomacro
    3434
     35#include <arch/asm/regname.h>
     36       
    3537.global panic_printf
    36        
     38
     39/* From printf return directly to halt() */     
    3740panic_printf:
    38         jal printf
    39         nop
    40         j cpu_halt
    41         nop
    42 
     41        lui $ra, %hi(halt)
     42        j printf
     43        ori $ra, %lo(halt)
  • arch/mips/src/start.S

    rb02e5d1 rffc277e  
    154154               
    155155.org 0x0
    156 tlb_refill_entry:
    157         j tlb_refill_handler
    158         nop
    159 
    160 .org 0x100
    161 cache_error_entry:
    162         j cache_error_handler
    163         nop
    164 
    165 .org 0x180
    166 norm_exception:
    167         j exception_handler
    168         nop     
    169 
    170 .org 0x200
    171 iv_exception:   
    172         j exception_handler
    173         nop     
    174 
    175 .org KA2PA(KERNEL_STARTUP_ADDRESS)
    176156kernel_image_start:
    177157        /* Load temporary stack */
     
    187167
    188168        .space TEMP_STACK_SIZE
    189 end_stack:     
     169end_stack:
     170
     171tlb_refill_entry:
     172        j tlb_refill_handler
     173        nop
     174
     175cache_error_entry:
     176        j cache_error_handler
     177        nop
     178
     179exception_entry:
     180        j exception_handler
     181        nop     
     182
     183       
    190184       
    191185exception_handler:
    192 exception_entry:
    193186        KERNEL_STACK_TO_K0
    194187        sub $k0, REGISTER_SPACE
  • arch/ppc/Makefile.inc

    rb02e5d1 rffc277e  
    1515
    1616DEFS=-DARCH=$(ARCH)
    17 CPPFLAGS=$(DEFS) -nostdinc -I../include
    18 CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2
     17CFLAGS=$(DEFS) -nostdlib -fno-builtin -O2
    1918LFLAGS=-M -no-check-sections -N
    2019
  • contrib/conf/msim.conf

    rb02e5d1 rffc277e  
    55add dcpu mips1
    66
    7 add rwm mainmem         0                       16M     load "kernel.bin"
     7add rwm firstmem        0x0             128k    load "/dev/zero"
     8add rwm mainmem         0x00100000      16M     load "kernel.bin"
    89add rom startmem        0x1fc00000      1k      load "load.bin"
    910
  • src/Makefile

    rb02e5d1 rffc277e  
    3333        fb/font-8x16.c
    3434
     35# CFLAGS options same for all targets
     36CFLAGS+=-nostdinc -I../include -Werror-implicit-function-declaration -Wmissing-prototypes -Werror
     37
    3538ifdef DEBUG_SPINLOCK
    3639CFLAGS+=-D$(DEBUG_SPINLOCK)
     
    6063
    6164depend:
    62         $(CC) $(CPPFLAGS) -M $(arch_sources) $(sources) >Makefile.depend
     65        $(CC) $(CFLAGS) -M $(arch_sources) $(sources) >Makefile.depend
    6366
    6467build: kernel.bin boot
  • src/build.mips

    rb02e5d1 rffc277e  
    11#! /bin/sh
    22
    3 set -e
     3if [ -z "$1" ]; then
     4  echo "Usage: $0 [msim|simics|lgxemul|bgxemul|indy]"
     5  exit 1
     6else
     7  MACHINE=$1
     8fi
     9
    410# Generate context_offset.h
    511(cd ../tools/mips/;make gencontext;./gencontext)
     12rm ../arch/mips/_link.ld
    613
    7 
    8 make all ARCH=mips
     14make all ARCH=mips MACHINE=$MACHINE
  • src/clean.mips

    rb02e5d1 rffc277e  
    55rm ../tools/mips/gencontext
    66rm ../arch/mips/include/context_offset.h
     7rm ../arch/mips/_link.ld
Note: See TracChangeset for help on using the changeset viewer.