From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Chris Metcalf <cmetcalf@ezchip.com>,
"rth@twiddle.net" <rth@twiddle.net>,
Peter Maydell <peter.maydell@linaro.org>,
Riku Voipio <riku.voipio@iki.fi>,
"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user
Date: Sun, 22 Feb 2015 21:31:57 +0800 [thread overview]
Message-ID: <54E9DA4D.1050702@sunrus.com.cn> (raw)
After load elf64 tilegx binary for linux-user, the working flow reaches
1st correct instruction "__start". Next, we shall load all instructions
for qemu using.
This patch is based on Linux kernel tile architecture tilegx 64-bit
implementation, and also based on tilegx architecture ABI reference.
The related test:
[root@localhost qemu]# ./configure --target-list=tilegx-linux-user && make
[root@localhost qemu]# ./tilegx-linux-user/qemu-tilegx -d all ./test.tgx
CPU Reset (CPU 0)
CPU Reset (CPU 0)
host mmap_min_addr=0x10000
Reserved 0xe0000 bytes of guest address space
Relocating guest address space from 0x0000000000010000 to 0x10000
guest_base 0x0
start end size prot
0000000000010000-00000000000e0000 00000000000d0000 r-x
00000000000e0000-00000000000f0000 0000000000010000 rw-
0000004000000000-0000004000010000 0000000000010000 ---
0000004000010000-0000004000810000 0000000000800000 rw-
start_brk 0x0000000000000000
end_code 0x00000000000d86f7
start_code 0x0000000000010000
start_data 0x00000000000e86f8
end_data 0x00000000000ea208
start_stack 0x000000400080f250
brk 0x00000000000ec2b0
entry 0x0000000000010f60
PROLOGUE: [size=40]
0x7fcc44c716f0: push %rbp
0x7fcc44c716f1: push %rbx
0x7fcc44c716f2: push %r12
0x7fcc44c716f4: push %r13
0x7fcc44c716f6: push %r14
0x7fcc44c716f8: push %r15
0x7fcc44c716fa: mov %rdi,%r14
0x7fcc44c716fd: add $0xfffffffffffffb78,%rsp
0x7fcc44c71704: jmpq *%rsi
0x7fcc44c71706: add $0x488,%rsp
0x7fcc44c7170d: pop %r15
0x7fcc44c7170f: pop %r14
0x7fcc44c71711: pop %r13
0x7fcc44c71713: pop %r12
0x7fcc44c71715: pop %rbx
0x7fcc44c71716: pop %rbp
0x7fcc44c71717: retq
Load elf64 tilegx successfully
reach code start position: [0000000000010f60] _start
[root@localhost qemu]# echo $?
0
[root@localhost qemu]#
Chen Gang (6):
target-tilegx: Firstly add to qemu with minimized features
linux-user: tilegx: Firstly add architecture related features
linux-user: tilegx: Add target features support within qemu
linux-user: Support tilegx architecture in syscall
linux-user: Support tilegx architecture in linux-user
linux-user/syscall.c: Switch all macros which are not defined in
tilegx
configure | 7 +
default-configs/tilegx-linux-user.mak | 1 +
include/elf.h | 2 +
linux-user/elfload.c | 23 +++
linux-user/main.c | 74 +++++++++
linux-user/syscall.c | 50 +++++-
linux-user/syscall_defs.h | 38 ++++-
linux-user/tilegx/syscall.h | 80 ++++++++++
linux-user/tilegx/syscall_nr.h | 278 +++++++++++++++++++++++++++++++++
linux-user/tilegx/target_cpu.h | 35 +++++
linux-user/tilegx/target_signal.h | 28 ++++
linux-user/tilegx/target_structs.h | 48 ++++++
linux-user/tilegx/termbits.h | 285 ++++++++++++++++++++++++++++++++++
target-tilegx/Makefile.objs | 1 +
target-tilegx/cpu-qom.h | 72 +++++++++
target-tilegx/cpu.c | 162 +++++++++++++++++++
target-tilegx/cpu.h | 85 ++++++++++
target-tilegx/helper.h | 0
target-tilegx/translate.c | 54 +++++++
19 files changed, 1318 insertions(+), 5 deletions(-)
create mode 100644 default-configs/tilegx-linux-user.mak
create mode 100644 linux-user/tilegx/syscall.h
create mode 100644 linux-user/tilegx/syscall_nr.h
create mode 100644 linux-user/tilegx/target_cpu.h
create mode 100644 linux-user/tilegx/target_signal.h
create mode 100644 linux-user/tilegx/target_structs.h
create mode 100644 linux-user/tilegx/termbits.h
create mode 100644 target-tilegx/Makefile.objs
create mode 100644 target-tilegx/cpu-qom.h
create mode 100644 target-tilegx/cpu.c
create mode 100644 target-tilegx/cpu.h
create mode 100644 target-tilegx/helper.h
create mode 100644 target-tilegx/translate.c
--
1.9.3
next reply other threads:[~2015-02-22 13:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-22 13:31 Chen Gang S [this message]
2015-02-22 13:33 ` [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features Chen Gang S
2015-02-27 17:36 ` Andreas Färber
2015-02-27 21:49 ` Chris Metcalf
2015-02-28 2:10 ` Chen Gang S
2015-02-28 2:09 ` Chris Metcalf
2015-02-28 4:39 ` Chen Gang S
2015-02-28 5:20 ` Chen Gang S
2015-02-28 20:04 ` Chen Gang S
2015-02-28 19:19 ` Chen Gang S
2015-02-22 13:35 ` [Qemu-devel] [PATCH 3/6 v4] linux-user: tilegx: Add target features support within qemu Chen Gang S
2015-02-22 13:36 ` [Qemu-devel] [PATCH 4/6 v4] linux-user: Support tilegx architecture in syscall Chen Gang S
2015-02-27 17:40 ` Andreas Färber
2015-02-27 23:10 ` Chen Gang S
2015-02-22 13:36 ` [Qemu-devel] [PATCH 5/6 v4] linux-user: Support tilegx architecture in linux-user Chen Gang S
2015-02-22 13:37 ` [Qemu-devel] [PATCH 6/6 v4] linux-user/syscall.c: Switch all macros which are not defined in tilegx Chen Gang S
2015-02-27 18:24 ` Andreas Färber
2015-02-27 23:06 ` Chen Gang S
2015-02-22 18:29 ` [Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user Richard Henderson
2015-02-23 1:40 ` Chen Gang S
2015-02-22 22:32 ` Bastian Koppelmann
2015-02-23 1:37 ` Chen Gang S
2015-02-26 23:56 ` Chen Gang S
2015-02-27 0:32 ` Chen Gang S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E9DA4D.1050702@sunrus.com.cn \
--to=gang.chen@sunrus.com.cn \
--cc=cmetcalf@ezchip.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
--cc=walt@tilera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.