Changeset de6b301 in mainline for arch/mips32


Ignore:
Timestamp:
2006-03-12T18:27:33Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f972b89
Parents:
a82500ce
Message:

Basic support for loading ELF object files.
ia64, amd64, ia32 working.
mips32 requires some attention.

Location:
arch/mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/Makefile.inc

    ra82500ce rde6b301  
    4242
    4343KERNEL_LOAD_ADDRESS = 0x80100000
    44 INIT_ADDRESS = 0x20000000
     44INIT_ADDRESS = 0x81000000
    4545INIT_SIZE = 65536
    4646
    4747CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss
    4848
    49 DEFS += -DMACHINE=${MIPS_MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} -DINIT_ADDRESS=${INIT_ADDRESS} -DINIT_SIZE=${INIT_SIZE}
     49DEFS += -D__32_BITS__ -DMACHINE=${MIPS_MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} -DINIT_ADDRESS=${INIT_ADDRESS} -DINIT_SIZE=${INIT_SIZE}
    5050
    5151## Compile with hierarchical page tables support.
     
    8181        BFD = ecoff-littlemips
    8282        CFLAGS += -DARCH_HAS_FPU -mips3
    83         INIT_ADDRESS = 0x1800000
     83        INIT_ADDRESS = 0x81800000
    8484endif
    8585ifeq ($(MIPS_MACHINE),bgxemul)
     
    8989        TOOLCHAIN_DIR = /usr/local/mips/bin
    9090        CFLAGS += -EB -DBIG_ENDIAN -DARCH_HAS_FPU -mips3
    91         INIT_ADDRESS = 0x1800000
     91        INIT_ADDRESS = 0x81800000
    9292endif
    9393ifeq ($(MIPS_MACHINE),simics)
  • arch/mips32/include/elf.h

    ra82500ce rde6b301  
    2727 */
    2828
    29 #ifndef __ia32_ELF_H__
    30 #define __ia32_ELF_H__
    31 
    32 #include <elf32.h>
     29#ifndef __mips32_ELF_H__
     30#define __mips32_ELF_H__
    3331
    3432#define ELF_MACHINE             EM_MIPS
     
    3634#define ELF_CLASS               ELFCLASS32
    3735
    38 /*
    39  * Main ELF loader function
    40  */
    41 #define elf_load(header, as) elf32_load(header, as)
    42 
    4336#endif
  • arch/mips32/src/mips32.c

    ra82500ce rde6b301  
    119119__address supervisor_sp __attribute__ ((section (".text")));
    120120
    121 void userspace(void)
     121void userspace(__address entry)
    122122{
    123123        /* EXL=1, UM=1, IE=1 */
     
    125125                                              cp0_status_um_bit |
    126126                                              cp0_status_ie_enabled_bit));
    127         cp0_epc_write(UTEXT_ADDRESS);
     127        cp0_epc_write(entry);
    128128        userspace_asm(USTACK_ADDRESS+PAGE_SIZE);
    129129        while (1)
Note: See TracChangeset for help on using the changeset viewer.