diff mbox series

[v3,22/30] x86: Support jumping to a UPL image

Message ID 20250111000029.245022-23-sjg@chromium.org
State Accepted
Commit 9d5072bb1d965b0077ff0a1f73adcc5b5e033099
Delegated to: Tom Rini
Headers show
Series upl: Prerequite patches for updated spec | expand

Commit Message

Simon Glass Jan. 11, 2025, midnight UTC
Add a function to allow x86 boards to jump to a UPL images. Currently
only 32-bit entry is supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/x86/lib/bootm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 2a7933cdaf8..3c420b00936 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -280,3 +280,14 @@  int do_bootm_linux(int flag, struct bootm_info *bmi)
 
 	return boot_jump_linux(images);
 }
+
+int arch_upl_jump(ulong entry, const struct abuf *buf)
+{
+	typedef EFIAPI void (*h_func)(void *hoff);
+	h_func func;
+
+	func = (h_func)(ulong)entry;
+	func(buf->data);
+
+	return -EFAULT;
+}