linux-user: Support tilegx architecture in linux-user

Add main working flow feature, system call processing feature, and elf64
tilegx binary loading feature, based on Linux kernel tilegx 64-bit
implementation.

[rth: Moved all of the implementation of atomic instructions to a later patch.]

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <BLU436-SMTP938552D42808AA60634582B9660@phx.gbl>
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Chen Gang 2015-08-21 05:36:37 +08:00 committed by Richard Henderson
parent 2cb154bc19
commit b16189b222
4 changed files with 103 additions and 5 deletions

View file

@ -1218,6 +1218,29 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
#endif /* TARGET_S390X */
#ifdef TARGET_TILEGX
/* 42 bits real used address, a half for user mode */
#define ELF_START_MMAP (0x00000020000000000ULL)
#define elf_check_arch(x) ((x) == EM_TILEGX)
#define ELF_CLASS ELFCLASS64
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_TILEGX
static inline void init_thread(struct target_pt_regs *regs,
struct image_info *infop)
{
regs->pc = infop->entry;
regs->sp = infop->start_stack;
}
#define ELF_EXEC_PAGESIZE 65536 /* TILE-Gx page size is 64KB */
#endif /* TARGET_TILEGX */
#ifndef ELF_PLATFORM
#define ELF_PLATFORM (NULL)
#endif