coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vpd.h File Reference
#include <types.h>
Include dependency graph for vpd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GOOGLE_VPD_2_0_OFFSET   0x600
 

Enumerations

enum  vpd_region { VPD_RO , VPD_RW , VPD_RO_THEN_RW , VPD_RW_THEN_RO }
 

Functions

char * vpd_gets (const char *key, char *buffer, int size, enum vpd_region region)
 
const voidvpd_find (const char *key, int *size, enum vpd_region region)
 
bool vpd_get_bool (const char *key, enum vpd_region region, uint8_t *val)
 
bool vpd_get_int (const char *key, enum vpd_region region, int *val)
 

Macro Definition Documentation

◆ GOOGLE_VPD_2_0_OFFSET

#define GOOGLE_VPD_2_0_OFFSET   0x600

Definition at line 8 of file vpd.h.

Enumeration Type Documentation

◆ vpd_region

enum vpd_region
Enumerator
VPD_RO 
VPD_RW 
VPD_RO_THEN_RW 
VPD_RW_THEN_RO 

Definition at line 10 of file vpd.h.

Function Documentation

◆ vpd_find()

const void* vpd_find ( const char *  key,
int *  size,
enum vpd_region  region 
)

Definition at line 203 of file vpd.c.

References arg, init_vpd_rdevs(), vpd_gets_arg::key, NULL, rw_vpd, strlen(), vpd_find_in(), VPD_RO, VPD_RO_THEN_RW, VPD_RW, and VPD_RW_THEN_RO.

Referenced by vpd_get_bios_version(), vpd_get_bool(), and vpd_gets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vpd_get_bool()

bool vpd_get_bool ( const char *  key,
enum vpd_region  region,
uint8_t val 
)

Definition at line 252 of file vpd.c.

References BIOS_CRIT, vpd_gets_arg::key, printk, val, value, and vpd_find().

Referenced by init_frb2_wdt(), mainboard_config_upd(), mainboard_memory_init_params(), and skip_intel_txt_lockdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vpd_get_int()

bool vpd_get_int ( const char *  key,
enum vpd_region  region,
int *  val 
)

Definition at line 284 of file vpd.c.

References atol(), isdigit(), vpd_gets_arg::key, val, value, and vpd_gets().

Referenced by fw_config_get(), get_console_loglevel(), get_uart_for_console(), init_frb2_wdt(), and mainboard_config_upd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vpd_gets()

char* vpd_gets ( const char *  key,
char *  buffer,
int  size,
enum vpd_region  region 
)

Definition at line 229 of file vpd.c.

References assert, buffer, vpd_gets_arg::key, memcpy(), MIN, NULL, and vpd_find().

Referenced by init_frb2_wdt(), smbios_mainboard_serial_number(), smbios_system_serial_number(), smbios_system_set_uuid(), variant_board_sku(), and vpd_get_int().

Here is the call graph for this function:
Here is the caller graph for this function: