coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
coreboot_tables.h File Reference
#include <stdint.h>
Include dependency graph for coreboot_tables.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lb_header
 
struct  lb_record
 
struct  lb_memory_range
 
struct  lb_memory
 
struct  lb_hwrpb
 
struct  lb_mainboard
 
struct  lb_string
 
struct  lb_timestamp
 
struct  lb_serial
 
struct  lb_console
 
struct  lb_forward
 
struct  lb_framebuffer
 
struct  lb_gpio
 
struct  lb_gpios
 
struct  lb_range
 
struct  lb_cbmem_ref
 
struct  lb_x86_rom_mtrr
 
struct  flash_mmap_window
 
struct  lb_spi_flash
 
struct  lb_boot_media_params
 
struct  lb_cbmem_entry
 
struct  lb_tsc_info
 
struct  mac_address
 
struct  lb_mmc_info
 
struct  type_c_port_info
 
struct  type_c_info
 
struct  lb_macs
 
struct  lb_board_config
 
struct  cmos_option_table
 
struct  cmos_entries
 
struct  cmos_enums
 
struct  cmos_defaults
 
struct  cmos_checksum
 
struct  lb_smmstorev2
 
struct  lb_tpm_physical_presence
 
struct  lb_acpi_rsdp
 

Macros

#define LB_MEM_RAM   1 /* Memory anyone can use */
 
#define LB_MEM_RESERVED   2 /* Don't use this memory region */
 
#define LB_MEM_ACPI   3 /* ACPI Tables */
 
#define LB_MEM_NVS   4 /* ACPI NVS Memory */
 
#define LB_MEM_UNUSABLE   5 /* Unusable address space */
 
#define LB_MEM_VENDOR_RSVD   6 /* Vendor Reserved */
 
#define LB_MEM_TABLE   16 /* Ram configuration tables are kept in */
 
#define LB_SERIAL_TYPE_IO_MAPPED   1
 
#define LB_SERIAL_TYPE_MEMORY_MAPPED   2
 
#define LB_TAG_CONSOLE_SERIAL8250   0
 
#define LB_TAG_CONSOLE_VGA   1
 
#define LB_TAG_CONSOLE_BTEXT   2
 
#define LB_TAG_CONSOLE_LOGBUF   3
 
#define LB_TAG_CONSOLE_SROM   4
 
#define LB_TAG_CONSOLE_EHCI   5
 
#define LB_TAG_CONSOLE_SERIAL8250MEM   6
 
#define ACTIVE_LOW   0
 
#define ACTIVE_HIGH   1
 
#define GPIO_MAX_NAME_LENGTH   16
 
#define MAX_SERIALNO_LENGTH   32
 
#define CMOS_MAX_NAME_LENGTH   32
 
#define CMOS_MAX_TEXT_LENGTH   32
 
#define CMOS_IMAGE_BUFFER_SIZE   256
 
#define CHECKSUM_NONE   0
 
#define CHECKSUM_PCBIOS   1
 

Enumerations

