OpenBIC
OpenSource Bridge-IC
plat_fru.c File Reference
#include <string.h>
#include <logging/log.h>
#include <sys/crc.h>
#include "fru.h"
#include "hal_gpio.h"
#include "power_status.h"
#include "plat_fru.h"
#include "plat_gpio.h"
#include "libutil.h"
Include dependency graph for plat_fru.c:

Macros

#define BSD_IMG_SIZE_OFST   40
 
#define MAX_BSD_IMG_SIZE   1024
 

Functions

 LOG_MODULE_REGISTER (plat_fru)
 
void pal_load_fru_config (void)
 
int set_bios_version (EEPROM_ENTRY *entry, uint8_t block_index)
 
int get_bios_version (EEPROM_ENTRY *entry, uint8_t block_index)
 
bool write_bsd_version ()
 
uint32_t read_bsd_version ()
 

Variables

const EEPROM_CFG plat_fru_config []
 
const EEPROM_CFG plat_bios_version_area_config
 
const EEPROM_CFG plat_bsd_area_config
 
const EEPROM_CFG plat_bsd_version_area_config
 

Macro Definition Documentation

◆ BSD_IMG_SIZE_OFST

#define BSD_IMG_SIZE_OFST   40

◆ MAX_BSD_IMG_SIZE

#define MAX_BSD_IMG_SIZE   1024

Function Documentation

◆ get_bios_version()

int get_bios_version ( EEPROM_ENTRY entry,
uint8_t  block_index 
)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_fru  )

◆ pal_load_fru_config()

void pal_load_fru_config ( void  )

◆ read_bsd_version()

uint32_t read_bsd_version ( )
Here is the call graph for this function:

◆ set_bios_version()

int set_bios_version ( EEPROM_ENTRY entry,
uint8_t  block_index 
)
Here is the call graph for this function:

◆ write_bsd_version()

bool write_bsd_version ( )
Here is the call graph for this function:

Variable Documentation

◆ plat_bios_version_area_config

const EEPROM_CFG plat_bios_version_area_config
Initial value:
= {
}
@ MB_FRU_ID
Definition: plat_fru.h:21
#define MB_FRU_ADDR
Definition: plat_fru.h:49
@ FRU_DEV_ACCESS_BYTE
Definition: fru.h:44
@ NV_ATMEL_24C128
Definition: fru.h:27
#define BIOS_FW_VERSION_MAX_SIZE
Definition: plat_fru.h:38
#define MB_FRU_PORT
Definition: plat_fru.h:31
#define BIOS_FW_VERSION_START
Definition: plat_fru.h:37

◆ plat_bsd_area_config

const EEPROM_CFG plat_bsd_area_config
Initial value:
= {
}
#define MAX_BSD_IMG_SIZE
Definition: plat_fru.c:30
#define MB_CPU_FRU_ADDR
Definition: plat_fru.h:39
#define BSD_IMAGE_START
Definition: plat_fru.h:47
#define MB_CPU_FRU_PORT
Definition: plat_fru.h:38

◆ plat_bsd_version_area_config

const EEPROM_CFG plat_bsd_version_area_config
Initial value:
= {
}
#define BSD_VERSION_MAX_SIZE
Definition: plat_fru.h:49
#define BSD_VERSION_START
Definition: plat_fru.h:48

◆ plat_fru_config

const EEPROM_CFG plat_fru_config[]
Initial value:
= {
{
},
{
},
}
#define FRU_SIZE
Definition: eeprom.h:30
#define FRU_START
Definition: eeprom.h:29
#define DPV2_FRU_ADDR
Definition: plat_fru.h:35
#define DPV2_FRU_PORT
Definition: plat_fru.h:34
@ DPV2_FRU_ID
Definition: plat_fru.h:24