]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
EFI: Introduce inline stub for efi_enabled on !X86 && !ARM
authorShawn Anastasio <sanastasio@raptorengineering.com>
Mon, 25 Mar 2024 09:47:15 +0000 (10:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Mar 2024 09:47:15 +0000 (10:47 +0100)
On architectures with no EFI support, define an inline stub
implementation of efi_enabled in efi.h that always returns false.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/include/xen/efi.h

index 942d2e9491e97bb83eb3ef66ae2eb8ff32ef1117..160804e29444aa9ec7d577beb29843f4c4703d12 100644 (file)
@@ -31,7 +31,15 @@ union compat_pf_efi_info;
 struct xenpf_efi_runtime_call;
 struct compat_pf_efi_runtime_call;
 
+#if defined(CONFIG_X86) || defined(CONFIG_ARM)
 bool efi_enabled(unsigned int feature);
+#else
+static inline bool efi_enabled(unsigned int feature)
+{
+    return false;
+}
+#endif
+
 void efi_init_memory(void);
 bool efi_boot_mem_unused(unsigned long *start, unsigned long *end);
 bool efi_rs_using_pgtables(void);