enum  {
  LB_TAG_UNUSED = 0x0000 , LB_TAG_MEMORY = 0x0001 , LB_TAG_HWRPB = 0x0002 , LB_TAG_MAINBOARD = 0x0003 ,
  LB_TAG_VERSION = 0x0004 , LB_TAG_EXTRA_VERSION = 0x0005 , LB_TAG_BUILD = 0x0006 , LB_TAG_COMPILE_TIME = 0x0007 ,
  LB_TAG_COMPILE_BY = 0x0008 , LB_TAG_COMPILE_HOST = 0x0009 , LB_TAG_COMPILE_DOMAIN = 0x000a , LB_TAG_COMPILER = 0x000b ,
  LB_TAG_LINKER = 0x000c , LB_TAG_ASSEMBLER = 0x000d , LB_TAG_SERIAL = 0x000f , LB_TAG_CONSOLE = 0x0010 ,
  LB_TAG_FORWARD = 0x0011 , LB_TAG_FRAMEBUFFER = 0x0012 , LB_TAG_GPIO = 0x0013 , LB_TAG_TIMESTAMPS = 0x0016 ,
  LB_TAG_CBMEM_CONSOLE = 0x0017 , LB_TAG_MRC_CACHE = 0x0018 , LB_TAG_VBNV = 0x0019 , LB_TAG_VBOOT_HANDOFF = 0x0020 ,
  LB_TAG_X86_ROM_MTRR = 0x0021 , LB_TAG_DMA = 0x0022 , LB_TAG_RAM_OOPS = 0x0023 , LB_TAG_ACPI_GNVS = 0x0024 ,
  LB_TAG_BOARD_ID = 0x0025 , LB_TAG_VERSION_TIMESTAMP = 0x0026 , LB_TAG_WIFI_CALIBRATION = 0x0027 , LB_TAG_RAM_CODE = 0x0028 ,
  LB_TAG_SPI_FLASH = 0x0029 , LB_TAG_SERIALNO = 0x002a , LB_TAG_MTC = 0x002b , LB_TAG_VPD = 0x002c ,
  LB_TAG_SKU_ID = 0x002d , LB_TAG_BOOT_MEDIA_PARAMS = 0x0030 , LB_TAG_CBMEM_ENTRY = 0x0031 , LB_TAG_TSC_INFO = 0x0032 ,
  LB_TAG_MAC_ADDRS = 0x0033 , LB_TAG_VBOOT_WORKBUF = 0x0034 , LB_TAG_MMC_INFO = 0x0035 , LB_TAG_TCPA_LOG = 0x0036 ,
  LB_TAG_FMAP = 0x0037 , LB_TAG_PLATFORM_BLOB_VERSION = 0x0038 , LB_TAG_SMMSTOREV2 = 0x0039 , LB_TAG_TPM_PPI_HANDOFF = 0x003a ,
  LB_TAG_BOARD_CONFIG = 0x0040 , LB_TAG_ACPI_CNVS = 0x0041 , LB_TAG_TYPE_C_INFO = 0x0042 , LB_TAG_ACPI_RSDP = 0x0043 ,
  LB_TAG_CMOS_OPTION_TABLE = 0x00c8 , LB_TAG_OPTION = 0x00c9 , LB_TAG_OPTION_ENUM = 0x00ca , LB_TAG_OPTION_DEFAULTS = 0x00cb ,
  LB_TAG_OPTION_CHECKSUM = 0x00cc
}
 
enum  lb_fb_orientation { LB_FB_ORIENTATION_NORMAL = 0 , LB_FB_ORIENTATION_BOTTOM_UP = 1 , LB_FB_ORIENTATION_LEFT_UP = 2 , LB_FB_ORIENTATION_RIGHT_UP = 3 }
 coreboot framebuffer More...
 
enum  type_c_orientation { TYPEC_ORIENTATION_NONE , TYPEC_ORIENTATION_NORMAL , TYPEC_ORIENTATION_REVERSE }
 
enum  lb_tmp_ppi_tpm_version { LB_TPM_VERSION_UNSPEC = 0 , LB_TPM_VERSION_TPM_VERSION_1_2 , LB_TPM_VERSION_TPM_VERSION_2 }
 

Functions

typedef __aligned (4) uint64_t lb_uint64_t
 
void lb_ramoops (struct lb_header *header)
 

Macro Definition Documentation

◆ ACTIVE_HIGH

#define ACTIVE_HIGH   1

Definition at line 296 of file coreboot_tables.h.

◆ ACTIVE_LOW

#define ACTIVE_LOW   0

Definition at line 295 of file coreboot_tables.h.

◆ CHECKSUM_NONE

#define CHECKSUM_NONE   0

Definition at line 513 of file coreboot_tables.h.

◆ CHECKSUM_PCBIOS

#define CHECKSUM_PCBIOS   1

Definition at line 514 of file coreboot_tables.h.

◆ CMOS_IMAGE_BUFFER_SIZE

#define CMOS_IMAGE_BUFFER_SIZE   256

Definition at line 499 of file coreboot_tables.h.

