OpenBIC
OpenSource Bridge-IC
pldm_firmware_update.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
17#ifndef _PLDM_FIRMWARE_UPDATE_H_
18#define _PLDM_FIRMWARE_UPDATE_H_
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include "pldm.h"
25#include "plat_def.h"
26#include "hal_i2c.h"
27
28#ifndef MAX_FWUPDATE_RSP_BUF_SIZE
29#define MAX_FWUPDATE_RSP_BUF_SIZE 256
30#endif
31#define MAX_IMAGE_MALLOC_SIZE (1024 * 64)
32#define RETIMER_IMAGE_PACKAGE_SIZE 64
33
34#define KEYWORD_VR_ISL69259 "isl69259"
35#define KEYWORD_VR_XDPE12284C "xdpe12284c"
36#define KEYWORD_VR_MP2856 "mp2856"
37#define KEYWORD_VR_MP2857 "mp2857"
38#define KEYWORD_VR_MP2971 "mp2971"
39#define KEYWORD_VR_MP2988 "mp2988"
40#define KEYWORD_VR_XDPE15284 "xdpe15284"
41#define KEYWORD_VR_MP2985 "mp2985"
42#define KEYWORD_VR_RAA229620 "raa229620"
43#define KEYWORD_VR_RAA229621 "raa229621"
44#define KEYWORD_VR_MPQ8746 "mpq8746"
45#define KEYWORD_VR_MP2898 "mp2898"
46#define KEYWORD_VR_MP2894 "mp2894"
47#define KEYWORD_VR_TPS53685 "tps53685"
48#define KEYWORD_VR_TPS536C5 "tps536c5"
49#define KEYWORD_VR_TDA38741 "tda38741"
50#define KEYWORD_VR_ISL69260 "isl69260"
51#define KEYWORD_VR_MP29816A "mp29816a"
52#define KEYWORD_VR_RAA228249 "raa228249"
53
54#ifndef KEYWORD_CPLD_LATTICE
55#define KEYWORD_CPLD_LATTICE "LCMXO3-9400C"
56#endif
57
58#define KEYWORD_RETIMER_PT5161L "pt5161l"
59#define KEYWORD_RETIMER_PT4080L "pt4080l"
60#define RETIMER_PT5161L_FW_VER_LEN 4
61#define KEYWORD_RETIMER_DS160PT801 "ds160pt801"
62
63static const char hex_to_ascii[] = { '0', '1', '2', '3', '4', '5', '6', '7',
64 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
65
66#define PLDM_COMMON_ERR_STR 'E', 'R', 'R', 'O', 'R', ':'
67#define PLDM_COMMON_ERR_CODE 0
68#define PLDM_CREATE_ERR_STR_ARRAY(code) \
69 { \
70 PLDM_COMMON_ERR_STR, hex_to_ascii[code] \
71 }
72
73#define CHECK_PLDM_FW_UPDATE_RESULT_WITH_RETURN(component_id, offset, length, val, ret_val) \
74 if (val != 0) { \
75 LOG_ERR("Component id: 0x%x firmware update fail, status: %d, offset: 0x%x, length: 0x%x", \
76 component_id, val, offset, length); \
77 return ret_val; \
78 }
79
84 /* inventory commands */
90
91 /* update commands */
103};
104
130
141};
142
149};
150
162};
163
171 STATE_AUX_NOT_IN_UPDATE, //fd is in IDLE/LC/RX state
172};
173
177enum {
194};
195
204
210 /* Other values that are not currently used, and will be defined if they are
211 used in the future. */
212};
213
219 /* Other values that are not currently used, and will be defined if they are
220 used in the future. */
221};
222
232 /* Other values that are not currently used, and will be defined if they are
233 used in the future. */
234};
235
239};
240
246};
247
269
281
291};
292
297 /* Common defined (0x00 ~ 0x0B) */
300
301 /* Vendor defined (0xD0 ~ 0xEF) */
303};
304
317};
318
325
326// typedef uint8_t (*pldm_fwupdate_func)(uint16_t comp_id, void *mctp_p, void *ext_params);
327typedef uint8_t (*pldm_fwupdate_func)(void *fw_update_param);
328typedef uint8_t (*pldm_act_func)(void *arg);
329typedef uint8_t (*pldm_apply_work)(void *arg);
330typedef bool (*pldm_get_fw_version_fn)(void *info_p, uint8_t *buf, uint8_t *len);
331typedef struct pldm_fw_update_param {
332 uint16_t comp_id;
334 uint8_t *data;
335 uint32_t data_ofs;
336 uint32_t data_len;
337 uint32_t next_ofs;
338 uint32_t next_len;
340 uint8_t bus; //i2c/jtag
341 uint8_t addr; //i2c
343
344typedef struct pldm_fw_update_info {
345 bool enable;
362extern uint8_t comp_config_count;
363
365 uint32_t image_size;
367};
369
375 uint16_t num_of_comp;
377 uint16_t pkg_data_len;
380} __attribute__((packed));
381
389} __attribute__((packed));
390
402} __attribute__((packed));
403
409 uint8_t comp_resp;
411} __attribute__((packed));
412
425} __attribute__((packed));
426
436} __attribute__((packed));
437
442 uint32_t offset;
443 uint32_t length;
444} __attribute__((packed));
445
451} __attribute__((packed));
452
458 uint16_t estimated;
459} __attribute__((packed));
460
466 uint8_t cur_state;
467 uint8_t pre_state;
468 uint8_t aux_state;
471 uint8_t reason_code;
473} __attribute__((packed));
474
482} __attribute__((packed));
483
491
497} __attribute__((packed));
498
501} __attribute__((packed));
502
504 uint8_t applyResult;
506} __attribute__((packed));
507
515} __attribute__((packed));
516
523 uint8_t descriptor_data[1];
524} __attribute__((packed));
525
531 uint8_t descriptor_data[1];
532} __attribute__((packed));
533
538} __attribute__((packed));
539
542 union {
543 struct {
544 uint8_t fail_recovery : 1;
545 uint8_t fail_retry : 1;
547 uint8_t partial_update : 1;
549 /* Bit [31:8] reserved */
550 uint8_t : 8;
551 uint16_t : 16;
552 };
554 };
555 uint16_t comp_count;
560} __attribute__((packed));
561
576} __attribute__((packed));
577
578/* Table 15 - QueryDownstreamDevices command format
579 * defined in DSP0267 1.1.0
580 */
590 /* Bit [31:3] reserved */
591 uint16_t : 13;
592 uint16_t : 16;
594} __attribute__((packed));
595
599} __attribute__((packed));
600
607} __attribute__((packed));
608
613} __attribute__((packed));
614
618} __attribute__((packed));
619
623} __attribute__((packed));
624
629 union {
630 struct {
631 uint8_t fail_recovery : 1;
632 uint8_t fail_retry : 1;
634 uint8_t : 1; // reserved
637 /* Bit [31:9] reserved */
638 uint8_t : 7;
639 uint16_t : 16;
640 };
642 };
644} __attribute__((packed));
645
646uint8_t pldm_fw_update_handler_query(uint8_t code, void **ret_fn);
647uint16_t pldm_fw_update_read(void *mctp_p, enum pldm_firmware_update_commands cmd, uint8_t *req,
648 uint16_t req_len, uint8_t *rbuf, uint16_t rbuf_len, void *ext_params);
649uint8_t pldm_bic_update(void *fw_update_param);
650uint8_t pldm_vr_update(void *fw_update_param);
651uint8_t pldm_cpld_update(void *fw_update_param);
652uint8_t pldm_retimer_update(void *fw_update_param);
653uint8_t pldm_retimer_recovery(void *fw_update_param);
654uint8_t fw_recovery_eeprom(I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf,
655 uint8_t flag);
656uint8_t pldm_bic_activate(void *arg);
657
658uint8_t plat_pldm_query_device_identifiers(const uint8_t *buf, uint16_t len, uint8_t *resp,
659 uint16_t *resp_len);
660uint8_t plat_pldm_query_downstream_devices(const uint8_t *buf, uint16_t len, uint8_t *resp,
661 uint16_t *resp_len);
662uint8_t plat_pldm_query_downstream_identifiers(const uint8_t *buf, uint16_t len, uint8_t *resp,
663 uint16_t *resp_len);
664
665int get_descriptor_type_length(uint16_t type);
667int get_device_descriptor_total_length(struct pldm_descriptor_string *table, uint8_t table_count);
669 uint8_t *fill_length, uint16_t current_length);
670
671#ifdef __cplusplus
672}
673#endif
674
675#endif /* _PLDM_FIRMWARE_UPDATE_H_ */
uint8_t cmd
Definition: isl69259.c:1
uint8_t data[]
Definition: isl69259.c:2
uint8_t type
Definition: pldm_base.h:0
struct pldm_fw_update_param pldm_fw_update_param_t
pldm_firmware_update_transfer_operation_flag
Definition: pldm_firmware_update.h:236
@ PLDM_FW_UPDATE_GET_NEXT_PART
Definition: pldm_firmware_update.h:237
@ PLDM_FW_UPDATE_GET_FIRST_PART
Definition: pldm_firmware_update.h:238
uint8_t fill_descriptor_into_buf(struct pldm_descriptor_string *descriptor, uint8_t *buf, uint8_t *fill_length, uint16_t current_length)
Definition: pldm_firmware_update.c:1618
enum pldm_self_contained_activation_req __attribute__
pldm_firmware_update_verify_result_values
Definition: pldm_firmware_update.h:217
@ PLDM_FW_UPDATE_VERIFY_SUCCESS
Definition: pldm_firmware_update.h:218
pldm_firmware_update_common_error_codes
Definition: pldm_firmware_update.h:199
@ PLDM_FW_UPDATE_FD_ABORT
Definition: pldm_firmware_update.h:200
@ PLDM_FW_UPDATE_TIME_OUT
Definition: pldm_firmware_update.h:201
@ PLDM_FW_UPDATE_GENERIC_ERROR
Definition: pldm_firmware_update.h:202
uint8_t(* pldm_apply_work)(void *arg)
Definition: pldm_firmware_update.h:329
uint8_t(* pldm_act_func)(void *arg)
Definition: pldm_firmware_update.h:328
pldm_firmware_update_apply_result_values
Definition: pldm_firmware_update.h:226
@ PLDM_FW_UPDATE_APPLY_SUCCESS_HAS_MODIFY_ACTIVATE_METHOD
Definition: pldm_firmware_update.h:228
@ PLDM_FW_UPDATE_APPLY_TIMEOUT_OCCURRED
Definition: pldm_firmware_update.h:230
@ PLDM_FW_UPDATE_APPLY_GENERIC_ERROR_OCCURRED
Definition: pldm_firmware_update.h:231
@ PLDM_FW_UPDATE_APPLY_FAIL_WITH_MEMORY_WRITE_ISSUE
Definition: pldm_firmware_update.h:229
@ PLDM_FW_UPDATE_APPLY_SUCCESS
Definition: pldm_firmware_update.h:227
uint8_t(* pldm_fwupdate_func)(void *fw_update_param)
Definition: pldm_firmware_update.h:327
pldm_firmware_update_commands
Definition: pldm_firmware_update.h:83
@ PLDM_FW_UPDATE_CMD_CODE_UPDATE_COMPONENT
Definition: pldm_firmware_update.h:94
@ PLDM_FW_UPDATE_CMD_CODE_CANCEL_UPDATE
Definition: pldm_firmware_update.h:102
@ PLDM_FW_UPDATE_CMD_CODE_CANCEL_UPDATE_COMPONENT
Definition: pldm_firmware_update.h:101
@ PLDM_FW_UPDATE_CMD_CODE_QUERY_DOWNSTREAM_DEVICES
Definition: pldm_firmware_update.h:87
@ PLDM_FW_UPDATE_CMD_CODE_REQUEST_FIRMWARE_DATA
Definition: pldm_firmware_update.h:95
@ PLDM_FW_UPDATE_CMD_CODE_GET_STATUS
Definition: pldm_firmware_update.h:100
@ PLDM_FW_UPDATE_CMD_CODE_GET_FIRMWARE_PARAMETERS
Definition: pldm_firmware_update.h:86
@ PLDM_FW_UPDATE_CMD_CODE_REQUEST_UPDATE
Definition: pldm_firmware_update.h:92
@ PLDM_FW_UPDATE_CMD_CODE_ACTIVE_FIRMWARE
Definition: pldm_firmware_update.h:99
@ PLDM_FW_UPDATE_CMD_CODE_GET_DOWNSTREAM_FW_PARAMETERS
Definition: pldm_firmware_update.h:89
@ PLDM_FW_UPDATE_CMD_CODE_QUERY_DOWNSTREAM_IDENTIFIERS
Definition: pldm_firmware_update.h:88
@ PLDM_FW_UPDATE_CMD_CODE_QUERY_DEVICE_IDENTIFIERS
Definition: pldm_firmware_update.h:85
@ PLDM_FW_UPDATE_CMD_CODE_VERIFY_COMPLETE
Definition: pldm_firmware_update.h:97
@ PLDM_FW_UPDATE_CMD_CODE_APPLY_COMPLETE
Definition: pldm_firmware_update.h:98
@ PLDM_FW_UPDATE_CMD_CODE_PASS_COMPONENT_TABLE
Definition: pldm_firmware_update.h:93
@ PLDM_FW_UPDATE_CMD_CODE_TRANSFER_COMPLETE
Definition: pldm_firmware_update.h:96
pldm_fw_update_info_t * comp_config
Definition: pldm_firmware_update.c:55
uint8_t pldm_retimer_update(void *fw_update_param)
Definition: pldm_firmware_update.c:328
pldm_component_classification_values
Definition: pldm_firmware_update.h:252
@ PLDM_COMP_OTHER
Definition: pldm_firmware_update.h:254
@ PLDM_COMP_FIRMWARE_OR_BIOS
Definition: pldm_firmware_update.h:259
@ PLDM_COMP_MIDDLEWARE
Definition: pldm_firmware_update.h:262
@ PLDM_COMP_DOWNSTREAM_DEVICE
Definition: pldm_firmware_update.h:267
@ PLDM_COMP_SOFTWARE_BUNDLE
Definition: pldm_firmware_update.h:266
@ PLDM_COMP_DIAGNOSTIC_SOFTWARE
Definition: pldm_firmware_update.h:260
@ PLDM_COMP_SUPPORT_OR_SERVICEPACK
Definition: pldm_firmware_update.h:265
@ PLDM_COMP_DRIVER
Definition: pldm_firmware_update.h:255
@ PLDM_COMP_INSTRUMENTATION
Definition: pldm_firmware_update.h:258
@ PLDM_COMP_UNKNOWN
Definition: pldm_firmware_update.h:253
@ PLDM_COMP_BIOS_OR_FCODE
Definition: pldm_firmware_update.h:264
@ PLDM_COMP_FIRMWARE
Definition: pldm_firmware_update.h:263
@ PLDM_COMP_CONFIGURATION_SOFTWARE
Definition: pldm_firmware_update.h:256
@ PLDM_COMP_APPLICATION_SOFTWARE
Definition: pldm_firmware_update.h:257
@ PLDM_COMP_OPERATING_SYSTEM
Definition: pldm_firmware_update.h:261
pldm_firmware_update_transfer_result_values
Definition: pldm_firmware_update.h:208
@ PLDM_FW_UPDATE_TRANSFER_SUCCESS
Definition: pldm_firmware_update.h:209
comp_act_mdthod
Definition: pldm_firmware_update.h:308
@ COMP_ACT_AC_PWR_CYCLE
Definition: pldm_firmware_update.h:314
@ COMP_ACT_DC_PWR_CYCLE
Definition: pldm_firmware_update.h:313
@ COMP_ACT_SELF
Definition: pldm_firmware_update.h:310
@ COMP_ACT_SYS_REBOOT
Definition: pldm_firmware_update.h:312
@ COMP_ACT_SUPP_PEND_IMAGE
Definition: pldm_firmware_update.h:315
@ COMP_ACT_AUTO
Definition: pldm_firmware_update.h:309
@ COMP_ACT_MED_RESET
Definition: pldm_firmware_update.h:311
@ COMP_ACT_SUPP_PEND_COMP_IMG_SET
Definition: pldm_firmware_update.h:316
int get_device_descriptor_total_length(struct pldm_descriptor_string *table, uint8_t table_count)
Definition: pldm_firmware_update.c:116
uint8_t pldm_bic_update(void *fw_update_param)
Definition: pldm_firmware_update.c:130
enum fd_update_interface fd_update_interface_t
@ COMP_CLASS_TYPE_DRIVER
Definition: pldm_firmware_update.h:180
@ COMP_CLASS_TYPE_OS
Definition: pldm_firmware_update.h:186
@ COMP_CLASS_TYPE_SW_BUNDLE
Definition: pldm_firmware_update.h:191
@ COMP_CLASS_TYPE_DIAG_SW
Definition: pldm_firmware_update.h:185
@ COMP_CLASS_TYPE_UNKNOWN
Definition: pldm_firmware_update.h:178
@ COMP_CLASS_TYPE_MW
Definition: pldm_firmware_update.h:187
@ COMP_CLASS_TYPE_MAX
Definition: pldm_firmware_update.h:193
@ COMP_CLASS_TYPE_FW_BIOS
Definition: pldm_firmware_update.h:184
@ COMP_CLASS_TYPE_OTHER
Definition: pldm_firmware_update.h:179
@ COMP_CLASS_TYPE_INSTR
Definition: pldm_firmware_update.h:183
@ COMP_CLASS_TYPE_CFG_SW
Definition: pldm_firmware_update.h:181
@ COMP_CLASS_TYPE_APP_SW
Definition: pldm_firmware_update.h:182
@ COMP_CLASS_TYPE_BIOS_FC
Definition: pldm_firmware_update.h:189
@ COMP_CLASS_TYPE_DOWNSTREAM
Definition: pldm_firmware_update.h:192
@ COMP_CLASS_TYPE_FW
Definition: pldm_firmware_update.h:188
@ COMP_CLASS_TYPE_SP_SV_P
Definition: pldm_firmware_update.h:190
uint8_t plat_pldm_query_downstream_identifiers(const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
Definition: pldm_firmware_update.c:1564
uint8_t plat_pldm_query_downstream_devices(const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
Definition: pldm_firmware_update.c:1549
pldm_firmware_update_completion_codes
Definition: pldm_firmware_update.h:108
@ PLDM_FW_UPDATE_CC_BUSY_IN_BACKGROUND
Definition: pldm_firmware_update.h:115
@ PLDM_FW_UPDATE_CC_RETRY_REQUEST_UPDATE
Definition: pldm_firmware_update.h:123
@ PLDM_FW_UPDATE_CC_SELF_CONTAINED_ACTIVATION_NOT_PERMITTED
Definition: pldm_firmware_update.h:121
@ PLDM_FW_UPDATE_CC_NOT_IN_UPDATE_MODE
Definition: pldm_firmware_update.h:109
@ PLDM_FW_UPDATE_CC_PACKAGE_DATA_ERROR
Definition: pldm_firmware_update.h:128
@ PLDM_FW_UPDATE_CC_INVALID_TRANSFER_HANDLE
Definition: pldm_firmware_update.h:125
@ PLDM_FW_UPDATE_CC_NO_DEVICE_METADATA
Definition: pldm_firmware_update.h:122
@ PLDM_FW_UPDATE_CC_ACTIVATION_NOT_REQUIRED
Definition: pldm_firmware_update.h:120
@ PLDM_FW_UPDATE_CC_DATA_OUT_OF_RANGE
Definition: pldm_firmware_update.h:111
@ PLDM_FW_UPDATE_CC_COMMAND_NOT_EXPECTED
Definition: pldm_firmware_update.h:117
@ PLDM_FW_UPDATE_CC_INCOMPLETE_UPDATE
Definition: pldm_firmware_update.h:114
@ PLDM_FW_UPDATE_CC_ACTIVATE_PENDING_IMAGE_NOT_PERMITTED
Definition: pldm_firmware_update.h:127
@ PLDM_FW_UPDATE_CC_NO_PACKAGE_DATA
Definition: pldm_firmware_update.h:124
@ PLDM_FW_UPDATE_CC_RETRY_REQUEST_FW_DATA
Definition: pldm_firmware_update.h:118
@ PLDM_FW_UPDATE_CC_UNABLE_TO_INITIATE_UPDATE
Definition: pldm_firmware_update.h:119
@ PLDM_FW_UPDATE_CC_INVALID_TRANSFER_LENGTH
Definition: pldm_firmware_update.h:112
@ PLDM_FW_UPDATE_CC_ALREADY_IN_UPDATE_MODE
Definition: pldm_firmware_update.h:110
@ PLDM_FW_UPDATE_CC_CANCEL_PENDING
Definition: pldm_firmware_update.h:116
@ PLDM_FW_UPDATE_CC_INVALID_TRANSFER_OPERATION_FLAG
Definition: pldm_firmware_update.h:126
@ PLDM_FW_UPDATE_CC_INVALID_STATE_FOR_COMMAND
Definition: pldm_firmware_update.h:113
pldm_firmware_update_aux_state
Definition: pldm_firmware_update.h:167
@ STATE_AUX_NOT_IN_UPDATE
Definition: pldm_firmware_update.h:171
@ STATE_AUX_FAILED
Definition: pldm_firmware_update.h:170
@ STATE_AUX_SUCCESS
Definition: pldm_firmware_update.h:169
@ STATE_AUX_INPROGRESS
Definition: pldm_firmware_update.h:168
pldm_firmware_update_transfer_flag
Definition: pldm_firmware_update.h:241
@ PLDM_FW_UPDATE_TRANSFER_END
Definition: pldm_firmware_update.h:244
@ PLDM_FW_UPDATE_TRANSFER_START_AND_END
Definition: pldm_firmware_update.h:245
@ PLDM_FW_UPDATE_TRANSFER_START
Definition: pldm_firmware_update.h:242
@ PLDM_FW_UPDATE_TRANSFER_MIDDLE
Definition: pldm_firmware_update.h:243
pldm_firmware_update_descriptor_types
Descriptor types defined in PLDM firmware update specification DSP0267 Table 7 – Descriptor identifie...
Definition: pldm_firmware_update.h:273
@ PLDM_FWUP_VENDOR_DEFINED
Definition: pldm_firmware_update.h:279
@ PLDM_FWUP_IANA_ENTERPRISE_ID
Definition: pldm_firmware_update.h:275
@ PLDM_PCI_DEVICE_ID
Definition: pldm_firmware_update.h:276
@ PLDM_ASCII_MODEL_NUMBER_LONG_STRING
Definition: pldm_firmware_update.h:277
@ PLDM_PCI_VENDOR_ID
Definition: pldm_firmware_update.h:274
@ PLDM_ASCII_MODEL_NUMBER_SHORT_STRING
Definition: pldm_firmware_update.h:278
pldm_firmware_update_state
Definition: pldm_firmware_update.h:154
@ STATE_ACTIVATE
Definition: pldm_firmware_update.h:161
@ STATE_LEARN_COMP
Definition: pldm_firmware_update.h:156
@ STATE_IDLE
Definition: pldm_firmware_update.h:155
@ STATE_VERIFY
Definition: pldm_firmware_update.h:159
@ STATE_RDY_XFER
Definition: pldm_firmware_update.h:157
@ STATE_DOWNLOAD
Definition: pldm_firmware_update.h:158
@ STATE_APPLY
Definition: pldm_firmware_update.h:160
uint32_t offset
Definition: pldm_firmware_update.h:0
uint8_t pldm_fw_update_handler_query(uint8_t code, void **ret_fn)
Definition: pldm_firmware_update.c:1594
uint8_t pldm_retimer_recovery(void *fw_update_param)
Definition: pldm_firmware_update.c:398
pldm_self_contained_activation_req
Definition: pldm_firmware_update.h:487
@ PLDM_NOT_ACTIVATE_SELF_CONTAINED_COMPONENTS
Definition: pldm_firmware_update.h:488
@ PLDM_ACTIVATE_SELF_CONTAINED_COMPONENTS
Definition: pldm_firmware_update.h:489
uint8_t comp_config_count
Definition: pldm_firmware_update.c:56
pldm_firmware_update_string_type
Definition: pldm_firmware_update.h:134
@ PLDM_COMP_UTF_16LE
Definition: pldm_firmware_update.h:139
@ PLDM_COMP_ASCII
Definition: pldm_firmware_update.h:136
@ PLDM_COMP_UTF_8
Definition: pldm_firmware_update.h:137
@ PLDM_COMP_UTF_16BE
Definition: pldm_firmware_update.h:140
@ PLDM_COMP_UTF_16
Definition: pldm_firmware_update.h:138
@ PLDM_COMP_VER_STR_TYPE_UNKNOWN
Definition: pldm_firmware_update.h:135
comp_rsp_code
Definition: pldm_firmware_update.h:296
@ COMP_RSP_FD_NOT_SUPPORT
Definition: pldm_firmware_update.h:299
@ COMP_RSP_UNKNOWN_ERR
Definition: pldm_firmware_update.h:302
@ COMP_RSP_CAN_UPDATE
Definition: pldm_firmware_update.h:298
uint8_t plat_pldm_query_device_identifiers(const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
Definition: pldm_firmware_update.c:1534
int get_descriptor_type_length(uint16_t type)
Definition: pldm_firmware_update.c:88
int get_device_single_descriptor_length(struct pldm_descriptor_string data)
Definition: pldm_firmware_update.c:106
pldm_firmware_update_descriptor_types_length
Descriptor types length defined in PLDM firmware update specification DSP0267 Table 7 – Descriptor id...
Definition: pldm_firmware_update.h:285
@ PLDM_ASCII_MODEL_NUMBER_SHORT_STRING_LENGTH
Definition: pldm_firmware_update.h:290
@ PLDM_PCI_DEVICE_ID_LENGTH
Definition: pldm_firmware_update.h:288
@ PLDM_ASCII_MODEL_NUMBER_LONG_STRING_LENGTH
Definition: pldm_firmware_update.h:289
@ PLDM_PCI_VENDOR_ID_LENGTH
Definition: pldm_firmware_update.h:286
@ PLDM_FWUP_IANA_ENTERPRISE_ID_LENGTH
Definition: pldm_firmware_update.h:287
uint8_t fw_recovery_eeprom(I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag)
Definition: pldm_firmware_update.c:473
uint8_t pldm_vr_update(void *fw_update_param)
Definition: pldm_firmware_update.c:174
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)
Definition: pldm_firmware_update.c:622
struct pldm_descriptor_string * descriptor
Definition: pldm_firmware_update.h:0
uint8_t pldm_bic_activate(void *arg)
Definition: pldm_firmware_update.c:524
struct pldm_fw_update_info pldm_fw_update_info_t
struct pldm_fw_update_cfg fw_update_cfg
Definition: pldm_firmware_update.c:62
bool(* pldm_get_fw_version_fn)(void *info_p, uint8_t *buf, uint8_t *len)
Definition: pldm_firmware_update.h:330
pldm_firmware_update_support_downstream_devices
Definition: pldm_firmware_update.h:146
@ PLDM_FW_UPDATE_NOT_SUPPORT_DOWNSTREAM_DEVICES
Definition: pldm_firmware_update.h:147
@ PLDM_FW_UPDATE_SUPPORT_DOWNSTREAM_DEVICES
Definition: pldm_firmware_update.h:148
fd_update_interface
Definition: pldm_firmware_update.h:319
@ COMP_UPDATE_VIA_UNKNOWN
Definition: pldm_firmware_update.h:320
@ COMP_UPDATE_VIA_I2C
Definition: pldm_firmware_update.h:321
@ COMP_UPDATE_VIA_JTAG
Definition: pldm_firmware_update.h:323
@ COMP_UPDATE_VIA_SPI
Definition: pldm_firmware_update.h:322
uint8_t pldm_cpld_update(void *fw_update_param)
Definition: pldm_firmware_update.c:295
Definition: hal_i2c.h:163
Definition: pldm_firmware_update.h:562
uint8_t comp_classification_index
Definition: pldm_firmware_update.h:565
uint8_t pending_comp_release_date[8]
Definition: pldm_firmware_update.h:573
uint16_t comp_identifier
Definition: pldm_firmware_update.h:564
uint16_t comp_activation_methods
Definition: pldm_firmware_update.h:574
uint8_t pending_comp_ver_str_type
Definition: pldm_firmware_update.h:571
uint8_t active_comp_release_date[8]
Definition: pldm_firmware_update.h:569
uint32_t pending_comp_comparison_stamp
Definition: pldm_firmware_update.h:570
uint8_t active_comp_ver_str_len
Definition: pldm_firmware_update.h:568
uint32_t capabilities_during_update
Definition: pldm_firmware_update.h:575
uint8_t pending_comp_ver_str_len
Definition: pldm_firmware_update.h:572
uint8_t active_comp_ver_str_type
Definition: pldm_firmware_update.h:567
uint32_t active_comp_comparison_stamp
Definition: pldm_firmware_update.h:566
uint16_t comp_classification
Definition: pldm_firmware_update.h:563
Definition: pldm_firmware_update.h:449
uint8_t selfContainedActivationRequest
Definition: pldm_firmware_update.h:450
Definition: pldm_firmware_update.h:456
uint16_t estimated
Definition: pldm_firmware_update.h:458
uint8_t completion_code
Definition: pldm_firmware_update.h:457
Definition: pldm_firmware_update.h:503
uint8_t applyResult
Definition: pldm_firmware_update.h:504
uint16_t compActivationMethodsModification
Definition: pldm_firmware_update.h:505
Definition: pldm_firmware_update.h:478
uint64_t non_func_comp_bitmap
Definition: pldm_firmware_update.h:481
uint8_t non_func_comp_ind
Definition: pldm_firmware_update.h:480
uint8_t completion_code
Definition: pldm_firmware_update.h:479
Definition: pldm_firmware_update.h:534
uint16_t descriptor_type
Definition: pldm_firmware_update.h:535
char * title_string
Definition: pldm_firmware_update.h:536
char * descriptor_data
Definition: pldm_firmware_update.h:537
Definition: pldm_firmware_update.h:520
uint8_t descriptor_data[1]
Definition: pldm_firmware_update.h:523
uint16_t descriptor_type
Definition: pldm_firmware_update.h:521
uint16_t descriptor_length
Definition: pldm_firmware_update.h:522
Definition: pldm_firmware_update.h:609
uint8_t downstreamdescriptorcount
Definition: pldm_firmware_update.h:611
uint16_t downstreamdeviceindex
Definition: pldm_firmware_update.h:610
uint8_t downstreamdescriptors[0]
Definition: pldm_firmware_update.h:612
Definition: pldm_firmware_update.h:615
struct pldm_descriptor_string * descriptor
Definition: pldm_firmware_update.h:616
uint8_t descriptor_count
Definition: pldm_firmware_update.h:617
Definition: pldm_firmware_update.h:364
uint32_t image_size
Definition: pldm_firmware_update.h:365
uint16_t max_buff_size
Definition: pldm_firmware_update.h:366
Definition: pldm_firmware_update.h:344
bool enable
Definition: pldm_firmware_update.h:345
fd_update_interface_t inf
Definition: pldm_firmware_update.h:352
uint16_t comp_classification
Definition: pldm_firmware_update.h:346
uint16_t comp_identifier
Definition: pldm_firmware_update.h:347
pldm_get_fw_version_fn get_fw_version_fn
Definition: pldm_firmware_update.h:357
pldm_act_func self_act_func
Definition: pldm_firmware_update.h:356
uint16_t activate_method
Definition: pldm_firmware_update.h:353
void * self_apply_work_arg
Definition: pldm_firmware_update.h:355
uint8_t * pending_version_p
Definition: pldm_firmware_update.h:358
pldm_apply_work self_apply_work_func
Definition: pldm_firmware_update.h:354
uint8_t comp_classification_index
Definition: pldm_firmware_update.h:348
pldm_fwupdate_func pos_update_func
Definition: pldm_firmware_update.h:351
pldm_fwupdate_func pre_update_func
Definition: pldm_firmware_update.h:349
char * comp_version_str
Definition: pldm_firmware_update.h:359
pldm_fwupdate_func update_func
Definition: pldm_firmware_update.h:350
Definition: pldm_firmware_update.h:331
uint8_t bus
Definition: pldm_firmware_update.h:340
char * comp_version_str
Definition: pldm_firmware_update.h:333
uint8_t * data
Definition: pldm_firmware_update.h:334
uint8_t addr
Definition: pldm_firmware_update.h:341
fd_update_interface_t inf
Definition: pldm_firmware_update.h:339
uint32_t next_len
Definition: pldm_firmware_update.h:338
uint32_t data_ofs
Definition: pldm_firmware_update.h:335
uint32_t data_len
Definition: pldm_firmware_update.h:336
uint16_t comp_id
Definition: pldm_firmware_update.h:332
uint32_t next_ofs
Definition: pldm_firmware_update.h:337
Definition: pldm_firmware_update.h:620
uint32_t data_transfer_handle
Definition: pldm_firmware_update.h:621
uint8_t transfer_operation_flag
Definition: pldm_firmware_update.h:622
Definition: pldm_firmware_update.h:625
uint32_t next_data_transfer_handle
Definition: pldm_firmware_update.h:627
uint16_t downstream_device_count
Definition: pldm_firmware_update.h:643
uint8_t completion_code
Definition: pldm_firmware_update.h:626
uint8_t update_mode_restrict
Definition: pldm_firmware_update.h:635
uint8_t transfer_flag
Definition: pldm_firmware_update.h:628
uint8_t downgrade_restrictions
Definition: pldm_firmware_update.h:636
uint8_t fail_recovery
Definition: pldm_firmware_update.h:631
uint8_t fail_retry
Definition: pldm_firmware_update.h:632
uint8_t func_during_update
Definition: pldm_firmware_update.h:633
uint32_t fdp_capabilities_during_update
Definition: pldm_firmware_update.h:641
Definition: pldm_firmware_update.h:540
uint16_t comp_count
Definition: pldm_firmware_update.h:555
uint8_t update_mode_restrict
Definition: pldm_firmware_update.h:548
uint8_t fail_recovery
Definition: pldm_firmware_update.h:544
uint8_t active_comp_image_set_ver_str_type
Definition: pldm_firmware_update.h:556
uint8_t completion_code
Definition: pldm_firmware_update.h:541
uint8_t partial_update
Definition: pldm_firmware_update.h:547
uint8_t pending_comp_image_set_ver_str_len
Definition: pldm_firmware_update.h:559
uint8_t pending_comp_image_set_ver_str_type
Definition: pldm_firmware_update.h:558
uint32_t capabilities_during_update
Definition: pldm_firmware_update.h:553
uint8_t active_comp_image_set_ver_str_len
Definition: pldm_firmware_update.h:557
uint8_t func_during_update
Definition: pldm_firmware_update.h:546
uint8_t fail_retry
Definition: pldm_firmware_update.h:545
Definition: pldm_firmware_update.h:464
uint8_t completion_code
Definition: pldm_firmware_update.h:465
uint8_t cur_state
Definition: pldm_firmware_update.h:466
uint32_t update_op_flag_en
Definition: pldm_firmware_update.h:472
uint8_t aux_state
Definition: pldm_firmware_update.h:468
uint8_t pre_state
Definition: pldm_firmware_update.h:467
uint8_t aux_state_status
Definition: pldm_firmware_update.h:469
uint8_t prog_percent
Definition: pldm_firmware_update.h:470
uint8_t reason_code
Definition: pldm_firmware_update.h:471
Definition: pldm_firmware_update.h:394
uint8_t comp_ver_str_type
Definition: pldm_firmware_update.h:400
uint8_t comp_classification_index
Definition: pldm_firmware_update.h:398
uint8_t comp_ver_str_len
Definition: pldm_firmware_update.h:401
uint16_t comp_classification
Definition: pldm_firmware_update.h:396
uint8_t transfer_flag
Definition: pldm_firmware_update.h:395
uint32_t comp_comparison_stamp
Definition: pldm_firmware_update.h:399
uint16_t comp_identifier
Definition: pldm_firmware_update.h:397
Definition: pldm_firmware_update.h:407
uint8_t comp_resp
Definition: pldm_firmware_update.h:409
uint8_t completion_code
Definition: pldm_firmware_update.h:408
uint8_t comp_resp_code
Definition: pldm_firmware_update.h:410
Definition: pldm_firmware_update.h:511
uint8_t descriptor_count
Definition: pldm_firmware_update.h:514
uint32_t device_identifiers_len
Definition: pldm_firmware_update.h:513
uint8_t completion_code
Definition: pldm_firmware_update.h:512
Definition: pldm_firmware_update.h:586
uint8_t support_update_simultaneously
Definition: pldm_firmware_update.h:589
uint8_t dynamically_removed
Definition: pldm_firmware_update.h:588
uint8_t dynamically_attached
Definition: pldm_firmware_update.h:587
Definition: pldm_firmware_update.h:581
uint8_t completion_code
Definition: pldm_firmware_update.h:582
uint16_t max_number_of_downstream_devices
Definition: pldm_firmware_update.h:585
struct pldm_query_downstream_devices_resp::capabilities capabilities
uint16_t number_of_downstream_devices
Definition: pldm_firmware_update.h:584
uint8_t downstream_device_update_supported
Definition: pldm_firmware_update.h:583
Definition: pldm_firmware_update.h:596
uint8_t transferoperationflag
Definition: pldm_firmware_update.h:598
uint32_t datatransferhandle
Definition: pldm_firmware_update.h:597
Definition: pldm_firmware_update.h:601
uint8_t transferflag
Definition: pldm_firmware_update.h:604
uint32_t downstreamdevicelength
Definition: pldm_firmware_update.h:605
uint16_t numbwerofdownstreamdevice
Definition: pldm_firmware_update.h:606
uint32_t nextdatatransferhandle
Definition: pldm_firmware_update.h:603
uint8_t completion_code
Definition: pldm_firmware_update.h:602
Definition: pldm_firmware_update.h:441
uint32_t length
Definition: pldm_firmware_update.h:443
uint32_t offset
Definition: pldm_firmware_update.h:442
Definition: pldm_firmware_update.h:373
uint16_t num_of_comp
Definition: pldm_firmware_update.h:375
uint16_t pkg_data_len
Definition: pldm_firmware_update.h:377
uint8_t max_outstanding_transfer_req
Definition: pldm_firmware_update.h:376
uint32_t max_transfer_size
Definition: pldm_firmware_update.h:374
uint8_t comp_image_set_ver_str_type
Definition: pldm_firmware_update.h:378
uint8_t comp_image_set_ver_str_len
Definition: pldm_firmware_update.h:379
Definition: pldm_firmware_update.h:385
uint16_t fd_meta_data_len
Definition: pldm_firmware_update.h:387
uint8_t fd_will_send_pkg_data
Definition: pldm_firmware_update.h:388
uint8_t completion_code
Definition: pldm_firmware_update.h:386
Definition: pldm_firmware_update.h:495
uint8_t transferResult
Definition: pldm_firmware_update.h:496
Definition: pldm_firmware_update.h:416
uint8_t comp_ver_str_len
Definition: pldm_firmware_update.h:424
uint16_t comp_identifier
Definition: pldm_firmware_update.h:418
uint32_t comp_image_size
Definition: pldm_firmware_update.h:421
uint8_t comp_classification_index
Definition: pldm_firmware_update.h:419
uint16_t comp_classification
Definition: pldm_firmware_update.h:417
uint32_t comp_comparison_stamp
Definition: pldm_firmware_update.h:420
uint8_t comp_ver_str_type
Definition: pldm_firmware_update.h:423
uint32_t update_option_flags
Definition: pldm_firmware_update.h:422
Definition: pldm_firmware_update.h:430
uint8_t comp_compatability_resp
Definition: pldm_firmware_update.h:432
uint16_t time_before_req_fw_data
Definition: pldm_firmware_update.h:435
uint8_t comp_compatability_resp_code
Definition: pldm_firmware_update.h:433
uint32_t update_option_flags_enabled
Definition: pldm_firmware_update.h:434
uint8_t completion_code
Definition: pldm_firmware_update.h:431
Definition: pldm_firmware_update.h:526
uint8_t vendor_define_title_type
Definition: pldm_firmware_update.h:529
uint8_t descriptor_title_length
Definition: pldm_firmware_update.h:530
uint16_t descriptor_type
Definition: pldm_firmware_update.h:527
uint8_t descriptor_data[1]
Definition: pldm_firmware_update.h:531
uint16_t descriptor_length
Definition: pldm_firmware_update.h:528
Definition: pldm_firmware_update.h:499
uint8_t verifyResult
Definition: pldm_firmware_update.h:500