coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
coreboot_table.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <acpi/acpi.h>
4 #include <arch/cbconfig.h>
5 #include <console/console.h>
6 #include <console/uart.h>
7 #include <ip_checksum.h>
8 #include <boot/coreboot_tables.h>
9 #include <boot/tables.h>
10 #include <boot_device.h>
11 #include <string.h>
12 #include <version.h>
13 #include <boardid.h>
14 #include <device/device.h>
15 #include <drivers/tpm/tpm_ppi.h>
16 #include <fmap.h>
17 #include <fw_config.h>
18 #include <cbfs.h>
19 #include <cbmem.h>
20 #include <bootmem.h>
21 #include <bootsplash.h>
22 #include <inttypes.h>
23 #include <spi_flash.h>
24 #include <smmstore.h>
25 #include <types.h>
26 
27 #if CONFIG(USE_OPTION_TABLE)
28 #include <option_table.h>
29 #endif
30 #if CONFIG(PLATFORM_USES_FSP2_0)
31 #include <fsp/util.h>
32 #else
34 #endif
35 
36 static struct lb_header *lb_table_init(unsigned long addr)
37 {
38  struct lb_header *header;
39 
40  addr = ALIGN_UP(addr, 16);
41 
42  header = (void *)addr;
43  header->signature[0] = 'L';
44  header->signature[1] = 'B';
45  header->signature[2] = 'I';
46  header->signature[3] = 'O';
47  header->header_bytes = sizeof(*header);
48  header->header_checksum = 0;
49  header->table_bytes = 0;
50  header->table_checksum = 0;
51  header->table_entries = 0;
52  return header;
53 }
54 
55 static struct lb_record *lb_first_record(struct lb_header *header)
56 {
57  struct lb_record *rec;
58  rec = (void *)(((char *)header) + sizeof(*header));
59  return rec;
60 }
61 
62 static struct lb_record *lb_last_record(struct lb_header *header)
63 {
64  struct lb_record *rec;
65  rec = (void *)(((char *)header) + sizeof(*header)
66  + header->table_bytes);
67  return rec;
68 }
69 
71 {
72  struct lb_record *rec;
73  rec = lb_last_record(header);
74  if (header->table_entries)
75  header->table_bytes += rec->size;
76  rec = lb_last_record(header);
77  header->table_entries++;
78  rec->tag = LB_TAG_UNUSED;
79  rec->size = sizeof(*rec);
80  return rec;
81 }
82 
83 static struct lb_memory *lb_memory(struct lb_header *header)
84 {
85  struct lb_record *rec;
86  struct lb_memory *mem;
87  rec = lb_new_record(header);
88  mem = (struct lb_memory *)rec;
89  mem->tag = LB_TAG_MEMORY;
90  mem->size = sizeof(*mem);
91  return mem;
92 }
93 
94 void lb_add_serial(struct lb_serial *new_serial, void *data)
95 {
96  struct lb_header *header = (struct lb_header *)data;
97  struct lb_serial *serial;
98 
99  serial = (struct lb_serial *)lb_new_record(header);
100  serial->tag = LB_TAG_SERIAL;
101  serial->size = sizeof(*serial);
102  serial->type = new_serial->type;
103  serial->baseaddr = new_serial->baseaddr;
104  serial->baud = new_serial->baud;
105  serial->regwidth = new_serial->regwidth;
106  serial->input_hertz = new_serial->input_hertz;
107  serial->uart_pci_addr = new_serial->uart_pci_addr;
108 }
109 
110 void lb_add_console(uint16_t consoletype, void *data)
111 {
112  struct lb_header *header = (struct lb_header *)data;
113  struct lb_console *console;
114 
115  console = (struct lb_console *)lb_new_record(header);
116  console->tag = LB_TAG_CONSOLE;
117  console->size = sizeof(*console);
118  console->type = consoletype;
119 }
120 
121 static void lb_framebuffer(struct lb_header *header)
122 {
123  struct lb_framebuffer *framebuffer;
124  struct lb_framebuffer fb = {0};
125 
126  if (!CONFIG(LINEAR_FRAMEBUFFER) || fill_lb_framebuffer(&fb))
127  return;
128 
129  framebuffer = (struct lb_framebuffer *)lb_new_record(header);
130  memcpy(framebuffer, &fb, sizeof(*framebuffer));
131  framebuffer->tag = LB_TAG_FRAMEBUFFER;
132  framebuffer->size = sizeof(*framebuffer);
133 
134  if (CONFIG(BOOTSPLASH)) {
135  uint8_t *fb_ptr = (uint8_t *)(uintptr_t)framebuffer->physical_address;
136  unsigned int width = framebuffer->x_resolution;
137  unsigned int height = framebuffer->y_resolution;
138  unsigned int depth = framebuffer->bits_per_pixel;
139  set_bootsplash(fb_ptr, width, height, depth);
140  }
141 }
142 
143 void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table,
144  size_t count)
145 {
146  size_t table_size = count * sizeof(struct lb_gpio);
147 
148  memcpy(&gpios->gpios[gpios->count], gpio_table, table_size);
149  gpios->count += count;
150  gpios->size += table_size;
151 }
152 
153 static void lb_gpios(struct lb_header *header)
154 {
155  struct lb_gpios *gpios;
156  struct lb_gpio *g;
157 
158  gpios = (struct lb_gpios *)lb_new_record(header);
159  gpios->tag = LB_TAG_GPIO;
160  gpios->size = sizeof(*gpios);
161  gpios->count = 0;
163 
164  printk(BIOS_INFO, "Passing %u GPIOs to payload:\n"
165  " NAME | PORT | POLARITY | VALUE\n",
166  gpios->count);
167  for (g = &gpios->gpios[0]; g < &gpios->gpios[gpios->count]; g++) {
168  printk(BIOS_INFO, "%16.16s | ", g->name);
169  if (g->port == -1)
170  printk(BIOS_INFO, " undefined | ");
171  else
172  printk(BIOS_INFO, "%#.8x | ", g->port);
173  if (g->polarity == ACTIVE_HIGH)
174  printk(BIOS_INFO, " high | ");
175  else
176  printk(BIOS_INFO, " low | ");
177  switch (g->value) {
178  case 0:
179  printk(BIOS_INFO, " low\n");
180  break;
181  case 1:
182  printk(BIOS_INFO, " high\n");
183  break;
184  default:
185  printk(BIOS_INFO, "undefined\n");
186  break;
187  }
188  }
189 }
190 
195 
197 {
198  struct lb_boot_media_params *bmp;
199  const struct region_device *boot_dev;
200  const struct cbfs_boot_device *cbd = cbfs_get_boot_device(false);
201  if (!cbd)
202  return;
203 
205  if (boot_dev == NULL)
206  return;
207 
208  bmp = (struct lb_boot_media_params *)lb_new_record(header);
210  bmp->size = sizeof(*bmp);
211 
212  bmp->cbfs_offset = region_device_offset(&cbd->rdev);
213  bmp->cbfs_size = region_device_sz(&cbd->rdev);
215 
217 }
218 
219 static void lb_mmc_info(struct lb_header *header)
220 {
221  struct lb_mmc_info *rec;
222  int32_t *ms_cbmem;
223 
224  ms_cbmem = cbmem_find(CBMEM_ID_MMC_STATUS);
225  if (!ms_cbmem)
226  return;
227 
228  rec = (struct lb_mmc_info *)lb_new_record(header);
229 
230  rec->tag = LB_TAG_MMC_INFO;
231  rec->size = sizeof(*rec);
232  rec->early_cmd1_status = *ms_cbmem;
233 }
234 
235 static void add_cbmem_pointers(struct lb_header *header)
236 {
237  /*
238  * These CBMEM sections' addresses are included in the coreboot table
239  * with the appropriate tags.
240  */
241  const struct section_id {
242  int cbmem_id;
243  int table_tag;
244  } section_ids[] = {
255  };
256  int i;
257 
258  for (i = 0; i < ARRAY_SIZE(section_ids); i++) {
259  const struct section_id *sid = section_ids + i;
260  struct lb_cbmem_ref *cbmem_ref;
261  void *cbmem_addr = cbmem_find(sid->cbmem_id);
262 
263  if (!cbmem_addr)
264  continue; /* This section is not present */
265 
266  cbmem_ref = (struct lb_cbmem_ref *)lb_new_record(header);
267  if (!cbmem_ref) {
268  printk(BIOS_ERR, "No more room in coreboot table!\n");
269  break;
270  }
271  cbmem_ref->tag = sid->table_tag;
272  cbmem_ref->size = sizeof(*cbmem_ref);
273  cbmem_ref->cbmem_addr = (unsigned long)cbmem_addr;
274  }
275 }
276 
277 static struct lb_mainboard *lb_mainboard(struct lb_header *header)
278 {
279  struct lb_record *rec;
280  struct lb_mainboard *mainboard;
281  rec = lb_new_record(header);
282  mainboard = (struct lb_mainboard *)rec;
283  mainboard->tag = LB_TAG_MAINBOARD;
284 
285  mainboard->size = ALIGN_UP(sizeof(*mainboard) +
286  strlen(mainboard_vendor) + 1 +
287  strlen(mainboard_part_number) + 1, 8);
288 
289  mainboard->vendor_idx = 0;
290  mainboard->part_number_idx = strlen(mainboard_vendor) + 1;
291 
292  memcpy(mainboard->strings + mainboard->vendor_idx,
294  memcpy(mainboard->strings + mainboard->part_number_idx,
296 
297  return mainboard;
298 }
299 
301 {
302  struct lb_record *rec;
303  struct lb_board_config *config;
304  rec = lb_new_record(header);
305  config = (struct lb_board_config *)rec;
306 
308  config->size = sizeof(*config);
309 
310  const uint64_t fw_config = fw_config_get();
311  config->board_id = board_id();
312  config->ram_code = ram_code();
313  config->sku_id = sku_id();
314  config->fw_config = fw_config;
315 
316  if (config->board_id != UNDEFINED_STRAPPING_ID)
317  printk(BIOS_INFO, "Board ID: %d\n", config->board_id);
318  if (config->ram_code != UNDEFINED_STRAPPING_ID)
319  printk(BIOS_INFO, "RAM code: %d\n", config->ram_code);
320  if (config->sku_id != UNDEFINED_STRAPPING_ID)
321  printk(BIOS_INFO, "SKU ID: %d\n", config->sku_id);
323  printk(BIOS_INFO, "FW config: %#" PRIx64 "\n", fw_config);
324 
325  return config;
326 }
327 
328 #if CONFIG(USE_OPTION_TABLE)
329 static struct cmos_checksum *lb_cmos_checksum(struct lb_header *header)
330 {
331  struct lb_record *rec;
333  rec = lb_new_record(header);
334  cmos_checksum = (struct cmos_checksum *)rec;
336 
337  cmos_checksum->size = (sizeof(*cmos_checksum));
338 
339  cmos_checksum->range_start = LB_CKS_RANGE_START * 8;
340  cmos_checksum->range_end = (LB_CKS_RANGE_END * 8) + 7;
341  cmos_checksum->location = LB_CKS_LOC * 8;
343 
344  return cmos_checksum;
345 }
346 #endif
347 
348 static void lb_strings(struct lb_header *header)
349 {
350  static const struct {
351  uint32_t tag;
352  const char *string;
353  } strings[] = {
358  };
359  unsigned int i;
360  for (i = 0; i < ARRAY_SIZE(strings); i++) {
361  struct lb_string *rec;
362  size_t len;
363  rec = (struct lb_string *)lb_new_record(header);
364  len = strlen(strings[i].string);
365  rec->tag = strings[i].tag;
366  rec->size = ALIGN_UP(sizeof(*rec) + len + 1, 8);
367  memcpy(rec->string, strings[i].string, len+1);
368  }
369 
370 }
371 
373 {
374  struct lb_timestamp *rec;
375  rec = (struct lb_timestamp *)lb_new_record(header);
377  rec->size = sizeof(*rec);
379 }
380 
381 void __weak lb_board(struct lb_header *header) { /* NOOP */ }
382 
383 /*
384  * It's possible that the system is using a SPI flash as the boot device,
385  * however it is not probing for devices to fill in specifics. In that
386  * case don't provide any information as the correct information is
387  * not known.
388  */
389 void __weak lb_spi_flash(struct lb_header *header) { /* NOOP */ }
390 
391 static struct lb_forward *lb_forward(struct lb_header *header,
392  struct lb_header *next_header)
393 {
394  struct lb_record *rec;
395  struct lb_forward *forward;
396  rec = lb_new_record(header);
397  forward = (struct lb_forward *)rec;
398  forward->tag = LB_TAG_FORWARD;
399  forward->size = sizeof(*forward);
400  forward->forward = (uint64_t)(unsigned long)next_header;
401  return forward;
402 }
403 
404 static unsigned long lb_table_fini(struct lb_header *head)
405 {
406  struct lb_record *rec, *first_rec;
407  rec = lb_last_record(head);
408  if (head->table_entries)
409  head->table_bytes += rec->size;
410 
411  first_rec = lb_first_record(head);
412  head->table_checksum = compute_ip_checksum(first_rec,
413  head->table_bytes);
414  head->header_checksum = 0;
415  head->header_checksum = compute_ip_checksum(head, sizeof(*head));
417  "Wrote coreboot table at: %p, 0x%x bytes, checksum %x\n",
418  head, head->table_bytes, head->table_checksum);
419  return (unsigned long)rec + rec->size;
420 }
421 
422 static void lb_add_acpi_rsdp(struct lb_header *head)
423 {
424  struct lb_acpi_rsdp *acpi_rsdp;
425  struct lb_record *rec = lb_new_record(head);
426  acpi_rsdp = (struct lb_acpi_rsdp *)rec;
428  acpi_rsdp->size = sizeof(*acpi_rsdp);
429  acpi_rsdp->rsdp_pointer = get_coreboot_rsdp();
430 }
431 
433 {
434  struct lb_header *head;
435 
436  printk(BIOS_DEBUG, "Writing table forward entry at %p\n",
437  (void *)entry);
438 
439  head = lb_table_init(entry);
440  lb_forward(head, (struct lb_header *)target);
441 
442  return (uintptr_t)lb_table_fini(head) - entry;
443 }
444 
446 {
447  struct lb_header *head;
448 
449  printk(BIOS_DEBUG, "Writing coreboot table at 0x%08lx\n",
450  (long)rom_table_end);
451 
452  head = lb_table_init(rom_table_end);
453 
454 #if CONFIG(USE_OPTION_TABLE)
455  {
456  struct cmos_option_table *option_table =
457  cbfs_map("cmos_layout.bin", NULL);
458  if (option_table) {
459  struct lb_record *rec_dest = lb_new_record(head);
460  /* Copy the option config table, it's already a
461  * lb_record...
462  */
463  memcpy(rec_dest, option_table, option_table->size);
464  /* Create CMOS checksum entry in coreboot table */
465  lb_cmos_checksum(head);
466  } else {
468  "cmos_layout.bin could not be found!\n");
469  }
470  }
471 #endif
472 
473  /* Serialize resource map into mem table types (LB_MEM_*) */
475 
476  /* Record our motherboard */
477  lb_mainboard(head);
478 
479  /* Record the serial ports and consoles */
480  if (CONFIG(CONSOLE_SERIAL))
481  uart_fill_lb(head);
482 
483  if (CONFIG(CONSOLE_USB))
485 
486  /* Record our various random string information */
487  lb_strings(head);
488  if (CONFIG(PLATFORM_USES_FSP2_0))
491  /* Record our framebuffer */
492  lb_framebuffer(head);
493 
494  /* Record our GPIO settings (ChromeOS specific) */
495  if (CONFIG(CHROMEOS))
496  lb_gpios(head);
497 
498  /* pass along VBNV offsets in CMOS */
499  if (CONFIG(VBOOT_VBNV_CMOS))
501 
502  /* Pass mmc early init status */
503  lb_mmc_info(head);
504 
505  /* Add SPI flash description if available */
506  if (CONFIG(BOOT_DEVICE_SPI_FLASH))
507  lb_spi_flash(head);
508 
509  add_cbmem_pointers(head);
510 
511  /* SMMSTORE v2 */
512  if (CONFIG(SMMSTORE_V2))
513  lb_smmstorev2(head);
514 
515  /* Add board-specific table entries, if any. */
516  lb_board(head);
517 
518  if (CONFIG(CHROMEOS_RAMOOPS))
519  lb_ramoops(head);
520 
521  lb_boot_media_params(head);
522 
523  /* Board configuration information (including straps) */
524  lb_board_config(head);
525 
526  if (CONFIG(TPM_PPI))
527  lb_tpm_ppi(head);
528 
529  /* Add architecture records. */
530  lb_arch_add_records(head);
531 
532  /* Add all cbmem entries into the coreboot tables. */
534 
535  if (CONFIG(HAVE_ACPI_TABLES))
536  lb_add_acpi_rsdp(head);
537 
538  /* Remember where my valid memory ranges are */
539  return lb_table_fini(head);
540 }
541 
542 void *write_tables(void)
543 {
544  uintptr_t cbtable_start;
545  uintptr_t cbtable_end;
546  size_t cbtable_size;
547  const size_t max_table_size = COREBOOT_TABLE_SIZE;
548 
549  cbtable_start = (uintptr_t)cbmem_add(CBMEM_ID_CBTABLE, max_table_size);
550 
551  if (!cbtable_start) {
552  printk(BIOS_ERR, "Could not add CBMEM for coreboot table.\n");
553  return NULL;
554  }
555 
556  /* Add architecture specific tables. */
557  arch_write_tables(cbtable_start);
558 
559  /* Write the coreboot table. */
560  cbtable_end = write_coreboot_table(cbtable_start);
561  cbtable_size = cbtable_end - cbtable_start;
562 
563  if (cbtable_size > max_table_size) {
564  printk(BIOS_ERR, "%s: coreboot table didn't fit (%zx/%zx)\n",
565  __func__, cbtable_size, max_table_size);
566  }
567 
568  printk(BIOS_DEBUG, "coreboot table: %zd bytes.\n", cbtable_size);
569 
570  /* Print CBMEM sections */
571  cbmem_list();
572  return (void *)cbtable_start;
573 }
uintptr_t get_coreboot_rsdp(void)
Definition: acpi.c:1587
struct arm64_kernel_header header
Definition: fit_payload.c:30
void arch_write_tables(uintptr_t coreboot_table)
Definition: tables.c:8
void lb_arch_add_records(struct lb_header *header)
Definition: tables.c:24
const struct region_device * boot_device_ro(void)
Definition: rom_media.c:9
static const struct mem_region_device boot_dev
Definition: rom_media.c:6
void * memcpy(void *dest, const void *src, size_t n)
Definition: memcpy.c:7
#define COREBOOT_TABLE_SIZE
Definition: cbconfig.h:13
#define UNDEFINED_STRAPPING_ID
Definition: boardid.h:8
static int width
Definition: bochs.c:42
void bootmem_write_memory_table(struct lb_memory *mem)
Write memory coreboot table.
Definition: bootmem.c:102
void set_bootsplash(unsigned char *framebuffer, unsigned int x_resolution, unsigned int y_resolution, unsigned int fb_resolution)
Sets up the framebuffer with the bootsplash.jpg from cbfs.
Definition: bootsplash.c:13
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define ALIGN_UP(x, a)
Definition: helpers.h:17
static void * cbfs_map(const char *name, size_t *size_out)
Definition: cbfs.h:246
const struct cbfs_boot_device * cbfs_get_boot_device(bool force_ro)
Definition: cbfs.c:634
void cbmem_add_records_to_cbtable(struct lb_header *header)
Definition: imd_cbmem.c:224
void * cbmem_add(u32 id, u64 size)
Definition: imd_cbmem.c:144
void cbmem_list(void)
void * cbmem_find(u32 id)
Definition: imd_cbmem.c:166
#define CBMEM_ID_TCPA_LOG
Definition: cbmem_id.h:60
#define CBMEM_ID_CBTABLE
Definition: cbmem_id.h:16
#define CBMEM_ID_CONSOLE
Definition: cbmem_id.h:19
#define CBMEM_ID_MMC_STATUS
Definition: cbmem_id.h:35
#define CBMEM_ID_WIFI_CALIBRATION
Definition: cbmem_id.h:69
#define CBMEM_ID_VBOOT_WORKBUF
Definition: cbmem_id.h:67
#define CBMEM_ID_ACPI_CNVS
Definition: cbmem_id.h:8
#define CBMEM_ID_ACPI_GNVS
Definition: cbmem_id.h:9
#define CBMEM_ID_VPD
Definition: cbmem_id.h:68
#define CBMEM_ID_FMAP
Definition: cbmem_id.h:76
#define CBMEM_ID_TIMESTAMP
Definition: cbmem_id.h:62
#define CBMEM_ID_TYPE_C_INFO
Definition: cbmem_id.h:81
static u32 addr
Definition: cirrus.c:14
@ LB_TAG_BUILD
@ LB_TAG_VBOOT_WORKBUF
@ LB_TAG_COMPILE_TIME
@ LB_TAG_TCPA_LOG
@ LB_TAG_SERIAL
@ LB_TAG_VERSION_TIMESTAMP
@ LB_TAG_CONSOLE
@ LB_TAG_EXTRA_VERSION
@ LB_TAG_FRAMEBUFFER
@ LB_TAG_FMAP
@ LB_TAG_MMC_INFO
@ LB_TAG_ACPI_CNVS
@ LB_TAG_TIMESTAMPS
@ LB_TAG_OPTION_CHECKSUM
@ LB_TAG_ACPI_RSDP
@ LB_TAG_ACPI_GNVS
@ LB_TAG_BOOT_MEDIA_PARAMS
@ LB_TAG_CBMEM_CONSOLE
@ LB_TAG_TYPE_C_INFO
@ LB_TAG_VPD
@ LB_TAG_UNUSED
@ LB_TAG_FORWARD
@ LB_TAG_MEMORY
@ LB_TAG_BOARD_CONFIG
@ LB_TAG_GPIO
@ LB_TAG_VERSION
@ LB_TAG_MAINBOARD
@ LB_TAG_WIFI_CALIBRATION
#define LB_TAG_CONSOLE_EHCI
#define ACTIVE_HIGH
void lb_ramoops(struct lb_header *header)
#define CHECKSUM_PCBIOS
#define printk(level,...)
Definition: stdlib.h:16
void __weak lb_spi_flash(struct lb_header *header)
__weak uint32_t ram_code(void)
struct lb_record * lb_new_record(struct lb_header *header)
static void lb_mmc_info(struct lb_header *header)
void lb_add_serial(struct lb_serial *new_serial, void *data)
void lb_string_platform_blob_version(struct lb_header *header)
Definition: util.c:193
void lb_add_console(uint16_t consoletype, void *data)
static void lb_strings(struct lb_header *header)
static void lb_record_version_timestamp(struct lb_header *header)
__weak uint64_t fw_config_get(void)
fw_config_get() - Provide firmware configuration value.
static void lb_boot_media_params(struct lb_header *header)
static struct lb_forward * lb_forward(struct lb_header *header, struct lb_header *next_header)
void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table, size_t count)
static struct lb_memory * lb_memory(struct lb_header *header)
static struct lb_mainboard * lb_mainboard(struct lb_header *header)
__weak uint32_t board_id(void)
board_id() - Get the board version
static uintptr_t write_coreboot_table(uintptr_t rom_table_end)
static void lb_framebuffer(struct lb_header *header)
void * write_tables(void)
static void add_cbmem_pointers(struct lb_header *header)
static unsigned long lb_table_fini(struct lb_header *head)
static struct lb_header * lb_table_init(unsigned long addr)
__weak uint32_t sku_id(void)
static void lb_add_acpi_rsdp(struct lb_header *head)
size_t write_coreboot_forwarding_table(uintptr_t entry, uintptr_t target)
static struct lb_board_config * lb_board_config(struct lb_header *header)
void __weak lb_board(struct lb_header *header)
static void lb_gpios(struct lb_header *header)
static struct lb_record * lb_first_record(struct lb_header *header)
static struct lb_record * lb_last_record(struct lb_header *header)
void lb_smmstorev2(struct lb_header *header)
Definition: ramstage.c:14
@ CONFIG
Definition: dsi_common.h:201
uint64_t get_fmap_flash_offset(void)
Definition: fmap.c:27
#define UNDEFINED_FW_CONFIG
Definition: fw_config.h:11
int fill_lb_framebuffer(struct lb_framebuffer *framebuffer)
Definition: edid_fill_fb.c:169
void lb_table_add_vbnv_cmos(struct lb_header *header)
Definition: vbnv_cmos.c:90
void fill_lb_gpios(struct lb_gpios *gpios)
Definition: chromeos.c:9
#define PRIx64
Definition: inttypes.h:37
unsigned long compute_ip_checksum(const void *addr, unsigned long length)
unsigned int serial
Definition: edid.c:52
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
static const struct pad_config gpio_table[]
Definition: gpio.h:24
enum board_config config
Definition: memory.c:448
void uart_fill_lb(void *data)
Definition: pl011.c:38
void lb_tpm_ppi(struct lb_header *header)
Definition: ppi.c:707
static size_t region_device_sz(const struct region_device *rdev)
Definition: region.h:132
static size_t region_device_offset(const struct region_device *rdev)
Definition: region.h:137
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
#define NULL
Definition: stddef.h:19
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
unsigned long uintptr_t
Definition: stdint.h:21
unsigned long long uint64_t
Definition: stdint.h:17
signed int int32_t
Definition: stdint.h:13
unsigned char uint8_t
Definition: stdint.h:8
size_t strlen(const char *src)
Definition: string.c:42
Definition: acpi.h:82
struct region_device rdev
Definition: cbfs.h:167
uint32_t range_end
uint32_t range_start
struct fw_config - Firmware configuration field and option.
Definition: fw_config.h:20
lb_uint64_t fw_config
lb_uint64_t boot_media_size
lb_uint64_t cbmem_addr
uint16_t type
uint32_t tag
uint32_t size
lb_uint64_t forward
uint8_t bits_per_pixel
lb_uint64_t physical_address
uint32_t x_resolution
uint32_t y_resolution
uint32_t polarity
uint8_t name[GPIO_MAX_NAME_LENGTH]
uint32_t port
uint32_t value
struct lb_gpio gpios[0]
uint32_t size
uint32_t count
uint32_t header_checksum
uint32_t table_checksum
uint32_t table_bytes
uint32_t table_entries
uint8_t part_number_idx
uint8_t strings[0]
uint8_t vendor_idx
uint32_t size
uint32_t tag
int32_t early_cmd1_status
uint32_t tag
uint32_t size
uint32_t uart_pci_addr
uint32_t input_hertz
uint32_t regwidth
uint32_t type
uint32_t baud
uint32_t baseaddr
uint8_t string[0]
uint32_t size
uint32_t tag
uint32_t timestamp
const char mainboard_vendor[]
Definition: version.c:26
const char coreboot_version[]
Definition: version.c:29
const char mainboard_part_number[]
Definition: version.c:27
const unsigned int coreboot_version_timestamp
Definition: version.c:32
const char coreboot_extra_version[]
Definition: version.c:30
const char coreboot_compile_time[]
Definition: version.c:36
const char coreboot_build[]
Definition: version.c:31
#define height
#define count