◆ CMOS_MAX_NAME_LENGTH

#define CMOS_MAX_NAME_LENGTH   32

Definition at line 472 of file coreboot_tables.h.

◆ CMOS_MAX_TEXT_LENGTH

#define CMOS_MAX_TEXT_LENGTH   32

Definition at line 486 of file coreboot_tables.h.

◆ GPIO_MAX_NAME_LENGTH

#define GPIO_MAX_NAME_LENGTH   16

Definition at line 298 of file coreboot_tables.h.

◆ LB_MEM_ACPI

#define LB_MEM_ACPI   3 /* ACPI Tables */

Definition at line 134 of file coreboot_tables.h.

◆ LB_MEM_NVS

#define LB_MEM_NVS   4 /* ACPI NVS Memory */

Definition at line 135 of file coreboot_tables.h.

◆ LB_MEM_RAM

#define LB_MEM_RAM   1 /* Memory anyone can use */

Definition at line 132 of file coreboot_tables.h.

◆ LB_MEM_RESERVED

#define LB_MEM_RESERVED   2 /* Don't use this memory region */

Definition at line 133 of file coreboot_tables.h.

◆ LB_MEM_TABLE

#define LB_MEM_TABLE   16 /* Ram configuration tables are kept in */

Definition at line 138 of file coreboot_tables.h.

◆ LB_MEM_UNUSABLE

#define LB_MEM_UNUSABLE   5 /* Unusable address space */

Definition at line 136 of file coreboot_tables.h.

◆ LB_MEM_VENDOR_RSVD

#define LB_MEM_VENDOR_RSVD   6 /* Vendor Reserved */

Definition at line 137 of file coreboot_tables.h.

◆ LB_SERIAL_TYPE_IO_MAPPED

#define LB_SERIAL_TYPE_IO_MAPPED   1

Definition at line 178 of file coreboot_tables.h.

◆ LB_SERIAL_TYPE_MEMORY_MAPPED

#define LB_SERIAL_TYPE_MEMORY_MAPPED   2

Definition at line 179 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_BTEXT

#define LB_TAG_CONSOLE_BTEXT   2

Definition at line 209 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_EHCI

#define LB_TAG_CONSOLE_EHCI   5

Definition at line 212 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_LOGBUF

#define LB_TAG_CONSOLE_LOGBUF   3

Definition at line 210 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_SERIAL8250

#define LB_TAG_CONSOLE_SERIAL8250   0

Definition at line 207 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_SERIAL8250MEM

#define LB_TAG_CONSOLE_SERIAL8250MEM   6

Definition at line 213 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_SROM

#define LB_TAG_CONSOLE_SROM   4

Definition at line 211 of file coreboot_tables.h.

◆ LB_TAG_CONSOLE_VGA

#define LB_TAG_CONSOLE_VGA   1

Definition at line 208 of file coreboot_tables.h.

◆ MAX_SERIALNO_LENGTH

#define MAX_SERIALNO_LENGTH   32

Definition at line 448 of file coreboot_tables.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LB_TAG_UNUSED 
LB_TAG_MEMORY 
LB_TAG_HWRPB 
LB_TAG_MAINBOARD 
LB_TAG_VERSION 
LB_TAG_EXTRA_VERSION 
LB_TAG_BUILD 
LB_TAG_COMPILE_TIME 
LB_TAG_COMPILE_BY 
LB_TAG_COMPILE_HOST 
LB_TAG_COMPILE_DOMAIN 
LB_TAG_COMPILER 
LB_TAG_LINKER 
LB_TAG_ASSEMBLER 
LB_TAG_SERIAL 
LB_TAG_CONSOLE 
LB_TAG_FORWARD 
LB_TAG_FRAMEBUFFER 
LB_TAG_GPIO 
LB_TAG_TIMESTAMPS 
LB_TAG_CBMEM_CONSOLE 
LB_TAG_MRC_CACHE 
LB_TAG_VBNV 
LB_TAG_VBOOT_HANDOFF 
LB_TAG_X86_ROM_MTRR 
LB_TAG_DMA 
LB_TAG_RAM_OOPS 
LB_TAG_ACPI_GNVS 
LB_TAG_BOARD_ID 
LB_TAG_VERSION_TIMESTAMP 
LB_TAG_WIFI_CALIBRATION 
LB_TAG_RAM_CODE 
LB_TAG_SPI_FLASH 
LB_TAG_SERIALNO 
LB_TAG_MTC 
LB_TAG_VPD 
LB_TAG_SKU_ID 
LB_TAG_BOOT_MEDIA_PARAMS 
LB_TAG_CBMEM_ENTRY 
LB_TAG_TSC_INFO 
LB_TAG_MAC_ADDRS 
LB_TAG_VBOOT_WORKBUF 
LB_TAG_MMC_INFO 
LB_TAG_TCPA_LOG 
LB_TAG_FMAP 
LB_TAG_PLATFORM_BLOB_VERSION 
LB_TAG_SMMSTOREV2 
LB_TAG_TPM_PPI_HANDOFF 
LB_TAG_BOARD_CONFIG 
LB_TAG_ACPI_CNVS 
LB_TAG_TYPE_C_INFO 
LB_TAG_ACPI_RSDP 
LB_TAG_CMOS_OPTION_TABLE 
LB_TAG_OPTION 
LB_TAG_OPTION_ENUM 
LB_TAG_OPTION_DEFAULTS 
LB_TAG_OPTION_CHECKSUM 

Definition at line 36 of file coreboot_tables.h.

◆ lb_fb_orientation

coreboot framebuffer

The coreboot framebuffer uses a very common format usually referred to as "linear framebuffer":

The first pixel of the framebuffer is the upper left corner, its address is given by physical_address.

Each pixel is represented by exactly bits_per_pixel bits. If a pixel (or a color component therein) doesn't fill a whole byte or doesn't start on a byte boundary, it starts at the least signifi- cant bit not occupied by the previous pixel (or color component). Pixels (or color components) that span multiple bytes always start in the byte with the lowest address.

The framebuffer provides a visible rectangle of x_resolution * y_resolution pixels. However, the lines always start at a byte boundary given by bytes_per_line, which may leave a gap after each line of pixels. Thus, the data for a pixel with the coordi- nates (x, y) from the upper left corner always starts at

physical_address + y * bytes_per_line + x * bits_per_pixel / 8

bytes_per_line is always big enough to hold x_resolution pixels. It can, however, be arbitrarily higher (e.g. to fulfill hardware constraints or for optimization purposes). The size of the framebuffer is always y_resolution * bytes_per_line.

The coreboot framebuffer only supports RGB color formats. The position and size of each color component are specified indivi- dually by <color>_mask_pos and <color>_mask_size. To allow byte or word aligned pixels, a fourth (padding) component may be specified by reserved_mask_pos and reserved_mask_size.

Software utilizing the coreboot framebuffer shall consider all fields described above. It may, however, only implement a subset of the possible color formats.

Enumerator
LB_FB_ORIENTATION_NORMAL 
LB_FB_ORIENTATION_BOTTOM_UP 
LB_FB_ORIENTATION_LEFT_UP 
LB_FB_ORIENTATION_RIGHT_UP 

Definition at line 265 of file coreboot_tables.h.

◆ lb_tmp_ppi_tpm_version

Enumerator
LB_TPM_VERSION_UNSPEC 
LB_TPM_VERSION_TPM_VERSION_1_2 
LB_TPM_VERSION_TPM_VERSION_2 

Definition at line 533 of file coreboot_tables.h.

◆ type_c_orientation

Enumerator
TYPEC_ORIENTATION_NONE 
TYPEC_ORIENTATION_NORMAL 
TYPEC_ORIENTATION_REVERSE 

Definition at line 410 of file coreboot_tables.h.

Function Documentation

◆ __aligned()

typedef __aligned ( )

◆ lb_ramoops()

void lb_ramoops ( struct lb_header header)

Referenced by write_coreboot_table().

Here is the caller graph for this function: