coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vpd_tables.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 
3 /* Ported from mosys project (http://code.google.com/p/mosys/). */
4 
5 #ifndef __LIB_VPD_TABLES_H__
6 #define __LIB_VPD_TABLES_H__
7 
8 #include <stdint.h>
9 
10 #define VPD_ENTRY_MAGIC "_SM_"
11 #define VPD_INFO_MAGIC \
12  "\xfe" /* type: VPD header */ \
13  "\x09" /* key length, 9 = 1 + 8 */ \
14  "\x01" /* info version, 1 */ \
15  "gVpdInfo" /* signature, 8 bytes */ \
16  "\x04" /* value length */
17 
18 /* Google specific VPD info */
20  union {
21  struct {
27  } tlv;
29  } header;
32 
33 /* Entry */
34 struct vpd_entry {
49 } __packed;
50 
51 /* Header */
52 struct vpd_header {
56 } __packed;
57 
58 /* Type 0 - firmware information */
66  uint8_t extension[2]; /* v2.4+ */
67  uint8_t major_ver; /* v2.4+ */
68  uint8_t minor_ver; /* v2.4+ */
69  uint8_t ec_major_ver; /* v2.4+ */
70  uint8_t ec_minor_ver; /* v2.4+ */
71 } __packed;
72 
73 /* Type 1 - system information */
81  uint8_t sku_number; /* v2.4+ */
82  uint8_t family; /* v2.4+ */
83 } __packed;
84 
85 /* Type 127 - end of table */
86 struct vpd_table_eot {
87  struct vpd_header header;
88 } __packed;
89 
90 /* Type 241 - binary blob pointer */
103 } __packed;
104 
105 /* The length and number of strings defined here is not a limitation of VPD.
106  * These numbers were deemed good enough during development. */
107 #define VPD_MAX_STRINGS 10
108 #define VPD_MAX_STRING_LENGTH 64
109 
110 #endif /* __LIB_VPD_TABLES_H__ */
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8
uint8_t type
Definition: vpd_tables.h:22
union google_vpd_info::@107 header
uint8_t key_len
Definition: vpd_tables.h:23
uint8_t value_len
Definition: vpd_tables.h:26
uint32_t size
Definition: vpd_tables.h:30
uint8_t signature[8]
Definition: vpd_tables.h:25
struct google_vpd_info::@107::@108 tlv
uint8_t info_ver
Definition: vpd_tables.h:24
uint8_t magic[12]
Definition: vpd_tables.h:28
Definition: vpd_tables.h:34
uint8_t inter_anchor_string[5]
Definition: vpd_tables.h:43
uint8_t major_ver
Definition: vpd_tables.h:38
uint16_t table_entry_count
Definition: vpd_tables.h:47
uint16_t table_length
Definition: vpd_tables.h:45
uint8_t entry_rev
Definition: vpd_tables.h:41
uint8_t minor_ver
Definition: vpd_tables.h:39
uint8_t anchor_string[4]
Definition: vpd_tables.h:35
uint8_t entry_cksum
Definition: vpd_tables.h:36
uint16_t max_size
Definition: vpd_tables.h:40
uint8_t format_area[5]
Definition: vpd_tables.h:42
uint8_t inter_anchor_cksum
Definition: vpd_tables.h:44
uint32_t table_address
Definition: vpd_tables.h:46
uint8_t bcd_revision
Definition: vpd_tables.h:48
uint8_t entry_length
Definition: vpd_tables.h:37
uint16_t handle
Definition: vpd_tables.h:55
uint8_t type
Definition: vpd_tables.h:53
uint8_t length
Definition: vpd_tables.h:54
struct vpd_header header
Definition: vpd_tables.h:87
uint8_t rom_size_64k_blocks
Definition: vpd_tables.h:64
uint8_t extension[2]
Definition: vpd_tables.h:66
uint8_t ec_minor_ver
Definition: vpd_tables.h:70
uint16_t start_address
Definition: vpd_tables.h:62
uint8_t release_date
Definition: vpd_tables.h:63
uint8_t ec_major_ver
Definition: vpd_tables.h:69
uint32_t characteristics
Definition: vpd_tables.h:65
uint8_t sku_number
Definition: vpd_tables.h:81
uint8_t manufacturer
Definition: vpd_tables.h:75
uint8_t uuid[16]
Definition: vpd_tables.h:79
uint8_t serial_number
Definition: vpd_tables.h:78
uint8_t version
Definition: vpd_tables.h:77
uint8_t family
Definition: vpd_tables.h:82
uint8_t wakeup_type
Definition: vpd_tables.h:80
struct google_vpd_info __packed