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