From: "H. Peter Anvin" <hpa@zytor.com>
To: Gerd Hoffmann <kraxel@redhat.com>, linux-kernel@vger.kernel.org
Cc: coreboot@coreboot.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
"maintainer:X86 ARCHITECTURE..." <x86@kernel.org>
Subject: Re: [PATCH] x86: add coreboot framebuffer support
Date: Fri, 05 Sep 2014 13:05:58 -0700 [thread overview]
Message-ID: <540A17A6.1000802@zytor.com> (raw)
In-Reply-To: <1409826307-23075-1-git-send-email-kraxel@redhat.com>
On 09/04/2014 03:25 AM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> 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
>
This should NOT be named CONFIG_COREBOOT. CONFIG_FB_COREBOOT perhaps.
> +
> +struct cb_header {
> + u32 signature;
> + u32 header_bytes;
> + u32 header_checksum;
> + u32 table_bytes;
> + u32 table_checksum;
> + u32 table_entries;
> +};
> +
> +#define CB_TAG_MAINBOARD 0x0003
> +#define CB_TAG_VERSION 0x0004
> +#define CB_TAG_FORWARD 0x0011
> +#define CB_TAG_FRAMEBUFFER 0x0012
> +
> +struct cb_mainboard {
> + u8 vendor_idx;
> + u8 part_idx;
> + char strings[0];
> +};
> +
> +struct cb_framebuffer {
> + u64 physical_address;
> + u32 x_resolution;
> + u32 y_resolution;
> + u32 bytes_per_line;
> + u8 bits_per_pixel;
> + u8 red_mask_pos;
> + u8 red_mask_size;
> + u8 green_mask_pos;
> + u8 green_mask_size;
> + u8 blue_mask_pos;
> + u8 blue_mask_size;
> + u8 reserved_mask_pos;
> + u8 reserved_mask_size;
> +};
> +
> +struct cb_entry {
> + u32 tag;
> + u32 size;
> + union {
> + char string[0];
> + u64 forward;
> + struct cb_mainboard mb;
> + struct cb_framebuffer fb;
> + } u;
> +};
> +
> +#define CB_SIGNATURE 0x4f49424C /* "LBIO" */
> +
This stuff belongs in a header file.
I'm not a fan of Coreboot having invented its own nonstandard hacks, but
I guess it is pretty much unavoidable.
-hpa
next prev parent reply other threads:[~2014-09-05 20:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 10:25 [PATCH] x86: add coreboot framebuffer support Gerd Hoffmann
2014-09-05 20:05 ` H. Peter Anvin [this message]
2014-09-05 20:55 ` [coreboot] " ron minnich
2014-09-05 21:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-05 21:18 ` ron minnich
2014-09-05 21:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-05 21:31 ` H. Peter Anvin
2014-09-05 21:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-05 21:48 ` H. Peter Anvin
2014-09-09 6:15 ` Gerd Hoffmann
2014-09-05 21:20 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=540A17A6.1000802@zytor.com \
--to=hpa@zytor.com \
--cc=coreboot@coreboot.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox