|
OpenBIC
OpenSource Bridge-IC
|
#include <string.h>#include <stdio.h>#include <stdlib.h>#include <logging/log.h>#include "util_spi.h"#include "util_sys.h"#include "libutil.h"#include "pldm_firmware_update.h"#include "xdpe12284c.h"#include "isl69259.h"#include "mp2971.h"#include "lattice.h"#include "plat_version.h"#include "xdpe15284.h"#include "pt5161l.h"#include "mp2985.h"#include "raa229621.h"#include "mpq8746.h"#include "mp289x.h"#include "tps53689.h"#include "plat_def.h"#include "ds160pt801.h"#include "tda38741.h"#include "mp2988.h"#include "mp29816a.h"#include "raa228249.h"
Macros | |
| #define | PLDM_FW_UPDATE_STACK_SIZE 4096 |
| #define | UPDATE_THREAD_DELAY_SECOND 1 |
| #define | MIN_FW_UPDATE_BASELINE_TRANS_SIZE 32 |
| #define | PLDM_NO_SUPPORT_PROGRESS_PERCENT 0x65 |
| #define | PLDM_FW_UPDATE_MODE_TIMEOUT 60 |
| #define | UPDATE_REQUEST_DATA_MAX_RETRY_COUNT 3 |
| #define | GET_EEPROM_SLAVE_MASK(offset) (((offset) >> 16) & 0xF) |
| #define | GET_EERPOM_OFFSET(offset) ((offset) & 0xFFFF) |
Functions | |
| LOG_MODULE_DECLARE (pldm) | |
| K_KERNEL_STACK_MEMBER (pldm_fw_update_stack, PLDM_FW_UPDATE_STACK_SIZE) | |
| K_TIMER_DEFINE (update_mode_timer, NULL, NULL) | |
| __weak void | load_pldmupdate_comp_config (void) |
| __weak uint16_t | plat_find_update_info_work (uint16_t comp_id) |
| int | get_descriptor_type_length (uint16_t type) |
| int | get_device_single_descriptor_length (struct pldm_descriptor_string data) |
| int | get_device_descriptor_total_length (struct pldm_descriptor_string *table, uint8_t table_count) |
| uint8_t | pldm_fw_update (void *fw_update_param, const int flash_position) |
| uint8_t | pldm_bic_update (void *fw_update_param) |
| uint8_t | pldm_bios_update (void *fw_update_param) |
| uint8_t | pldm_pcie_switch_update (void *fw_update_param) |
| uint8_t | pldm_vr_update (void *fw_update_param) |
| uint8_t | pldm_cpld_update (void *fw_update_param) |
| uint8_t | pldm_retimer_update (void *fw_update_param) |
| uint8_t | pldm_retimer_recovery (void *fw_update_param) |
| uint8_t | fw_recovery_eeprom (I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag) |
| K_WORK_DELAYABLE_DEFINE (submit_warm_reset_work, submit_bic_warm_reset) | |
| uint8_t | pldm_bic_activate (void *arg) |
| uint16_t | pldm_fw_update_read (void *mctp_p, enum pldm_firmware_update_commands cmd, uint8_t *req, uint16_t req_len, uint8_t *rbuf, uint16_t rbuf_len, void *ext_params) |
| void | req_fw_update_handler (void *mctp_p, void *ext_params, void *arg) |
| __weak uint8_t | plat_pldm_query_device_identifiers (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len) |
| __weak uint8_t | plat_pldm_query_downstream_devices (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len) |
| __weak uint8_t | plat_pldm_query_downstream_identifiers (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len) |
| uint8_t | pldm_fw_update_handler_query (uint8_t code, void **ret_fn) |
| uint8_t | fill_descriptor_into_buf (struct pldm_descriptor_string *descriptor, uint8_t *buf, uint8_t *fill_length, uint16_t current_length) |
| bool | is_update_state_download_phase () |
| bool | is_update_state_idle () |
Variables | |
| pldm_fw_update_info_t * | comp_config = NULL |
| uint8_t | comp_config_count = 0 |
| k_tid_t | fw_update_tid |
| struct k_thread | pldm_fw_update_thread |
| struct pldm_fw_update_cfg | fw_update_cfg |
| #define MIN_FW_UPDATE_BASELINE_TRANS_SIZE 32 |
| #define PLDM_FW_UPDATE_MODE_TIMEOUT 60 |
| #define PLDM_FW_UPDATE_STACK_SIZE 4096 |
| #define PLDM_NO_SUPPORT_PROGRESS_PERCENT 0x65 |
| #define UPDATE_REQUEST_DATA_MAX_RETRY_COUNT 3 |
| #define UPDATE_THREAD_DELAY_SECOND 1 |
| uint8_t fill_descriptor_into_buf | ( | struct pldm_descriptor_string * | descriptor, |
| uint8_t * | buf, | ||
| uint8_t * | fill_length, | ||
| uint16_t | current_length | ||
| ) |

