|
OpenBIC
OpenSource Bridge-IC
|
#include <zephyr.h>#include <logging/log.h>#include <shell/shell.h>#include <drivers/flash.h>#include <device.h>#include <soc.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#include <sys/util.h>#include "cmsis_os2.h"#include "util_spi.h"#include "util_sys.h"#include "libutil.h"#include "ipmi.h"#include <crypto/hash.h>#include "plat_def.h"
Macros | |
| #define | FW_UPDATE_RETRY_MAX_COUNT 0 |
| #define | IS25WP256D_ID 0x9D7019 |
| #define | BIOS_MAX_SIZE_BYTES (64 * 1024 * 1024UL) |
Functions | |
| LOG_MODULE_REGISTER (util_spi) | |
| int | ckeck_flash_device_isinit (const struct device *flash_device, uint8_t flash_position) |
| char * | get_flash_device_string_by_index (uint8_t flash_index) |
| int | do_update (const struct device *flash_device, off_t offset, uint8_t *buf, size_t len) |
| uint8_t | fw_update (uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag, uint8_t flash_position) |
| int | read_fw_image (uint32_t offset, uint8_t msg_len, uint8_t *msg_buf, uint8_t flash_position) |
| void | set_default_retry_count (int count) |
| __weak uint8_t | fw_update_cxl (uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, bool sector_end) |
| __weak int | pal_get_bios_flash_position () |
| __weak int | pal_get_prot_flash_position () |
| __weak int | pal_get_pcie_switch_flash_position () |
| __weak bool | pal_switch_bios_spi_mux (int gpio_status) |
| __weak bool | pal_switch_pcie_switch_spi_mux (int gpio_status) |
| int | erase_entire_flash (const struct device *flash_dev) |
| int | cmd_erase_bios (int platform_id) |
Variables | |
| volatile uint8_t | bios_erase_progress = 0 |
| #define BIOS_MAX_SIZE_BYTES (64 * 1024 * 1024UL) |
| #define FW_UPDATE_RETRY_MAX_COUNT 0 |
| #define IS25WP256D_ID 0x9D7019 |
| int ckeck_flash_device_isinit | ( | const struct device * | flash_device, |
| uint8_t | flash_position | ||
| ) |
| int cmd_erase_bios | ( | int | platform_id | ) |

| int do_update | ( | const struct device * | flash_device, |
| off_t | offset, | ||
| uint8_t * | buf, | ||
| size_t | len | ||
| ) |
| int erase_entire_flash | ( | const struct device * | flash_dev | ) |
| uint8_t fw_update | ( | uint32_t | offset, |
| uint16_t | msg_len, | ||
| uint8_t * | msg_buf, | ||
| uint8_t | flag, | ||
| uint8_t | flash_position | ||
| ) |
| __weak uint8_t fw_update_cxl | ( | uint32_t | offset, |
| uint16_t | msg_len, | ||
| uint8_t * | msg_buf, | ||
| bool | sector_end | ||
| ) |
| char * get_flash_device_string_by_index | ( | uint8_t | flash_index | ) |
| LOG_MODULE_REGISTER | ( | util_spi | ) |
| __weak int pal_get_bios_flash_position | ( | ) |
| __weak int pal_get_pcie_switch_flash_position | ( | ) |
| __weak int pal_get_prot_flash_position | ( | ) |
| __weak bool pal_switch_bios_spi_mux | ( | int | gpio_status | ) |
| __weak bool pal_switch_pcie_switch_spi_mux | ( | int | gpio_status | ) |
| int read_fw_image | ( | uint32_t | offset, |
| uint8_t | msg_len, | ||
| uint8_t * | msg_buf, | ||
| uint8_t | flash_position | ||
| ) |
| void set_default_retry_count | ( | int | count | ) |
| volatile uint8_t bios_erase_progress = 0 |
| bool isinit |
| char* name |