qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] default-configs: Support o32 ABI with 64-bit MIPS CPUs


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/4] default-configs: Support o32 ABI with 64-bit MIPS CPUs
Date: Thu, 19 Nov 2020 18:13:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Hi Maciej,

On 11/19/20 5:45 PM, Maciej W. Rozycki wrote:
> On Thu, 19 Nov 2020, Philippe Mathieu-Daudé wrote:
> 
>> MIPS o32 ABI on 64-bit CPUs looks like a ILP32-on-64bit data
>> model, allowing 64-bit arithmetic and data movement instructions.
>>
>> This is the default ABI used by the "Sony Linux Toolkit for
>> Playstation 2".
> 
>  Please don't, not at least with a generic configuration (i.e. make it 
> unambiguous that this is R5900-specific).  This only works with R5900 
> because it does not implement the MIPS ISA correctly (e.g. see what $ra is 
> set to with JAL/JALR/etc. in the kernel mode), and it is not supported by 
> the standard Linux ABI.  Use n32 instead, which has the same functionality 
> and is standard (and is also a better ABI in terms of performance).

I think there are 2 different interests with the R5900. Fredrik sent a
series to run recent userland/kernel on a PS2. For QEMU, it would be
easier if these uses the n32 ABI indeed.

This series allows me to run unmodified binaries from the PS2 (built
maybe 20 years ago, apparently for a kernel 2.2).

>  You'd probably need to implement all the R5900 addressing quirks for your 
> proposed hack to match hardware, or otherwise you'll end up with emulation 
> that creates its own reality.

QEMU doesn't model well non-MIPS32 ISA, so the R5900 needs work indeed.

Laurent, maybe instead of 'mips64o32el-linux-user' we can call this
target 'r5900o32-linux-user', 'ps2-linux-user' or even 'r5900-ps2-user'
as Maciej said "it is not supported by the standard Linux ABI."

Also I'll see to mark it deprecated so it isn't built by default.

Thanks Maciej for your interest,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]