| uint8_t fw_recovery_eeprom | ( | I2C_MSG * | msg, |
| uint32_t | offset, | ||
| uint16_t | msg_len, | ||
| uint8_t * | msg_buf, | ||
| uint8_t | flag | ||
| ) |

| int get_descriptor_type_length | ( | uint16_t | type | ) |
| int get_device_descriptor_total_length | ( | struct pldm_descriptor_string * | table, |
| uint8_t | table_count | ||
| ) |

| int get_device_single_descriptor_length | ( | struct pldm_descriptor_string | data | ) |
| bool is_update_state_download_phase | ( | ) |
| bool is_update_state_idle | ( | ) |
| K_KERNEL_STACK_MEMBER | ( | pldm_fw_update_stack | , |
| PLDM_FW_UPDATE_STACK_SIZE | |||
| ) |
| K_TIMER_DEFINE | ( | update_mode_timer | , |
| NULL | , | ||
| NULL | |||
| ) |
| K_WORK_DELAYABLE_DEFINE | ( | submit_warm_reset_work | , |
| submit_bic_warm_reset | |||
| ) |
| __weak void load_pldmupdate_comp_config | ( | void | ) |
| LOG_MODULE_DECLARE | ( | pldm | ) |
| __weak uint16_t plat_find_update_info_work | ( | uint16_t | comp_id | ) |
| __weak uint8_t plat_pldm_query_device_identifiers | ( | const uint8_t * | buf, |
| uint16_t | len, | ||
| uint8_t * | resp, | ||
| uint16_t * | resp_len | ||
| ) |
| __weak uint8_t plat_pldm_query_downstream_devices | ( | const uint8_t * | buf, |
| uint16_t | len, | ||
| uint8_t * | resp, | ||
| uint16_t * | resp_len | ||
| ) |
| __weak uint8_t plat_pldm_query_downstream_identifiers | ( | const uint8_t * | buf, |
| uint16_t | len, | ||
| uint8_t * | resp, | ||
| uint16_t * | resp_len | ||
| ) |
| uint8_t pldm_bic_activate | ( | void * | arg | ) |
| uint8_t pldm_bic_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_bios_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_cpld_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_fw_update | ( | void * | fw_update_param, |
| const int | flash_position | ||
| ) |

| uint8_t pldm_fw_update_handler_query | ( | uint8_t | code, |
| void ** | ret_fn | ||
| ) |

| uint16_t pldm_fw_update_read | ( | void * | mctp_p, |
| enum pldm_firmware_update_commands | cmd, | ||
| uint8_t * | req, | ||
| uint16_t | req_len, | ||
| uint8_t * | rbuf, | ||
| uint16_t | rbuf_len, | ||
| void * | ext_params | ||
| ) |

| uint8_t pldm_pcie_switch_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_retimer_recovery | ( | void * | fw_update_param | ) |

| uint8_t pldm_retimer_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_vr_update | ( | void * | fw_update_param | ) |

| void req_fw_update_handler | ( | void * | mctp_p, |
| void * | ext_params, | ||
| void * | arg | ||
| ) |
| pldm_fw_update_info_t* comp_config = NULL |
| uint8_t comp_config_count = 0 |
| struct pldm_fw_update_cfg fw_update_cfg |
| k_tid_t fw_update_tid |
| struct k_thread pldm_fw_update_thread |