1 /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ 2 #ifndef PLATFORM_OEM_IBM_H 3 #define PLATFORM_OEM_IBM_H 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 #include <libpldm/base.h> 10 11 #include <stddef.h> 12 #include <stdint.h> 13 14 enum pldm_event_types_ibm_oem { 15 PLDM_EVENT_TYPE_OEM_EVENT_BIOS_ATTRIBUTE_UPDATE = 0xf0, 16 }; 17 18 /** @struct pldm_bios_attribute_update_event_req 19 * 20 * Structure representing PlatformEventMessage command request data for OEM 21 * event type BIOS attribute update. 22 */ 23 struct pldm_bios_attribute_update_event_req { 24 uint8_t format_version; 25 uint8_t tid; 26 uint8_t event_class; 27 uint8_t num_handles; 28 uint8_t bios_attribute_handles[1]; 29 } __attribute__((packed)); 30 31 /** @brief Encode PlatformEventMessage request data for BIOS attribute update 32 * 33 * @param[in] instance_id - Message's instance id 34 * @param[in] format_version - Version of the event format 35 * @param[in] tid - Terminus ID for the terminus that originated the event 36 * message 37 * @param[in] num_handles - Number of BIOS handles with an update 38 * @param[in] list_of_handles - Pointer to the list of BIOS attribute handles 39 * @param[in] payload_length - Length of request message payload 40 * @param[out] msg - Message will be written to this 41 * 42 * @return pldm_completion_codes 43 * 44 * @note Caller is responsible for memory alloc and dealloc of param 45 * 'msg.payload' 46 */ 47 int encode_bios_attribute_update_event_req(uint8_t instance_id, 48 uint8_t format_version, uint8_t tid, 49 uint8_t num_handles, 50 const uint8_t *list_of_handles, 51 size_t payload_length, 52 struct pldm_msg *msg); 53 54 #ifdef __cplusplus 55 } 56 #endif 57 58 #endif /* PLATFORM_OEM_IBM_H */ 59