Skip to contentSkip to conversation

x86_64 EFI boot support: EFI frame buffer driver

PATCH Superseded Huang, Ying 2 participants 2 messages Aug 9, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x86_64 EFI boot support: EFI frame buffer driver

Changelog between this version and previous version (v3 of x86_64 EFI support patch).

1. The include files of efifb.c is cleaned up.
2. Make CONFIG_FB_EFI do not depend on CONFIG_EFI.

---

This patch adds Graphics Output Protocol support to the kernel. UEFI2.0 spec deprecates Universal Graphics Adapter (UGA) protocol and only Graphics Output Protocol (GOP) is produced. Therefore, the boot loader needs to query the UEFI firmware with appropriate Output Protocol and pass the video information to the kernel. As a result of GOP protocol, an EFI framebuffer driver is needed for displaying console messages. The patch adds a EFI framebuffer driver. The EFI frame buffer driver in this patch is based on the Intel Mac framebuffer driver.

The ELILO bootloader takes care of passing the video information as appropriate for EFI firmware.

The framebuffer driver has been tested in i386 kernel and x86_64 kernel on EFI platform.

 drivers/video/Kconfig       |   11 ++
 drivers/video/Makefile      |    1 
 drivers/video/efifb.c       |  232 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/screen_info.h |    1 
 4 files changed, 245 insertions(+)
include/linux/screen_info.h +1 -0
Index: linux-2.6.23-rc2/include/linux/screen_info.h
===================================================================
@@ -62,6 +62,7 @@
 #define VIDEO_TYPE_EGAC		0x21	/* EGA in Color Mode		*/
 #define VIDEO_TYPE_VGAC		0x22	/* VGA+ in Color Mode		*/
 #define VIDEO_TYPE_VLFB		0x23	/* VESA VGA in graphic mode	*/
+#define VIDEO_TYPE_EFI		0x24	/* EFI graphic mode		*/
 
 #define VIDEO_TYPE_PICA_S3	0x30	/* ACER PICA-61 local S3 video	*/
 #define VIDEO_TYPE_MIPS_G364	0x31    /* MIPS Magnum 4000 G364 video  */
drivers/video/Kconfig +11 -0
Index: linux-2.6.23-rc2/drivers/video/Kconfig
===================================================================
@@ -605,6 +605,17 @@
 	  You will get a boot time penguin logo at no additional cost. Please
 	  read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
 
+config FB_EFI
+	bool "EFI-based Framebuffer Support"
+	depends on (FB = y) && X86
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	help
+	  This is the EFI frame buffer device driver. If the firmware on
+	  your platform is UEFI2.0, select Y to add support for
+	  Graphics Output Protocol for early console messages to appear.
+
 config FB_IMAC
 	bool "Intel-based Macintosh Framebuffer Support"
 	depends on (FB = y) && X86 && EFI
drivers/video/Makefile +1 -0
Index: linux-2.6.23-rc2/drivers/video/Makefile
===================================================================
@@ -117,6 +117,7 @@
 # Platform or fallback drivers go here
 obj-$(CONFIG_FB_VESA)             += vesafb.o
 obj-$(CONFIG_FB_IMAC)             += imacfb.o
+obj-$(CONFIG_FB_EFI)              += efifb.o
 obj-$(CONFIG_FB_VGA16)            += vga16fb.o
 obj-$(CONFIG_FB_OF)               += offb.o
 
drivers/video/efifb.c new file +232 -0

232 lines not on this page · raw message

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

#1 lore raw
Quoted 5 lines · Ying

Changelog between this version and previous version (v3 of x86_64 EFI support patch).

1. The include files of efifb.c is cleaned up.
2. Make CONFIG_FB_EFI do not depend on CONFIG_EFI.

BTW, the recommended place to put changelogs (so the tools will strip it automatically when importing your patch) is after the first `---' and before the diffstat output

Quoted 1 line

---

Bogus `---' :-)

Quoted 10 lines

This patch adds Graphics Output Protocol support to the kernel. UEFI2.0 spec deprecates Universal Graphics Adapter (UGA) protocol and only Graphics Output Protocol (GOP) is produced. Therefore, the boot loader needs to query the UEFI firmware with appropriate Output Protocol and pass the video information to the kernel. As a result of GOP protocol, an EFI framebuffer driver is needed for displaying console messages. The patch adds a EFI framebuffer driver. The EFI frame buffer driver in this patch is based on the Intel Mac framebuffer driver.

Quoted 9 lines

The ELILO bootloader takes care of passing the video information as appropriate for EFI firmware.

The framebuffer driver has been tested in i386 kernel and x86_64 kernel on EFI platform.

Missing `---' ;-)

Quoted 5 lines
 drivers/video/Kconfig       |   11 ++
 drivers/video/Makefile      |    1 
 drivers/video/efifb.c       |  232 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/screen_info.h |    1 
 4 files changed, 245 insertions(+)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/