![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <console/console.h>
#include <crc_byte.h>
#include <delay.h>
#include <device/pci_ops.h>
#include <device/smbus_host.h>
#include <soc/intel/common/block/smbus/smbuslib.h>
#include <types.h>
#include "eeprom.h"
Go to the source code of this file.
Macros | |
#define | I2C_ADDR_EEPROM 0x57 |
Functions | |
int | check_signature (const size_t offset, const uint64_t signature) |
static bool | get_board_settings_from_eeprom (struct eeprom_board_settings *board_cfg) |
struct eeprom_board_settings * | get_board_settings (void) |
struct eeprom_bmc_settings * | get_bmc_settings (void) |
uint8_t | get_bmc_hsi (void) |
bool | eeprom_read_buffer (void *blob, size_t read_offset, size_t size) |
void | report_eeprom_error (const size_t off) |
static bool | eeprom_write_byte (const uint8_t data, const uint16_t write_offset) |
bool | write_board_settings (const struct eeprom_board_layout *new_layout) |
Definition at line 20 of file eeprom.c.
References ARRAY_SIZE, BIOS_DEBUG, eeprom_read_buffer(), offset, and printk.
Referenced by mainboard_early(), mainboard_memory_init_params(), and mainboard_silicon_init_params().
Definition at line 103 of file eeprom.c.
References BIOS_SPEW, do_smbus_process_call(), HOSTC, I2C_ADDR_EEPROM, I2C_EN, PCH_DEV_SMBUS, pci_read_config32(), pci_write_config32(), printk, SMBUS_IO_BASE, and swab16.
Referenced by check_signature(), get_bmc_settings(), get_board_settings_from_eeprom(), smbios_mainboard_serial_number(), smbios_system_serial_number(), and write_board_settings().
Definition at line 144 of file eeprom.c.
References BIOS_SPEW, buffer, do_smbus_block_write(), HOSTC, I2C_ADDR_EEPROM, I2C_EN, mdelay(), PCH_DEV_SMBUS, pci_read_config32(), pci_write_config32(), printk, retry, and SMBUS_IO_BASE.
Referenced by write_board_settings().
Definition at line 91 of file eeprom.c.
References BIOS_DEBUG, get_bmc_settings(), eeprom_bmc_settings::hsi, printk, and s.
Referenced by mainboard_azalia_program_runtime_verbs(), and smbios_mainboard_version().
struct eeprom_bmc_settings* get_bmc_settings | ( | void | ) |
Definition at line 73 of file eeprom.c.
References BIOS_ERR, eeprom_read_buffer(), NULL, offsetof, and printk.
Referenced by get_bmc_hsi(), and mainboard_vbt_filename().
struct eeprom_board_settings* get_board_settings | ( | void | ) |
Definition at line 59 of file eeprom.c.
References board_cfg, get_board_settings_from_eeprom(), and NULL.
Referenced by mainboard_early(), mainboard_final(), mainboard_init(), and mainboard_r0x_configure_alc888().
|
static |
Definition at line 40 of file eeprom.c.
References BIOS_ERR, board_cfg, CRC, crc32_byte(), eeprom_read_buffer(), offsetof, and printk.
Referenced by get_board_settings().
bool write_board_settings | ( | const struct eeprom_board_layout * | new_layout | ) |
Definition at line 183 of file eeprom.c.
References assert, BIOS_DEBUG, BIOS_ERR, eeprom_read_buffer(), eeprom_write_byte(), offsetof, and printk.
Referenced by update_board_layout().