Re: EFI payload in 64 bit mode?

2024-04-24 Thread Heinrich Schuchardt

On 24.04.24 09:55, Philip Oberfichtner wrote:

Hi,

I'm wondering if it is currently possible to have U-Boot run in 64-bit
mode as EFI payload.

TARGET_EFI_APP64 selects X86_64 to achieve this. TARGET_EFI_PAYLOAD does
currently always switch 32-bit mode. Any hints what would have to be
done to get it to run in 64-bit mode?

Thanks in advance,
Philip




There are two defconfigs:

efi-x86_payload64_defconfig
efi-x86_payload32_defconfig

efi-x86_payload64_defconfig builds a 64bit EFI binary.
efi-x86_payload32_defconfig builds a 32bit EFI binary.

The essential difference is that one selects CONFIG_EFI_STUB_32BIT and
the other CONFIG_EFI_STUB_64BIT.

U-Boot itself always runs at 32bit because CONFIG_X86_RUN_32BIT=y.

To allow running at 64bit you would need at least need to change:

* jump_to_uboot() needs to execute a 64bit call to main U-Boot
* CONFIG_X86_RUN_64BIT should not select SPL if TARGET_EFI_PAYLOAD
* the definition of the global data pointer needs to be adjusted

Best regards

Heinrich


EFI payload in 64 bit mode?

2024-04-24 Thread Philip Oberfichtner
Hi,

I'm wondering if it is currently possible to have U-Boot run in 64-bit
mode as EFI payload.

TARGET_EFI_APP64 selects X86_64 to achieve this. TARGET_EFI_PAYLOAD does
currently always switch 32-bit mode. Any hints what would have to be
done to get it to run in 64-bit mode?

Thanks in advance,
Philip


-- 
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-22  Fax: +49-8142-66989-80   Email: p...@denx.de
=