summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2026-02-17 16:56:18 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2026-02-20 14:38:21 +0100
commit95cef38e70250234a254e6228eb7342b6deaaffa (patch)
treee0efaef600651a828625a729eafec9eb2b95ea92 /drivers
parent086831fbd2a50384282a486014529893833f68c4 (diff)
firmware: google: Export coreboot table entries
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> Acked-by: Tzung-Bi Shih <tzungbi@kernel.org> Acked-by: Julius Werner <jwerner@chromium.org> Link: https://patch.msgid.link/20260217155836.96267-9-tzimmermann@suse.de
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firmware/google/coreboot_table.c10
-rw-r--r--drivers/firmware/google/coreboot_table.h60
-rw-r--r--drivers/firmware/google/framebuffer-coreboot.c2
3 files changed, 11 insertions, 61 deletions
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 81aa522edb1e..fab3f28655d3 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)
{