From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757228AbXGBUfu (ORCPT ); Mon, 2 Jul 2007 16:35:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755465AbXGBUf2 (ORCPT ); Mon, 2 Jul 2007 16:35:28 -0400 Received: from mga06.intel.com ([134.134.136.21]:9397 "EHLO orsmga101.jf.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754631AbXGBUfY (ORCPT ); Mon, 2 Jul 2007 16:35:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.16,488,1175497200"; d="scan'208";a="261451448" Message-Id: <20070702170708.062695000@em64tdvp.jf.intel.com> References: <20070702170614.769378000@em64tdvp.jf.intel.com> Date: Mon, 02 Jul 2007 10:06:17 -0700 From: Chandramouli Narayanan To: linux-kernel@vger.kernel.org Cc: ak@suse.de, akpm@linux-foundation.org Subject: [PATCH 2.6.21 3/3] x86_64 EFI64 support Try #2 Content-Disposition: inline; filename=patch3 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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