1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef COREBOOT_TABLES_H 4 #define COREBOOT_TABLES_H 5 6 #include <commonlib/coreboot_tables.h> 7 #include <stddef.h> 8 #include <stdint.h> 9 10 /* function prototypes for building the coreboot table */ 11 12 /* 13 * Write forwarding table of target address at entry address returning size 14 * of table written. 15 */ 16 size_t write_coreboot_forwarding_table(uintptr_t entry, uintptr_t target); 17 18 void fill_lb_gpios(struct lb_gpios *gpios); 19 void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table, 20 size_t count); 21 22 enum cb_err fill_lb_serial(struct lb_serial *serial); 23 void lb_add_console(uint16_t consoletype, void *data); 24 25 enum cb_err fill_lb_pcie(struct lb_pcie *pcie); 26 27 /* Define this in mainboard.c to add board-specific table entries. */ 28 void lb_board(struct lb_header *header); 29 30 /* Define this function to fill in the frame buffer returning 0 on success and 31 < 0 on error. */ 32 int fill_lb_framebuffer(struct lb_framebuffer *framebuffer); 33 34 /* Allow arch to add records. */ 35 void lb_arch_add_records(struct lb_header *header); 36 37 /* 38 * Function to retrieve MAC address(es) from the VPD and store them in the 39 * coreboot table. 40 */ 41 void lb_table_add_macs_from_vpd(struct lb_header *header); 42 43 void lb_table_add_serialno_from_vpd(struct lb_header *header); 44 45 struct lb_record *lb_new_record(struct lb_header *header); 46 47 /* Add VBOOT VBNV offsets. */ 48 void lb_table_add_vbnv_cmos(struct lb_header *header); 49 50 #endif /* COREBOOT_TABLES_H */ 51