mb/prodrive/hermes/eeprom: Add function to read HSI from EEPROM
Will be used to determine the board revision. Change-Id: I41e4c6ad83e23c9d79e6abab3f38ad46bd3bec06 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50788 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
b67f385b69
commit
e75f1807e1
|
@ -88,6 +88,16 @@ struct eeprom_bmc_settings *get_bmc_settings(void)
|
||||||
return &bmc_cfg;
|
return &bmc_cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t get_bmc_hsi(void)
|
||||||
|
{
|
||||||
|
uint8_t hsi = 0;
|
||||||
|
struct eeprom_bmc_settings *s = get_bmc_settings();
|
||||||
|
if (s)
|
||||||
|
hsi = s->hsi;
|
||||||
|
printk(BIOS_DEBUG, "CFG EEPROM: HSI 0x%x\n", hsi);
|
||||||
|
|
||||||
|
return hsi;
|
||||||
|
}
|
||||||
|
|
||||||
/* Read data from offset and write it to offset in UPD */
|
/* Read data from offset and write it to offset in UPD */
|
||||||
bool read_write_config(void *blob, size_t read_offset, size_t write_offset, size_t size)
|
bool read_write_config(void *blob, size_t read_offset, size_t write_offset, size_t size)
|
||||||
|
|
|
@ -86,6 +86,7 @@ bool read_write_config(void *blob, size_t read_offset, size_t write_offset, size
|
||||||
int check_signature(const size_t offset, const uint64_t signature);
|
int check_signature(const size_t offset, const uint64_t signature);
|
||||||
struct eeprom_board_settings *get_board_settings(void);
|
struct eeprom_board_settings *get_board_settings(void);
|
||||||
struct eeprom_bmc_settings *get_bmc_settings(void);
|
struct eeprom_bmc_settings *get_bmc_settings(void);
|
||||||
|
uint8_t get_bmc_hsi(void);
|
||||||
void report_eeprom_error(const size_t off);
|
void report_eeprom_error(const size_t off);
|
||||||
bool write_board_settings(const struct eeprom_board_layout *new_layout);
|
bool write_board_settings(const struct eeprom_board_layout *new_layout);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue