qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] target-mips: add MDI semihosting, v2
@ 2009-08-03 14:45 Nathan Froyd
  2009-08-03 14:45 ` [Qemu-devel] [PATCH 1/6] sysemu: add section_callback argument to ELF loader Nathan Froyd
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Nathan Froyd @ 2009-08-03 14:45 UTC (permalink / raw)
  To: qemu-devel

This patch series adds semihosting for bare-metal 32-bit MIPS targets
that follows the MDI semihosting model used in MIPS's development
product.

The semihosting protocol works as follows:

- All semihosted calls go through _mdi_syscall, which in the absence of
  simulator support, returns ENOSYS;

- The address of _mdi_syscall is stored in a special section, .sdeosabi;

- When an MDI semihosting-aware simulator is used, a breakpoint is
  placed at _mdi_syscall;

- When this breakpoint is hit, the simulator performs the requested
  action and returns control to the program.

Discovering the address of _mdi_syscall is straightforward when the
program is passed in via -kernel.  We extended the ELF loader interface
slightly so that the caller could inspect the sections of the binary and
act on the contents of the sections if they so chose.  Things are
slightly trickier when using QEMU as a GDB remote target, as the program
will not be provided via -kernel, but via `load' from within GDB.  This
second method requires that we implement qSymbol support in the GDB
stub so we can directly ask GDB where _mdi_syscall is.

The patches have been built for {mips,mips64}-softmmu targets and tested
with the libstdc++ testsuite (which exercises things like read(),
write(), and lseek()).

Changes from v1:

- Fix license text for new mips-semi.c file;
- Ensure softmmu-semi.h compiles warning-free on other targets.

-Nathan

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 0/6] target-mips: add MDI semihosting
@ 2009-07-17 20:33 Nathan Froyd
  2009-07-17 20:33 ` [Qemu-devel] [PATCH 1/6] sysemu: add section_callback argument to ELF loader Nathan Froyd
  0 siblings, 1 reply; 8+ messages in thread
From: Nathan Froyd @ 2009-07-17 20:33 UTC (permalink / raw)
  To: qemu-devel

This patch series adds semihosting for bare-metal 32-bit MIPS targets
that follows the MDI semihosting model used in MIPS's development
product.

The semihosting protocol works as follows:

- All semihosted calls go through _mdi_syscall, which in the absence of
  simulator support, returns ENOSYS;

- The address of _mdi_syscall is stored in a special section, .sdeosabi;

- When an MDI semihosting-aware simulator is used, a breakpoint is
  placed at _mdi_syscall;

- When this breakpoint is hit, the simulator performs the requested
  action and returns control to the program.

Discovering the address of _mdi_syscall is straightforward when the
program is passed in via -kernel.  We extended the ELF loader interface
slightly so that the caller could inspect the sections of the binary and
act on the contents of the sections if they so chose.  Things are
slightly trickier when using QEMU as a GDB remote target, as the program
will not be provided via -kernel, but via `load' from within GDB.  This
second method requires that we implement qSymbol support in the GDB
stub so we can directly ask GDB where _mdi_syscall is.

The patches have been built for {mips,mips64}-softmmu targets and tested
with the libstdc++ testsuite (which exercises things like read(),
write(), and lseek()).

-Nathan

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

end of thread, other threads:[~2009-08-03 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 14:45 [Qemu-devel] [PATCH 0/6] target-mips: add MDI semihosting, v2 Nathan Froyd
2009-08-03 14:45 ` [Qemu-devel] [PATCH 1/6] sysemu: add section_callback argument to ELF loader Nathan Froyd
2009-08-03 14:45 ` [Qemu-devel] [PATCH 2/6] add softmmu_target_strlen Nathan Froyd
2009-08-03 14:45 ` [Qemu-devel] [PATCH 3/6] add implementation of MIPS semihosting Nathan Froyd
2009-08-03 14:45 ` [Qemu-devel] [PATCH 4/6] target-mips: add MDI semihosting support to mipssim machine Nathan Froyd
2009-08-03 14:45 ` [Qemu-devel] [PATCH 5/6] enable --semihosting option for TARGET_MIPS Nathan Froyd
2009-08-03 14:45 ` [Qemu-devel] [PATCH 6/6] gdbstub: add qSymbol handling " Nathan Froyd
  -- strict thread matches above, loose matches on Subject: below --
2009-07-17 20:33 [Qemu-devel] [PATCH 0/6] target-mips: add MDI semihosting Nathan Froyd
2009-07-17 20:33 ` [Qemu-devel] [PATCH 1/6] sysemu: add section_callback argument to ELF loader Nathan Froyd

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).