#include <stdio.h>#include <stdint.h>#include <stdlib.h>#include <fcntl.h>#include <unistd.h>#include <sys/types.h>#include <string.h>#include <errno.h>#include <sys/mman.h>#include "../../src/include/boot/coreboot_tables.h"

Go to the source code of this file.
Defines | |
| #define | for_each_lbrec(head, rec) |
Functions | |
| void | print_lb_records (struct lb_record *rec, struct lb_record *last, unsigned long addr) |
| unsigned long | compute_checksum (void *addr, unsigned long length) |
| static int | count_lb_records (struct lb_header *head) |
| struct lb_header * | find_lb_table (void *base, unsigned long start, unsigned long end) |
| void | nop_print (struct lb_record *rec, unsigned long addr) |
| void | pretty_print_number (FILE *stream, uint64_t num) |
| void | print_memory (struct lb_record *ptr, unsigned long addr) |
| void | print_mainboard (struct lb_record *ptr, unsigned long addr) |
| void | print_string (struct lb_record *ptr, unsigned long addr) |
| void | print_option_table (struct lb_record *ptr, unsigned long addr) |
| void | print_option (struct lb_record *ptr, unsigned long addr) |
| void | print_option_enumeration (struct lb_record *ptr, unsigned long addr) |
| void | print_option_checksum (struct lb_record *ptr, unsigned long addr) |
| static struct lb_record * | next_record (struct lb_record *rec) |
| void | print_lb_table (struct lb_header *head, unsigned long addr) |
| int | main (int argc, char **argv) |
Variables | |
| struct { | |
| uint32_t type | |
| char * type_name | |
| void(* print )(struct lb_record *rec, unsigned long addr) | |
| } | lb_types [] |
| #define for_each_lbrec | ( | head, | |||
| rec | ) |
Value:
for(rec = (struct lb_record *)(((char *)head) + sizeof(*head)); \ (((char *)rec) < (((char *)head) + sizeof(*head) + head->table_bytes)) && \ (rec->size >= 1) && \ ((((char *)rec) + rec->size) <= (((char *)head) + sizeof(*head) + head->table_bytes)); \ rec = (struct lb_record *)(((char *)rec) + rec->size))
| unsigned long compute_checksum | ( | void * | addr, | |
| unsigned long | length | |||
| ) |
| static int count_lb_records | ( | struct lb_header * | head | ) | [static] |
| struct lb_header* find_lb_table | ( | void * | base, | |
| unsigned long | start, | |||
| unsigned long | end | |||
| ) | [read] |
Definition at line 66 of file lbtdump.c.
References addr, compute_checksum(), count_lb_records(), lb_header::header_bytes, memcmp(), lb_header::signature, lb_header::table_bytes, and lb_header::table_entries.

| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 312 of file lbtdump.c.
References addr, find_lb_table(), print_lb_table(), and printf.

| void nop_print | ( | struct lb_record * | rec, | |
| unsigned long | addr | |||
| ) |
| void pretty_print_number | ( | FILE * | stream, | |
| uint64_t | num | |||
| ) |
Definition at line 109 of file lbtdump.c.
References value.
Referenced by print_memory().

Definition at line 274 of file lbtdump.c.
References lb_types, next_record(), print, printf, lb_record::size, and lb_record::tag.
Referenced by print_lb_table(), and print_option_table().


| void print_lb_table | ( | struct lb_header * | head, | |
| unsigned long | addr | |||
| ) |
| void print_mainboard | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 170 of file lbtdump.c.
References lb_mainboard::part_number_idx, printf, lb_mainboard::size, lb_mainboard::strings, and lb_mainboard::vendor_idx.
| void print_memory | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 142 of file lbtdump.c.
References lb_memory::map, pretty_print_number(), printf, lb_memory_range::size, lb_memory::size, lb_memory_range::start, lb_memory_range::type, and unpack_lb64().

| void print_option | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 215 of file lbtdump.c.
References cmos_entries::bit, cmos_entries::config, cmos_entries::config_id, cmos_entries::length, cmos_entries::name, printf, cmos_entries::size, and cmos_entries::tag.
| void print_option_checksum | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 233 of file lbtdump.c.
References cmos_checksum::location, printf, cmos_checksum::range_end, cmos_checksum::range_start, cmos_checksum::size, cmos_checksum::tag, and cmos_checksum::type.
| void print_option_enumeration | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 224 of file lbtdump.c.
References cmos_enums::config_id, printf, cmos_enums::size, cmos_enums::tag, cmos_enums::text, and cmos_enums::value.
| void print_option_table | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 190 of file lbtdump.c.
References data, hdr, cmos_option_table::header_length, last, print_lb_records(), printf, cmos_option_table::size, and cmos_option_table::tag.

| void print_string | ( | struct lb_record * | ptr, | |
| unsigned long | addr | |||
| ) |
Definition at line 181 of file lbtdump.c.
References printf, lb_string::size, and lb_string::string.
| struct { ... } lb_types[] |
Referenced by print_lb_records().
Referenced by print_lb_records().
static struct type * type_name [read] |
1.5.5