qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] tile: Can load elf64 tilegx binary successfully for linux-user
@ 2015-02-12 21:14 Chen Gang S
  2015-02-12 21:15 ` [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features Chen Gang S
                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: Chen Gang S @ 2015-02-12 21:14 UTC (permalink / raw)
  To: Peter Maydell, Riku Voipio, Chris Metcalf, walt@tilera.com; +Cc: qemu-devel

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 (5):
  target-tile: Firstly add to qemu with minimized features
  linux-user: tile: Firstly add architecture related features
  linux-user: tile: Add target features support within qemu
  linux-user: Support tile architecture in syscall
  linux-user: Support tile architecture in linux-user

 configure                             |   7 +
 default-configs/tilegx-linux-user.mak |   1 +
 include/elf.h                         |   2 +
 linux-user/elfload.c                  |  23 +++
 linux-user/main.c                     |  73 ++++++++
 linux-user/syscall_defs.h             |  34 +++-
 linux-user/tile/syscall.h             |  80 +++++++++
 linux-user/tile/syscall_nr.h          | 327 ++++++++++++++++++++++++++++++++++
 linux-user/tile/target_cpu.h          |  35 ++++
 linux-user/tile/target_signal.h       |  28 +++
 linux-user/tile/target_structs.h      |  48 +++++
 linux-user/tile/termbits.h            | 285 +++++++++++++++++++++++++++++
 target-tile/Makefile.objs             |   1 +
 target-tile/cpu-qom.h                 |  72 ++++++++
 target-tile/cpu.c                     | 159 +++++++++++++++++
 target-tile/cpu.h                     |  84 +++++++++
 target-tile/helper.h                  |   0
 target-tile/translate.c               |  54 ++++++
 18 files changed, 1310 insertions(+), 3 deletions(-)
 create mode 100644 default-configs/tilegx-linux-user.mak
 create mode 100644 linux-user/tile/syscall.h
 create mode 100644 linux-user/tile/syscall_nr.h
 create mode 100644 linux-user/tile/target_cpu.h
 create mode 100644 linux-user/tile/target_signal.h
 create mode 100644 linux-user/tile/target_structs.h
 create mode 100644 linux-user/tile/termbits.h
 create mode 100644 target-tile/Makefile.objs
 create mode 100644 target-tile/cpu-qom.h
 create mode 100644 target-tile/cpu.c
 create mode 100644 target-tile/cpu.h
 create mode 100644 target-tile/helper.h
 create mode 100644 target-tile/translate.c

-- 
1.9.3 (Apple Git-50)

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2015-05-08 23:18 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12 21:14 [Qemu-devel] [PATCH 0/5] tile: Can load elf64 tilegx binary successfully for linux-user Chen Gang S
2015-02-12 21:15 ` [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features Chen Gang S
2015-02-13 23:50   ` Chen Gang S
2015-02-14  0:26     ` Peter Maydell
2015-02-14  2:40       ` Richard Henderson
2015-02-14  3:14         ` Chen Gang S
2015-02-14  3:08       ` Chen Gang S
2015-02-14  3:08         ` Peter Maydell
2015-02-14  3:37         ` Chris Metcalf
2015-02-14  5:47           ` Peter Maydell
2015-02-14 15:53             ` Chen Gang S
2015-02-16  3:40               ` Chen Gang S
2015-02-16 14:44                 ` Chen Gang S
2015-02-16 15:00                   ` Chris Metcalf
2015-02-16 23:40                     ` Chen Gang S
2015-02-16 15:24                   ` Max Filippov
2015-02-16 23:08                     ` Chen Gang S
2015-02-16 23:46                       ` Peter Maydell
2015-02-17  0:11                         ` Chris Metcalf
2015-02-17  2:48                           ` Chen Gang S
2015-02-17  3:11                             ` Chen Gang S
2015-02-17  3:18                               ` Chen Gang S
2015-02-17  0:29                 ` Chris Metcalf
2015-02-17  2:03                   ` Chen Gang S
2015-04-27 21:12                   ` [Qemu-devel] [Consult] About SPRs information Chen Gang
2015-04-27 22:04                     ` Richard Henderson
2015-04-28 20:19                       ` Chen Gang
2015-04-28 21:32                         ` Chen Gang
2015-04-28 21:43                           ` Peter Maydell
2015-04-29 13:32                             ` Chen Gang
2015-05-02  2:42                               ` Chen Gang
2015-05-02  4:09                                 ` Chen Gang
2015-05-03 14:30                                   ` Chen Gang
2015-05-07 21:05                                     ` Chen Gang
2015-05-08  3:14                                       ` Peter Maydell
2015-05-08 23:18                                         ` Chen Gang
2015-02-14 15:43           ` [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features Chen Gang S
2015-02-12 21:17 ` [Qemu-devel] [PATCH 3/5] linux-user: tile: Add target features support within qemu Chen Gang S
2015-02-12 21:18 ` [Qemu-devel] [PATCH 4/5] linux-user: Support tile architecture in syscall Chen Gang S
2015-02-12 21:20 ` [Qemu-devel] [PATCH 5/5] linux-user: Support tile architecture in linux-user Chen Gang S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).