From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752260AbaIDKZx (ORCPT ); Thu, 4 Sep 2014 06:25:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22325 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbaIDKZv (ORCPT ); Thu, 4 Sep 2014 06:25:51 -0400 From: Gerd Hoffmann To: linux-kernel@vger.kernel.org Cc: coreboot@coreboot.org, Gerd Hoffmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org (maintainer:X86 ARCHITECTURE...) Subject: [PATCH] x86: add coreboot framebuffer support Date: Thu, 4 Sep 2014 12:25:07 +0200 Message-Id: <1409826307-23075-1-git-send-email-kraxel@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Gerd Hoffmann --- arch/x86/Kconfig | 12 +++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/coreboot.c | 232 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 arch/x86/kernel/coreboot.c diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 778178f..3aeb038 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2372,6 +2372,18 @@ config X86_SYSFB If unsure, say Y. +config COREBOOT + bool "coreboot" + depends on X86_SYSFB + depends on FB_SIMPLE + help + Add coreboot framebuffer support to the linux kernel. Say Y here + if you want the linux kernel find and use the firmware framebuffer + initialized by coreboot. Useful when using the linux kernel as + coreboot payload. + + If unsure, or if you don't know what coreboot is, say N. + endmenu diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index ada2e2d..4b30b0e 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -103,6 +103,7 @@ obj-$(CONFIG_UPROBES) += uprobes.o obj-y += sysfb.o obj-$(CONFIG_X86_SYSFB) += sysfb_simplefb.o obj-$(CONFIG_EFI) += sysfb_efi.o +obj-$(CONFIG_COREBOOT) += coreboot.o obj-$(CONFIG_PERF_EVENTS) += perf_regs.o obj-$(CONFIG_TRACING) += tracepoint.o diff --git a/arch/x86/kernel/coreboot.c b/arch/x86/kernel/coreboot.c new file mode 100644 index 0000000..44ed3fa --- /dev/null +++ b/arch/x86/kernel/coreboot.c @@ -0,0 +1,232 @@ +/* + * Find and parse coreboot tables. Register framebuffer if present. + * See src/include/boot/coreboot_tables.h in coreboot source tree. + */ + +#include +#include +#include +#include +#include +#include +#include