
On 09/01/2018 12:21 PM, Alexander Graf wrote:
On 31.08.18 20:45, Mark Kettenis wrote:
From: Heinrich Schuchardt xypron.glpk@gmx.de Date: Fri, 31 Aug 2018 19:37:25 +0200
On 06/14/2018 12:41 AM, Mark Kettenis wrote:
If desired (and possible) switch into HYP mode or non-secure SVC mode before calling the entry point of an EFI application. This allows U-Boot to provide a usable PSCI implementation and makes it possible to boot kernels into hypervisor mode using an EFI bootloader.
Based on diffs from Heinrich Schuchardt and Alexander Graf.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
bootefi hello fails on vexpress_ca15_tc2_defconfig when run on qemu with
QEMU_AUDIO_DRV=none qemu-system-arm \ -M vexpress-a15 -cpu cortex-a15 -kernel u-boot \ -net user -net nic,model=lan9118 \ -m 1024M --nographic \ -drive if=sd,file=img.vexpress,media=disk,format=raw
Works for me with:
$ qemu-system-arm --version QEMU emulator version 3.0.0 Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
=> bootefi hello Scanning disks on mmc... MMC Device 1 not found MMC Device 2 not found MMC Device 3 not found Found 3 disks WARNING: booting without device tree ## Starting EFI application at a0008000 ... WARNING: using memory device/image path, this may confuse some payloads! Hello, world! Running on UEFI 2.7 Have SMBIOS table Load options: <none> ## Application terminated, r = 0
That is with CONFIG_CMD_BOOTEFI_HELLO=y added to the vexpress_ca15_tc2_defconfig of course.
Bisection points to efi_loader: ARM: run EFI payloads non-secure commit dc500c369486fbe04000fd325c46bb309e4a1827
That suggests an issue with emulation if the mode switching instructions or HYP support in qemu. Or a toolchain issue of course.
Or maybe Heinrich's QEMU version starts up in a different EL mode?
Alex _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
The problem is reproducible with qemu 3.0.0.
git reset --hard dc500c369486fbe04000fd325c46bb309e4a1827
--- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -2,7 +2,6 @@ config EFI_LOADER bool "Support running EFI Applications in U-Boot" depends on (ARM || X86 || RISCV) && OF_LIBFDT # We do not support bootefi booting ARMv7 in non-secure mode - depends on !ARMV7_NONSEC # We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT # We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
make vexpress_ca15_tc2_defconfig
Set CONFIG_CMD_BOOTEFI_HELLO=y
export CROSS_COMPILE=arm-linux-gnueabihf- make
QEMU_AUDIO_DRV=none qemu-system-arm \ -M vexpress-a15 -cpu cortex-a15 -kernel u-boot \ -netdev \ user,id=net0,tftp=tftp,net=192.168.76.0/24,dhcpstart=192.168.76.9 \ -net nic,model=lan9118,netdev=net0 \ -m 1024M --nographic \ -drive if=sd,file=img.vexpress,media=disk,format=raw
=> bootefi hello Scanning disks on mmc... MMC Device 1 not found MMC Device 2 not found MMC Device 3 not found Found 2 disks WARNING: booting without device tree ## Starting EFI application at a0008000 ... WARNING: using memory device/image path, this may confuse some payloads!
No further output after this line :(
Best regards
Heinrich