aboutsummaryrefslogtreecommitdiff
path: root/lib/efi/Kconfig
diff options
context:
space:
mode:
authorSimon Glass2015-08-04 12:33:52 -0600
committerSimon Glass2015-08-05 08:44:06 -0600
commit476476e73b14696563524cbc2627a4c033ea64da (patch)
treeddd2da016f47be232d02b4fb3be7b4264e7b1043 /lib/efi/Kconfig
parent465a67cf529bd2f7a5ca871aff3fa63faa142516 (diff)
efi: Add support for loading U-Boot through an EFI stub
It is useful to be able to load U-Boot onto a board even if is it already running EFI. This can allow access to the U-Boot command interface, flexible booting options and easier development. The easiest way to do this is to build U-Boot as a binary blob and have an EFI stub copy it into RAM. Add support for this feature, targeting 32-bit initially. Also add a way to detect when U-Boot has been loaded via a stub. This goes in common.h since it needs to be widely available so that we avoid redoing initialisation that should be skipped. Signed-off-by: Simon Glass <sjg@chromium.org> Improvements to how the payload is built: Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'lib/efi/Kconfig')
-rw-r--r--lib/efi/Kconfig21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/efi/Kconfig b/lib/efi/Kconfig
index b23ba5b5041..919e314a0ce 100644
--- a/lib/efi/Kconfig
+++ b/lib/efi/Kconfig
@@ -20,6 +20,11 @@ config EFI_APP
command prompt and memory and I/O functions. Use 'reset' to return
to EFI.
+config EFI_STUB
+ bool "Support running as an EFI payload"
+
+endchoice
+
config EFI_RAM_SIZE
hex "Amount of EFI RAM for U-Boot"
depends on EFI_APP
@@ -30,4 +35,20 @@ config EFI_RAM_SIZE
other smaller amounts) and it can never be increased after that.
It is used as the RAM size in with U-Boot.
+choice
+ prompt "EFI 32/64-bit selection"
+ depends on EFI_STUB
+ help
+ EFI does not support mixing 32-bit and 64-bit modes. This is a
+ significant problem because it means that you must build a stub with
+ the correct type for EFI to load it correctly. If you are using
+ 32-bit EFI, select 32-bit here, else select 64-bit. Failure to do
+ this may produce no error message - it just won't start!
+
+config EFI_STUB_32BIT
+ bool "Produce a stub for running with 32-bit EFI"
+
+config EFI_STUB_64BIT
+ bool "Produce a stub for running with 64-bit EFI"
+
endchoice