diff mbox series

[01/29] default-configs: Add TARGET_XML_FILES definition

Message ID 20231103195956.1998255-2-alex.bennee@linaro.org
State Superseded
Headers show
Series gdbstub and plugin read register and windows support | expand

Commit Message

Alex Bennée Nov. 3, 2023, 7:59 p.m. UTC
From: Akihiko Odaki <akihiko.odaki@daynix.com>

loongarch64-linux-user has references to XML files so include them.

Fixes: d32688ecdb ("default-configs: Add loongarch linux-user support")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20231030054834.39145-6-akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 configs/targets/loongarch64-linux-user.mak | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson Nov. 5, 2023, 8:55 p.m. UTC | #1
On 11/3/23 12:59, Alex Bennée wrote:
> From: Akihiko Odaki <akihiko.odaki@daynix.com>
> 
> loongarch64-linux-user has references to XML files so include them.
> 
> Fixes: d32688ecdb ("default-configs: Add loongarch linux-user support")
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> Message-Id: <20231030054834.39145-6-akihiko.odaki@daynix.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   configs/targets/loongarch64-linux-user.mak | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/configs/targets/loongarch64-linux-user.mak b/configs/targets/loongarch64-linux-user.mak
> index 7d1b964020..43b8a2160f 100644
> --- a/configs/targets/loongarch64-linux-user.mak
> +++ b/configs/targets/loongarch64-linux-user.mak
> @@ -1,3 +1,4 @@
>   # Default configuration for loongarch64-linux-user
>   TARGET_ARCH=loongarch64
>   TARGET_BASE_ARCH=loongarch
> +TARGET_XML_FILES=gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml


The qemu-loongarch64 binary emulates loongarch64 only, not loongarch32.  The inclusion of 
loongarch-base32.xml here is not relevant.

That said, we don't exclude TYPE_LOONGARCH32_CPU or -cpu la132 from CONFIG_USER_ONLY, 
which is a separate mistake.


r~
Alex Bennée Nov. 6, 2023, 3:44 p.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> On 11/3/23 12:59, Alex Bennée wrote:
>> From: Akihiko Odaki <akihiko.odaki@daynix.com>
>> loongarch64-linux-user has references to XML files so include them.
>> Fixes: d32688ecdb ("default-configs: Add loongarch linux-user
>> support")
>> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
>> Message-Id: <20231030054834.39145-6-akihiko.odaki@daynix.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   configs/targets/loongarch64-linux-user.mak | 1 +
>>   1 file changed, 1 insertion(+)
>> diff --git a/configs/targets/loongarch64-linux-user.mak
>> b/configs/targets/loongarch64-linux-user.mak
>> index 7d1b964020..43b8a2160f 100644
>> --- a/configs/targets/loongarch64-linux-user.mak
>> +++ b/configs/targets/loongarch64-linux-user.mak
>> @@ -1,3 +1,4 @@
>>   # Default configuration for loongarch64-linux-user
>>   TARGET_ARCH=loongarch64
>>   TARGET_BASE_ARCH=loongarch
>> +TARGET_XML_FILES=gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml
>
>
> The qemu-loongarch64 binary emulates loongarch64 only, not
> loongarch32.  The inclusion of loongarch-base32.xml here is not
> relevant.

Does the system binary emulate both?

> That said, we don't exclude TYPE_LOONGARCH32_CPU or -cpu la132 from
> CONFIG_USER_ONLY, which is a separate mistake.

Where should that be done?
Richard Henderson Nov. 6, 2023, 11:22 p.m. UTC | #3
On 11/6/23 07:44, Alex Bennée wrote:
>>> +TARGET_XML_FILES=gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml
>>
>>
>> The qemu-loongarch64 binary emulates loongarch64 only, not
>> loongarch32.  The inclusion of loongarch-base32.xml here is not
>> relevant.
> 
> Does the system binary emulate both?

Yes.

Technically, the user-only binary will emulate the 32-bit cpu just fine.  But much like 
aarch64, there is no ilp32 kernel abi for loongarch.


>> That said, we don't exclude TYPE_LOONGARCH32_CPU or -cpu la132 from
>> CONFIG_USER_ONLY, which is a separate mistake.
> 
> Where should that be done?

Probably target/loongarch/cpu.c, by omitting TYPE_LOONGARCH32_CPU and "la132".


r~
diff mbox series

Patch

diff --git a/configs/targets/loongarch64-linux-user.mak b/configs/targets/loongarch64-linux-user.mak
index 7d1b964020..43b8a2160f 100644
--- a/configs/targets/loongarch64-linux-user.mak
+++ b/configs/targets/loongarch64-linux-user.mak
@@ -1,3 +1,4 @@ 
 # Default configuration for loongarch64-linux-user
 TARGET_ARCH=loongarch64
 TARGET_BASE_ARCH=loongarch
+TARGET_XML_FILES=gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml