Re: [Qemu-devel] [PATCH 2/4] target-mips: add Unified Hosting Interface (UHI) support

2015-03-02 Thread Matthew Fortune
Leon Alrae writes: > On 01/03/2015 22:17, Matthew Fortune wrote: > >> +case UHI_plog: > >> +GET_TARGET_STRING(p, gpr[4]); > >> +p2 = strstr(p, "%d"); > >> +if (p2) { > >> +int char_num = p2 - p; > >> +char *buf = g_malloc(char_num + 1); > >> +

Re: [Qemu-devel] [PATCH 2/4] target-mips: add Unified Hosting Interface (UHI) support

2015-03-02 Thread Leon Alrae
Hi Matthew, On 01/03/2015 22:17, Matthew Fortune wrote: > Hi Leon, > > Many thanks for implementing this interface in QEMU. I haven't reviewed > in great detail as I am not familiar enough with QEMU internals to do > so. Overall it seems to match the UHI spec. The one potential issue is > transla

Re: [Qemu-devel] [PATCH 2/4] target-mips: add Unified Hosting Interface (UHI) support

2015-03-01 Thread Matthew Fortune
Hi Leon, Many thanks for implementing this interface in QEMU. I haven't reviewed in great detail as I am not familiar enough with QEMU internals to do so. Overall it seems to match the UHI spec. The one potential issue is translation of errno values, I suspect some do not map 1:1. A couple of min

[Qemu-devel] [PATCH 2/4] target-mips: add Unified Hosting Interface (UHI) support

2015-02-27 Thread Leon Alrae
Add UHI semihosting support for MIPS. QEMU run with "-semihosting" option will alter the behaviour of SDBBP 1 instruction -- UHI operation will be called instead of generating a debug exception. This commit implements all UHI operations apart from Argc, Argnlen and Argn. Signed-off-by: Leon Alrae