lbtdump.c File Reference

#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"

Include dependency graph for lbtdump.c:

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_headerfind_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_recordnext_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 Documentation

#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))

Definition at line 46 of file lbtdump.c.


Function Documentation

unsigned long compute_checksum ( void *  addr,
unsigned long  length 
)

Definition at line 14 of file lbtdump.c.

References value.

static int count_lb_records ( struct lb_header head  )  [static]

Definition at line 54 of file lbtdump.c.

References for_each_lbrec.

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.

Here is the call graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 312 of file lbtdump.c.

References addr, find_lb_table(), print_lb_table(), and printf.

Here is the call graph for this function:

static struct lb_record* next_record ( struct lb_record rec  )  [static, read]

Definition at line 269 of file lbtdump.c.

References lb_record::size.

void nop_print ( struct lb_record rec,
unsigned long  addr 
)

Definition at line 104 of file lbtdump.c.

void pretty_print_number ( FILE *  stream,
uint64_t  num 
)

Definition at line 109 of file lbtdump.c.

References value.

Referenced by print_memory().

Here is the caller graph for this function:

void print_lb_records ( struct lb_record rec,
struct lb_record last,
unsigned long  addr 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_lb_table ( struct lb_header head,
unsigned long  addr 
)

Definition at line 299 of file lbtdump.c.

References last, print_lb_records(), and printf.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_mainboard ( struct lb_record ptr,
unsigned long  addr 
)

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().

Here is the call graph for this function:

void print_option ( struct lb_record ptr,
unsigned long  addr 
)

void print_option_checksum ( struct lb_record ptr,
unsigned long  addr 
)

void print_option_enumeration ( struct lb_record ptr,
unsigned long  addr 
)

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.

Here is the call graph for this function:

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.


Variable Documentation

struct { ... } lb_types[]

Referenced by print_lb_records().

void(* print)(struct lb_record *rec, unsigned long addr)

Referenced by print_lb_records().

Definition at line 243 of file lbtdump.c.

static struct type * type_name [read]

Definition at line 244 of file lbtdump.c.

Referenced by cast_expr(), and unary_expr().


Generated on Wed Dec 3 23:29:49 2008 for coreboot by  doxygen 1.5.5