Changeset a1493d9 in mainline


Ignore:
Timestamp:
2005-09-10T17:54:53Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8491c48
Parents:
24241cf
Message:

Fixed bad address loading in simulators.
FPU cooprocessor unusable now checks, if it is FPU that is unusable.

Location:
arch/mips
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • arch/mips/Makefile.inc

    r24241cf ra1493d9  
    2929 CFLAGS += -DHAVE_FPU -DFPU_LAZY -mips3
    3030 BFD = ecoff-littlemips
    31  KERNEL_LOAD_ADDRESS = 0x80010000
     31 KERNEL_LOAD_ADDRESS = 0x80100000
    3232endif
    3333
     
    3535 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -mips3
    3636 BFD = ecoff-bigmips
    37  KERNEL_LOAD_ADDRESS = 0x80010000
     37 KERNEL_LOAD_ADDRESS = 0x80100000
    3838endif
    3939
     
    4343 BFD = binary
    4444 CFLAGS += -msoft-float -march=4kc
    45  KERNEL_LOAD_ADDRESS = 0x80010000
     45 KERNEL_LOAD_ADDRESS = 0x80100000
    4646endif
    4747
     
    5151 BFD = elf32-little
    5252 CFLAGS += -msoft-float -mips3
    53  KERNEL_LOAD_ADDRESS = 0x80010000
     53 KERNEL_LOAD_ADDRESS = 0x80100000
    5454endif
    5555
  • arch/mips/boot/boot.S

    r24241cf ra1493d9  
    3636
    3737#ifndef KERNEL_LOAD_ADDRESS
    38 # define KERNEL_LOAD_ADDRESS 0x80010000
     38# define KERNEL_LOAD_ADDRESS 0x80100000
    3939#endif
    4040       
  • arch/mips/include/cp0.h

    r24241cf ra1493d9  
    4141#define cp0_status_im_shift             8
    4242#define cp0_status_im_mask              0xff00
     43
     44#define cp0_cause_excno(cause) ((cause >> 2) & 0x1f)
     45#define cp0_cause_coperr(cause) ((cause >> 28) & 0x3)
     46
     47#define fpu_cop_id 1
    4348
    4449/*
  • arch/mips/src/exception.c

    r24241cf ra1493d9  
    3737void exception(struct exception_regdump *pstate)
    3838{
     39        int cause;
    3940        int excno;
    4041        __u32 epc_shift = 0;
     
    6061                THREAD->pstate = pstate;
    6162
     63        cause = cp0_cause_read();
     64        excno = cp0_cause_excno(cause);
    6265        /* decode exception number and process the exception */
    63         switch (excno = (cp0_cause_read() >> 2) & 0x1f) {
     66        switch (excno) {
    6467                case EXC_Int:
    6568                        interrupt();
     
    7174                case EXC_CpU:
    7275#ifdef FPU_LAZY     
    73                         scheduler_fpu_lazy_request();
    74 #else
    75                         panic("unhandled Coprocessor Unusable Exception\n");
     76                        if (cp0_cause_coperr(cause) == fpu_cop_id)
     77                                scheduler_fpu_lazy_request();
     78                        else
    7679#endif
     80                                panic("unhandled Coprocessor Unusable Exception\n");
    7781                        break;
    7882                case EXC_Mod:
  • arch/mips/src/mips.c

    r24241cf ra1493d9  
    3838#include <arch/interrupt.h>
    3939
     40#include <print.h>
     41
    4042/* Size of the code jumping to the exception handler code
    4143 * - J+NOP
     
    4749#define CACHE_EXC ((char *) 0x80000100)
    4850
    49 #include <arch/debug.h>
    50 
    51 #include <print.h>
    5251void arch_pre_mm_init(void)
    5352{
Note: See TracChangeset for help on using the changeset viewer.