From: Leon Alrae <leon.alrae@imgtec.com>
To: qemu-devel@nongnu.org
Cc: matthew.fortune@imgtec.com, aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH v3 0/5] target-mips: add UHI semihosting support
Date: Fri, 19 Jun 2015 11:08:39 +0100 [thread overview]
Message-ID: <1434708524-25434-1-git-send-email-leon.alrae@imgtec.com> (raw)
This series introduces the Unified Hosting Interface support to QEMU.
Version 3 of this patchset contains just minor cleanup and corrections
in mips-semi.c comparing to previous version.
It has been on the mailing list for a while and given that command line
option responsible for passing semihosting arguments is clarified I'm
planning to apply this patch series to mips-next soon.
Patches apply on top of:
https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg05013.html
Simple example for those who would like to give it a try:
Bare Metal Toolchain containing UHI support can be obtained from:
http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.01-7/
* Source file:
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
for (i = 0; i < argc; i++) {
printf("argv[%d] = %s\n", i, argv[i]);
}
return 0;
}
* Build:
$ mips-img-elf-gcc -mips64r6 -mabi=64 -EL -Tuhi64_64.ld main.c
* Run
$ qemu-system-mips64el -cpu mips64r6-generic -M malta -nographic -kernel a.out -semihosting-config arg=a.out,arg=foo,arg="bar baz"
argv[0] = a.out
argv[1] = foo
argv[2] = bar baz
Regards,
Leon
v3:
* remove useless #ifndef CONFIG_USER_ONLY
* correct errno in copy_stat_to_target(), write_to_file() and read_from_file()
v2:
* use new -semihosting arg option
* if semihosting args are not present, then fall back to old-style
-kernel/-append
* clean up SDBBP and remove identical code in different branch
* fix overlooked microMIPS SDBBP
* translate errno values which don't map 1:1
* update dates in the licence header
* return -1 and fake errno when lock_user() fails in write_to_file() and
read_from_file()
Leon Alrae (3):
target-mips: remove identical code in different branch
target-mips: add Unified Hosting Interface (UHI) support
target-mips: convert host to MIPS errno values when required
Maciej W. Rozycki (1):
include/softmmu-semi.h: Make semihosting support 64-bit clean
Matthew Fortune (1):
hw/mips: Do not clear BEV for MIPS malta kernel load
hw/mips/mips_malta.c | 11 +-
include/exec/softmmu-semi.h | 13 +-
qemu-options.hx | 10 +-
target-mips/Makefile.objs | 2 +-
target-mips/helper.h | 2 +
target-mips/mips-semi.c | 358 ++++++++++++++++++++++++++++++++++++++++++++
target-mips/translate.c | 68 +++++----
7 files changed, 426 insertions(+), 38 deletions(-)
create mode 100644 target-mips/mips-semi.c
next reply other threads:[~2015-06-19 10:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 10:08 Leon Alrae [this message]
2015-06-19 10:08 ` [Qemu-devel] [PATCH v3 1/5] include/softmmu-semi.h: Make semihosting support 64-bit clean Leon Alrae
2015-06-24 14:24 ` Aurelien Jarno
2015-06-19 10:08 ` [Qemu-devel] [PATCH v3 2/5] hw/mips: Do not clear BEV for MIPS malta kernel load Leon Alrae
2015-06-24 14:29 ` Aurelien Jarno
2015-06-24 16:21 ` Matthew Fortune
2015-06-19 10:08 ` [Qemu-devel] [PATCH v3 3/5] target-mips: remove identical code in different branch Leon Alrae
2015-06-24 14:37 ` Aurelien Jarno
2015-06-24 14:59 ` Leon Alrae
2015-06-19 10:08 ` [Qemu-devel] [PATCH v3 4/5] target-mips: add Unified Hosting Interface (UHI) support Leon Alrae
2015-06-24 14:40 ` Aurelien Jarno
2015-06-19 10:08 ` [Qemu-devel] [PATCH v3 5/5] target-mips: convert host to MIPS errno values when required Leon Alrae
2015-06-24 14:40 ` Aurelien Jarno
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=1434708524-25434-1-git-send-email-leon.alrae@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=aurelien@aurel32.net \
--cc=matthew.fortune@imgtec.com \
--cc=qemu-devel@nongnu.org \
/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 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).