[PATCH 15/16] efi: LoongArch: Define LoongArch bits everywhere
Jiaxun Yang
jiaxun.yang at flygoat.com
Thu May 23 18:25:45 CEST 2024
在2024年5月23日五月 下午5:14,Heinrich Schuchardt写道:
[...]
> Looking at
> https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html:
>
> There the following symbols are mentioned:
>
> __loongarch__
> __loongarch_grlen
>
>
> Table 15.
> C/C++ Built-in Macros Provided for Compatibility with Historical Code
> marks __loongarch64 as deprecated.
Thanks, will use new macros instead.
>
>> +#define BOOTENV_EFI_PXE_ARCH "0x27"
>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00039:UNDI:003000"
>
> Where are the 32bit defines?
Since we don't have CONFIG_ARCH_LA32 in U-Boot yet I leave 32 bit alone.
Those will need to be added when we get 32-bit ready.
>
> Cf.
> https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml
>
> 0x00 0x25 LoongArch 32-bit UEFI
> 0x00 0x26 LoongArch 32-bit UEFI boot from http
> 0x00 0x27 LoongArch 64-bit UEFI
> 0x00 0x28 LoongArch 64-bit UEFI boot from http
>
[...]
>> +#elif defined(CONFIG_LOONGARCH)
>> + asm volatile ("break 0xf\n");
>
> Can we use an undefined instruction here as for the other architectures,
> please.
LoongArch have way too many hidden opcodes that is not documented & will
not trigger exception. It's pretty hard for me to identify an opcode that
can trigger exception on all hardware (and including future hardware).
Meanwhile, breakpoint instruction with an invalid hint can always generate
an SIGILL.
Thanks
>
> Best regards
>
> Heinrich
>
>> #elif defined(CONFIG_SANDBOX)
>> #if (HOST_ARCH == HOST_ARCH_ARM || HOST_ARCH == HOST_ARCH_AARCH64)
>> asm volatile (".word 0xe7f7defb\n");
>>
--
- Jiaxun
More information about the U-Boot
mailing list