Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+78 -61
+1
MAINTAINERS
··· 10753 10753 S: Maintained 10754 10754 T: git git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git 10755 10755 F: drivers/firmware/google/ 10756 + F: include/linux/coreboot.h 10756 10757 10757 10758 GOOGLE TENSOR SoC SUPPORT 10758 10759 M: Peter Griffin <peter.griffin@linaro.org>
+10
drivers/firmware/google/coreboot_table.c
··· 22 22 23 23 #include "coreboot_table.h" 24 24 25 + /* Coreboot table header structure */ 26 + struct coreboot_table_header { 27 + char signature[4]; 28 + u32 header_bytes; 29 + u32 header_checksum; 30 + u32 table_bytes; 31 + u32 table_checksum; 32 + u32 table_entries; 33 + }; 34 + 25 35 #define CB_DEV(d) container_of(d, struct coreboot_device, dev) 26 36 #define CB_DRV(d) container_of_const(d, struct coreboot_driver, drv) 27 37
+1 -59
drivers/firmware/google/coreboot_table.h
··· 12 12 #ifndef __COREBOOT_TABLE_H 13 13 #define __COREBOOT_TABLE_H 14 14 15 + #include <linux/coreboot.h> 15 16 #include <linux/device.h> 16 - 17 - struct coreboot_device_id; 18 - 19 - /* Coreboot table header structure */ 20 - struct coreboot_table_header { 21 - char signature[4]; 22 - u32 header_bytes; 23 - u32 header_checksum; 24 - u32 table_bytes; 25 - u32 table_checksum; 26 - u32 table_entries; 27 - }; 28 - 29 - /* List of coreboot entry structures that is used */ 30 - /* Generic */ 31 - struct coreboot_table_entry { 32 - u32 tag; 33 - u32 size; 34 - }; 35 - 36 - /* Points to a CBMEM entry */ 37 - struct lb_cbmem_ref { 38 - u32 tag; 39 - u32 size; 40 - 41 - u64 cbmem_addr; 42 - }; 43 - 44 - #define LB_TAG_CBMEM_ENTRY 0x31 45 - 46 - /* Corresponds to LB_TAG_CBMEM_ENTRY */ 47 - struct lb_cbmem_entry { 48 - u32 tag; 49 - u32 size; 50 - 51 - u64 address; 52 - u32 entry_size; 53 - u32 id; 54 - }; 55 - 56 - /* Describes framebuffer setup by coreboot */ 57 - struct lb_framebuffer { 58 - u32 tag; 59 - u32 size; 60 - 61 - u64 physical_address; 62 - u32 x_resolution; 63 - u32 y_resolution; 64 - u32 bytes_per_line; 65 - u8 bits_per_pixel; 66 - u8 red_mask_pos; 67 - u8 red_mask_size; 68 - u8 green_mask_pos; 69 - u8 green_mask_size; 70 - u8 blue_mask_pos; 71 - u8 blue_mask_size; 72 - u8 reserved_mask_pos; 73 - u8 reserved_mask_size; 74 - }; 75 17 76 18 /* A device, additionally with information from coreboot. */ 77 19 struct coreboot_device {
-2
drivers/firmware/google/framebuffer-coreboot.c
··· 21 21 22 22 #include "coreboot_table.h" 23 23 24 - #define CB_TAG_FRAMEBUFFER 0x12 25 - 26 24 #if defined(CONFIG_PCI) 27 25 static bool framebuffer_pci_dev_is_enabled(struct pci_dev *pdev) 28 26 {
+66
include/linux/coreboot.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * coreboot.h 4 + * 5 + * Coreboot device and driver interfaces. 6 + * 7 + * Copyright 2014 Gerd Hoffmann <kraxel@redhat.com> 8 + * Copyright 2017 Google Inc. 9 + * Copyright 2017 Samuel Holland <samuel@sholland.org> 10 + */ 11 + 12 + #ifndef _LINUX_COREBOOT_H 13 + #define _LINUX_COREBOOT_H 14 + 15 + #include <linux/types.h> 16 + 17 + /* List of coreboot entry structures that is used */ 18 + 19 + #define CB_TAG_FRAMEBUFFER 0x12 20 + #define LB_TAG_CBMEM_ENTRY 0x31 21 + 22 + /* Generic */ 23 + struct coreboot_table_entry { 24 + u32 tag; 25 + u32 size; 26 + }; 27 + 28 + /* Points to a CBMEM entry */ 29 + struct lb_cbmem_ref { 30 + u32 tag; 31 + u32 size; 32 + 33 + u64 cbmem_addr; 34 + }; 35 + 36 + /* Corresponds to LB_TAG_CBMEM_ENTRY */ 37 + struct lb_cbmem_entry { 38 + u32 tag; 39 + u32 size; 40 + 41 + u64 address; 42 + u32 entry_size; 43 + u32 id; 44 + }; 45 + 46 + /* Describes framebuffer setup by coreboot */ 47 + struct lb_framebuffer { 48 + u32 tag; 49 + u32 size; 50 + 51 + u64 physical_address; 52 + u32 x_resolution; 53 + u32 y_resolution; 54 + u32 bytes_per_line; 55 + u8 bits_per_pixel; 56 + u8 red_mask_pos; 57 + u8 red_mask_size; 58 + u8 green_mask_pos; 59 + u8 green_mask_size; 60 + u8 blue_mask_pos; 61 + u8 blue_mask_size; 62 + u8 reserved_mask_pos; 63 + u8 reserved_mask_size; 64 + }; 65 + 66 + #endif /* _LINUX_COREBOOT_H */