All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v2 1/4] x86 EFI: Bypass call to fdt_check_header()
@ 2024-03-26 17:33 Pavan Kumar Paluri
  2024-03-26 17:33 ` [kvm-unit-tests PATCH v2 2/4] x86/efi: Retry call to efi exit boot services Pavan Kumar Paluri
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Pavan Kumar Paluri @ 2024-03-26 17:33 UTC (permalink / raw)
  To: kvm; +Cc: andrew.jones, thomas.lendacky, michael.roth, papaluri, amit.shah

Issuing a call to fdt_check_header() prevents running any of x86 UEFI
enabled tests. Bypass this call for x86 and also calls to
efi_load_image(), efi_grow_buffer(), efi_get_var() in order to enable
UEFI supported tests for KUT x86 arch.

Fixes: 9632ce446b8f ("arm64: efi: Improve device tree discovery")
Signed-off-by: Pavan Kumar Paluri <papaluri@amd.com>
---
 lib/efi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/efi.c b/lib/efi.c
index 5314eaa81e66..8a74a22834a4 100644
--- a/lib/efi.c
+++ b/lib/efi.c
@@ -204,6 +204,7 @@ static char *efi_convert_cmdline(struct efi_loaded_image_64 *image, int *cmd_lin
 	return (char *)cmdline_addr;
 }
 
+#if defined(__aarch64__) || defined(__riscv)
 /*
  * Open the file and read it into a buffer.
  */
@@ -330,6 +331,12 @@ static void *efi_get_fdt(efi_handle_t handle, struct efi_loaded_image_64 *image)
 
 	return fdt_check_header(fdt) == 0 ? fdt : NULL;
 }
+#else
+static void *efi_get_fdt(efi_handle_t handle, struct efi_loaded_image_64 *image)
+{
+	return NULL;
+}
+#endif
 
 static const struct {
 	struct efi_vendor_dev_path	vendor;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-27 23:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 17:33 [kvm-unit-tests PATCH v2 1/4] x86 EFI: Bypass call to fdt_check_header() Pavan Kumar Paluri
2024-03-26 17:33 ` [kvm-unit-tests PATCH v2 2/4] x86/efi: Retry call to efi exit boot services Pavan Kumar Paluri
2024-03-27  8:42   ` Andrew Jones
2024-03-26 17:33 ` [kvm-unit-tests PATCH v2 3/4] x86 AMD SEV-ES: Set GHCB page attributes for a new page table Pavan Kumar Paluri
2024-03-26 17:34 ` [kvm-unit-tests PATCH v2 4/4] x86 AMD SEV-ES: Setup a new page table and install level-1 PTEs Pavan Kumar Paluri
2024-03-27  8:08 ` [kvm-unit-tests PATCH v2 1/4] x86 EFI: Bypass call to fdt_check_header() Andrew Jones
2024-03-27 23:24   ` Paluri, PavanKumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.