EFI x86_64 support Patch 3 of 3 (try #2) ---------------------------------------- - Fixed redundant check in efifb_init(). This patch depends on the EFI x86_64 patches 1/3 and 2/3. This patch adds Graphics Output Protocol support to the kernel. x86_64 systems with UEFI2.0 firmware conform to UEFI 2.0 specification. 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. Patch 3 of 3 adds a EFI framebuffer driver. The EFI frame buffer driver in this patch is based on the Intel Mac framebuffer driver. The x86_64 ELILO bootloader takes care of passing the video information as appropriate for EFI firmware. Signed-off-by: Chandramouli Narayanan diff -uprN -X linux-2.6.21-orig/Documentation/dontdiff linux-2.6.21-orig/include/linux/screen_info.h linux-2.6.21-uefi-finaltest4/include/linux/screen_info.h --- linux-2.6.21-orig/include/linux/screen_info.h 2007-04-25 20:08:32.000000000 -0700 +++ linux-2.6.21-uefi-finaltest4/include/linux/screen_info.h 2007-06-12 16:16:12.000000000 -0700 @@ -63,6 +63,7 @@ extern struct screen_info screen_info; #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 */ diff -uprN -X linux-2.6.21-orig/Documentation/dontdiff linux-2.6.21-orig/drivers/video/Kconfig linux-2.6.21-uefi-finaltest4/drivers/video/Kconfig --- linux-2.6.21-orig/drivers/video/Kconfig 2007-04-25 20:08:32.000000000 -0700 +++ linux-2.6.21-uefi-finaltest4/drivers/video/Kconfig 2007-06-12 16:16:12.000000000 -0700 @@ -539,6 +539,17 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read . If unsure, say Y. +config FB_EFI + bool "EFI-based Framebuffer Support" + depends on (FB = y) && X86 && EFI + 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 diff -uprN -X linux-2.6.21-orig/Documentation/dontdiff linux-2.6.21-orig/drivers/video/Makefile linux-2.6.21-uefi-finaltest4/drivers/video/Makefile --- linux-2.6.21-orig/drivers/video/Makefile 2007-04-25 20:08:32.000000000 -0700 +++ linux-2.6.21-uefi-finaltest4/drivers/video/Makefile 2007-06-12 16:16:12.000000000 -0700 @@ -103,6 +103,7 @@ obj-$(CONFIG_FB_SM501) += sm5 # 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 vgastate.o obj-$(CONFIG_FB_OF) += offb.o diff -uprN -X linux-2.6.21-orig/Documentation/dontdiff linux-2.6.21-orig/drivers/video/efifb.c linux-2.6.21-uefi-finaltest4/drivers/video/efifb.c --- linux-2.6.21-orig/drivers/video/efifb.c 1969-12-31 16:00:00.000000000 -0800 +++ linux-2.6.21-uefi-finaltest4/drivers/video/efifb.c 2007-06-12 16:16:12.000000000 -0700 @@ -0,0 +1,249 @@ +/* + * framebuffer driver for Intel Based Mac's + * + * (c) 2006 Edgar Hucek + * Original efi driver written by Gerd Knorr + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include