]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: qemu: Support operation as an EFI payload
authorSimon Glass <sjg@chromium.org>
Tue, 4 Aug 2015 18:34:03 +0000 (12:34 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 5 Aug 2015 14:44:08 +0000 (08:44 -0600)
Disable a few things which interfere with the EFI init. This allows QEMU to
to boot into EFI, load a U-Boot payload then boot to the U-Boot prompt.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/qemu/Makefile
arch/x86/cpu/qemu/qemu.c
board/emulation/qemu-x86/Kconfig

index be79723a67ba11aa5a2741843fa7de1f7320d881..9a66b166fe1d434fbd1a81caf5a4c468d1521ab0 100644 (file)
@@ -4,5 +4,8 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y += car.o dram.o qemu.o
+ifndef CONFIG_EFI_STUB
+obj-y += car.o dram.o
+endif
+obj-y += qemu.o
 obj-$(CONFIG_PCI) += pci.o
index 930d2b6c9d11f2e6d6be03c9db9d7875560d51a6..64634a9229a428a4114bb3982089955ab1342ae3 100644 (file)
@@ -25,11 +25,13 @@ int arch_cpu_init(void)
        return 0;
 }
 
+#ifndef CONFIG_EFI_STUB
 int print_cpuinfo(void)
 {
        post_code(POST_CPU_INFO);
        return default_print_cpuinfo();
 }
+#endif
 
 void reset_cpu(ulong addr)
 {
index e777ef44090a15377ae8b40fcb9314c26663a535..c9181fc1bf217dde1779fa09aeb4aef0fc9f5b61 100644 (file)
@@ -13,11 +13,12 @@ config SYS_CONFIG_NAME
        default "qemu-x86"
 
 config SYS_TEXT_BASE
-       default 0xfff00000
+       default 0xfff00000 if !EFI_STUB
+       default 0x01110000 if EFI_STUB
 
 config BOARD_SPECIFIC_OPTIONS # dummy
        def_bool y
-       select X86_RESET_VECTOR
+       select X86_RESET_VECTOR if !EFI_STUB
        select QEMU
        select BOARD_ROMSIZE_KB_1024