cbtable.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 "flash.h"
#include "coreboot_tables.h"

Include dependency graph for cbtable.c:

Go to the source code of this file.

Defines

#define for_each_lbrec(head, rec)

Functions

static unsigned long compute_checksum (void *addr, unsigned long length)
static int count_lb_records (struct lb_header *head)
static struct lb_headerfind_lb_table (void *base, unsigned long start, unsigned long end)
static void find_mainboard (struct lb_record *ptr, unsigned long addr)
static struct lb_recordnext_record (struct lb_record *rec)
static void search_lb_records (struct lb_record *rec, struct lb_record *last, unsigned long addr)
int coreboot_init (void)

Variables

char * lb_part = NULL
char * lb_vendor = NULL


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 72 of file cbtable.c.

Referenced by count_lb_records().


Function Documentation

static unsigned long compute_checksum ( void *  addr,
unsigned long  length 
) [static]

Definition at line 38 of file cbtable.c.

References value.

Referenced by find_lb_table().

Here is the caller graph for this function:

int coreboot_init ( void   ) 

Definition at line 184 of file cbtable.c.

References addr, fd_mem, find_lb_table(), last, MEM_DEV, printf, printf_debug, and search_lb_records().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static int count_lb_records ( struct lb_header head  )  [static]

Definition at line 79 of file cbtable.c.

References for_each_lbrec.

Referenced by find_lb_table().

Here is the caller graph for this function:

static struct lb_header* find_lb_table ( void *  base,
unsigned long  start,
unsigned long  end 
) [static, read]

Definition at line 92 of file cbtable.c.

References addr, compute_checksum(), count_lb_records(), lb_header::header_bytes, memcmp(), printf_debug, lb_header::signature, lb_header::table_bytes, and lb_header::table_entries.

Referenced by coreboot_init(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void find_mainboard ( struct lb_record ptr,
unsigned long  addr 
) [static]

Definition at line 135 of file cbtable.c.

References lb_part, lb_vendor, lb_mainboard::part_number_idx, printf, lb_mainboard::size, strdup(), lb_mainboard::strings, vendor, and lb_mainboard::vendor_idx.

Referenced by search_lb_records().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 161 of file cbtable.c.

References lb_record::size.

Referenced by print_lb_records(), and search_lb_records().

Here is the caller graph for this function:

static void search_lb_records ( struct lb_record rec,
struct lb_record last,
unsigned long  addr 
) [static]

Definition at line 166 of file cbtable.c.

References find_mainboard(), LB_TAG_MAINBOARD, next_record(), lb_record::size, and lb_record::tag.

Referenced by coreboot_init().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

char* lb_part = NULL

Definition at line 36 of file cbtable.c.

Referenced by find_mainboard(), main(), print_supported_boards(), and show_id().

char * lb_vendor = NULL

Definition at line 36 of file cbtable.c.

Referenced by find_mainboard(), main(), print_supported_boards(), and show_id().


Generated on Mon Dec 29 11:39:19 2008 for coreboot by  doxygen 1.5.5