From: Thomas Zimmermann <tzimmermann@suse.de>
To: tzungbi@kernel.org, briannorris@chromium.org,
jwerner@chromium.org, javierm@redhat.com, samuel@sholland.org,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@gmail.com, simona@ffwll.ch
Cc: chrome-platform@lists.linux.dev, dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v2 08/12] firmware: google: Export coreboot table entries
Date: Thu, 15 Jan 2026 08:57:18 +0100 [thread overview]
Message-ID: <20260115082128.12460-9-tzimmermann@suse.de> (raw)
In-Reply-To: <20260115082128.12460-1-tzimmermann@suse.de>
Move types for coreboot table entries to <linux/coreboot.h>. Allows
drivers in other subsystems to use these structures.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
MAINTAINERS | 1 +
drivers/firmware/google/coreboot_table.c | 10 +++
drivers/firmware/google/coreboot_table.h | 60 +----------------
.../firmware/google/framebuffer-coreboot.c | 2 -
include/linux/coreboot.h | 66 +++++++++++++++++++
5 files changed, 78 insertions(+), 61 deletions(-)
create mode 100644 include/linux/coreboot.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 0f244cf0b5c5..820d31fb8986 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10737,6 +10737,7 @@ L: chrome-platform@lists.linux.dev
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
F: drivers/firmware/google/
+F: include/linux/coreboot.h
GOOGLE TENSOR SoC SUPPORT
M: Peter Griffin <peter.griffin@linaro.org>
diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c
index a031d6fe6bc5..c769631ea15d 100644
--- a/drivers/firmware/google/coreboot_table.c
+++ b/drivers/firmware/google/coreboot_table.c
@@ -22,6 +22,16 @@
#include "coreboot_table.h"
+/* Coreboot table header structure */
+struct coreboot_table_header {
+ char signature[4];
+ u32 header_bytes;
+ u32 header_checksum;
+ u32 table_bytes;
+ u32 table_checksum;
+ u32 table_entries;
+};
+
#define CB_DEV(d) container_of(d, struct coreboot_device, dev)
#define CB_DRV(d) container_of_const(d, struct coreboot_driver, drv)
diff --git a/drivers/firmware/google/coreboot_table.h b/drivers/firmware/google/coreboot_table.h
index 17e9e5c3f6e1..616ca3903e5c 100644
--- a/drivers/firmware/google/coreboot_table.h
+++ b/drivers/firmware/google/coreboot_table.h
@@ -12,67 +12,9 @@
#ifndef __COREBOOT_TABLE_H
#define __COREBOOT_TABLE_H
+#include <linux/coreboot.h>
#include <linux/device.h>
-struct coreboot_device_id;
-
-/* Coreboot table header structure */
-struct coreboot_table_header {
- char signature[4];
- u32 header_bytes;
- u32 header_checksum;
- u32 table_bytes;
- u32 table_checksum;
- u32 table_entries;
-};
-
-/* List of coreboot entry structures that is used */
-/* Generic */
-struct coreboot_table_entry {
- u32 tag;
- u32 size;
-};
-
-/* Points to a CBMEM entry */
-struct lb_cbmem_ref {
- u32 tag;
- u32 size;
-
- u64 cbmem_addr;
-};
-
-#define LB_TAG_CBMEM_ENTRY 0x31
-
-/* Corresponds to LB_TAG_CBMEM_ENTRY */
-struct lb_cbmem_entry {
- u32 tag;
- u32 size;
-
- u64 address;
- u32 entry_size;
- u32 id;
-};
-
-/* Describes framebuffer setup by coreboot */
-struct lb_framebuffer {
- u32 tag;
- u32 size;
-
- 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;
-};
-
/* A device, additionally with information from coreboot. */
struct coreboot_device {
struct device dev;
diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c
index 703dd4f5d930..2d468d055872 100644
--- a/drivers/firmware/google/framebuffer-coreboot.c
+++ b/drivers/firmware/google/framebuffer-coreboot.c
@@ -21,8 +21,6 @@
#include "coreboot_table.h"
-#define CB_TAG_FRAMEBUFFER 0x12
-
#if defined(CONFIG_PCI)
static bool framebuffer_pci_dev_is_enabled(struct pci_dev *pdev)
{
diff --git a/include/linux/coreboot.h b/include/linux/coreboot.h
new file mode 100644
index 000000000000..48705b439c6e
--- /dev/null
+++ b/include/linux/coreboot.h
@@ -0,0 +1,66 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * coreboot.h
+ *
+ * Coreboot device and driver interfaces.
+ *
+ * Copyright 2014 Gerd Hoffmann <kraxel@redhat.com>
+ * Copyright 2017 Google Inc.
+ * Copyright 2017 Samuel Holland <samuel@sholland.org>
+ */
+
+#ifndef _LINUX_COREBOOT_H
+#define _LINUX_COREBOOT_H
+
+#include <linux/types.h>
+
+/* List of coreboot entry structures that is used */
+
+#define CB_TAG_FRAMEBUFFER 0x12
+#define LB_TAG_CBMEM_ENTRY 0x31
+
+/* Generic */
+struct coreboot_table_entry {
+ u32 tag;
+ u32 size;
+};
+
+/* Points to a CBMEM entry */
+struct lb_cbmem_ref {
+ u32 tag;
+ u32 size;
+
+ u64 cbmem_addr;
+};
+
+/* Corresponds to LB_TAG_CBMEM_ENTRY */
+struct lb_cbmem_entry {
+ u32 tag;
+ u32 size;
+
+ u64 address;
+ u32 entry_size;
+ u32 id;
+};
+
+/* Describes framebuffer setup by coreboot */
+struct lb_framebuffer {
+ u32 tag;
+ u32 size;
+
+ 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;
+};
+
+#endif /* _LINUX_COREBOOT_H */
--
2.52.0
next prev parent reply other threads:[~2026-01-15 8:22 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 7:57 [PATCH v2 00/12] drm, coreboot: Add DRM coreboot driver Thomas Zimmermann
2026-01-15 7:57 ` [PATCH v2 01/12] firmware: google: framebuffer: Do not unregister platform device Thomas Zimmermann
2026-01-26 8:28 ` Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 02/12] firmware: google: framebuffer: Do not mark framebuffer as busy Thomas Zimmermann
2026-01-26 8:28 ` Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 03/12] firmware: google: framebuffer: Init memory resource with helper macro Thomas Zimmermann
2026-01-26 8:28 ` Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 04/12] firmware: google: framebuffer: Tie platform device to PCI hardware Thomas Zimmermann
2026-01-26 8:29 ` Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 05/12] firmware: google: framebuffer: Fix dependencies Thomas Zimmermann
2026-01-15 20:54 ` Julius Werner
2026-01-16 7:30 ` Thomas Zimmermann
2026-01-17 1:38 ` Julius Werner
2026-01-29 12:41 ` Thomas Zimmermann
2026-01-26 10:24 ` Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 06/12] firmware: google: Init coreboot bus with subsys_initcall() Thomas Zimmermann
2026-01-26 10:25 ` Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 07/12] firmware: google: Clean up include statements in coreboot_table.h Thomas Zimmermann
2026-01-26 10:25 ` Tzung-Bi Shih
2026-01-15 7:57 ` Thomas Zimmermann [this message]
2026-01-26 10:25 ` [PATCH v2 08/12] firmware: google: Export coreboot table entries Tzung-Bi Shih
2026-01-15 7:57 ` [PATCH v2 09/12] firmware: google: Pack structures for " Thomas Zimmermann
2026-01-15 20:56 ` Julius Werner
2026-01-16 7:32 ` Thomas Zimmermann
2026-01-15 7:57 ` [PATCH v2 10/12] drm/sysfb: Generalize pixel-format matching Thomas Zimmermann
2026-01-15 7:57 ` [PATCH v2 11/12] drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers Thomas Zimmermann
2026-01-27 7:49 ` Tzung-Bi Shih
2026-01-29 14:56 ` Thomas Zimmermann
2026-01-15 7:57 ` [PATCH v2 12/12] drm/corebotdrm: Support panel orientation Thomas Zimmermann
2026-01-27 7:49 ` Tzung-Bi Shih
2026-01-27 8:04 ` Tzung-Bi Shih
2026-01-29 15:01 ` Thomas Zimmermann
2026-01-15 20:58 ` [PATCH v2 00/12] drm, coreboot: Add DRM coreboot driver Julius Werner
2026-01-16 7:33 ` Thomas Zimmermann
2026-01-16 9:13 ` Tzung-Bi Shih
2026-01-16 9:19 ` Thomas Zimmermann
2026-01-16 9:51 ` Tzung-Bi Shih
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=20260115082128.12460-9-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jwerner@chromium.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=simona@ffwll.ch \
--cc=tzungbi@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