Skip to contentSkip to conversation

efi_loader: Add GOP support

PATCH In review Alexander Graf 2 participants 2 messages Mar 15, 2016 – Mar 27, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi_loader: Add GOP support

The EFI standard defines a simple boot protocol that an EFI payload can use to access video output.

This patch adds support to expose exactly that one (and the mode already in use) as possible graphical configuration to an EFI payload.

With this, I can successfully run grub2 with graphical output.

---

This patch depends on the EFI enablement patches.

---
 cmd/bootefi.c            |   3 +
 include/efi_api.h        |  47 +++++++++++++++
 include/efi_loader.h     |   2 +
 lib/efi_loader/Makefile  |   1 +
 lib/efi_loader/efi_gop.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 205 insertions(+)
 create mode 100644 lib/efi_loader/efi_gop.c
cmd/bootefi.c +3 -0
index faa6978..3bc4c95 100644
@@ -141,6 +141,9 @@ static unsigned long do_bootefi_exec(void *efi)
 #ifdef CONFIG_PARTITIONS
 	efi_disk_register();
 #endif
+#ifdef CONFIG_LCD
+	efi_gop_register();
+#endif
 
 	/* Call our payload! */
 #ifdef DEBUG_EFI
include/efi_api.h +47 -0

51 lines not on this page · raw message

include/efi_loader.h +2 -0
index 385239b..129f2b7 100644
@@ -88,6 +88,8 @@ extern struct list_head efi_obj_list;
 
 /* Called by bootefi to make all disk storage accessible as EFI objects */
 int efi_disk_register(void);
+/* Called by bootefi to make GOP (graphical) interface available */
+int efi_gop_register(void);
 /*
  * Stub implementation for a protocol opener that just returns the handle as
  * interface
lib/efi_loader/Makefile +1 -0
index 28725a2..83e31f6 100644
@@ -9,4 +9,5 @@
 
 obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
 obj-y += efi_memory.o
+obj-$(CONFIG_LCD) += efi_gop.o
 obj-$(CONFIG_PARTITIONS) += efi_disk.o
lib/efi_loader/efi_gop.c new file +152 -0

152 lines not on this page · raw message

Signature · 1 line
1.8.5.6
#1 lore raw
Quoted 9 lines · Alexander Graf

The EFI standard defines a simple boot protocol that an EFI payload can use to access video output.

This patch adds support to expose exactly that one (and the mode already in use) as possible graphical configuration to an EFI payload.

With this, I can successfully run grub2 with graphical output.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160327/83c7cde8/attachment.sig>