summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-16 09:33:24 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-20 08:17:17 +0100
commit4cb07d8d93215820dc55a7fe19d617338358f1f7 (patch)
treefb73f3acfed1953f63734c97c3fa31c9d420dd87 /lib/efi_loader
parent535c473e10b32036ea0f2900bc6986f30e76c696 (diff)
downloadu-boot-4cb07d8d93215820dc55a7fe19d617338358f1f7.tar.gz
efi_loader: make EFI_DT_FIXUP_PROTOCOL configurable
Allow EFI_DT_FIXUP_PROTOCOL to be disabled via configuration. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/Kconfig8
-rw-r--r--lib/efi_loader/efi_dt_fixup.c7
-rw-r--r--lib/efi_loader/efi_root_node.c2
3 files changed, 12 insertions, 5 deletions
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index 106f789b4d..227cfa5ca4 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -208,6 +208,14 @@ config EFI_DEVICE_PATH_TO_TEXT
The device path to text protocol converts device nodes and paths to
human readable strings.
+config EFI_DT_FIXUP
+ bool "Device tree fixup protocol"
+ depends on !GENERATE_ACPI_TABLE
+ default y
+ help
+ The EFI device-tree fix-up protocol provides a function to let the
+ firmware apply fix-ups. This may be used by boot loaders.
+
config EFI_LOADER_HII
bool "HII protocols"
default y
diff --git a/lib/efi_loader/efi_dt_fixup.c b/lib/efi_loader/efi_dt_fixup.c
index c2f2daef33..3850ab3b0f 100644
--- a/lib/efi_loader/efi_dt_fixup.c
+++ b/lib/efi_loader/efi_dt_fixup.c
@@ -104,10 +104,9 @@ void efi_carve_out_dt_rsv(void *fdt)
* @flags: bit field designating action to be performed
* Return: status code
*/
-static efi_status_t EFIAPI efi_dt_fixup(struct efi_dt_fixup_protocol *this,
- void *dtb,
- efi_uintn_t *buffer_size,
- u32 flags)
+static efi_status_t __maybe_unused EFIAPI
+efi_dt_fixup(struct efi_dt_fixup_protocol *this, void *dtb,
+ efi_uintn_t *buffer_size, u32 flags)
{
efi_status_t ret;
size_t required_size;
diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c
index b411a12cf6..8383fce943 100644
--- a/lib/efi_loader/efi_root_node.c
+++ b/lib/efi_loader/efi_root_node.c
@@ -61,7 +61,7 @@ efi_status_t efi_root_node_register(void)
/* Device path utilities protocol */
&efi_guid_device_path_utilities_protocol,
(void *)&efi_device_path_utilities,
-#if !CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)
+#ifdef CONFIG_EFI_DT_FIXUP
/* Device-tree fix-up protocol */
&efi_guid_dt_fixup_protocol,
(void *)&efi_dt_fixup_prot,