Changeset de6b301 in mainline for arch/amd64


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/amd64
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/Makefile.inc

    ra82500ce rde6b301  
    4444
    4545CFLAGS += -fno-unwind-tables -m64 -mcmodel=kernel -mno-red-zone
    46 DEFS += -D_CPU=${CPU}
     46DEFS += -D_CPU=${CPU} -D__64_BITS__
    4747
    4848## Accepted CPUs
  • arch/amd64/_link.ld.in

    ra82500ce rde6b301  
    5555       
    5656#ifdef CONFIG_SMP       
    57        
    5857        _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);
    5958        ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
  • arch/amd64/include/elf.h

    ra82500ce rde6b301  
    3030#define __amd64_ELF_H__
    3131
    32 #include <elf64.h>
    33 
    3432#define ELF_MACHINE             EM_X86_64
    3533#define ELF_DATA_ENCODING       ELFDATA2LSB
    3634#define ELF_CLASS               ELFCLASS64
    3735
    38 /*
    39  * Main ELF loader function
    40  */
    41 #define elf_load(header, as) elf64_load(header, as)
    42 
    4336#endif
  • arch/amd64/include/types.h

    ra82500ce rde6b301  
    3333
    3434typedef signed char __s8;
     35typedef signed short __s16;
     36typedef signed int __s32;
     37typedef signed long long __s64;
    3538
    3639typedef unsigned char __u8;
  • arch/amd64/src/userspace.c

    ra82500ce rde6b301  
    4040 *
    4141 */
    42 void userspace(void)
     42void userspace(__address entry)
    4343{
    4444        ipl_t ipl;
     
    6262                          "r" (ipl),
    6363                          "i" (gdtselector(UTEXT_DES) | PL_USER),
    64                           "i" (UTEXT_ADDRESS));
     64                          "r" (entry));
    6565       
    6666        /* Unreachable */
Note: See TracChangeset for help on using the changeset viewer.