blob: f0aafd366a284953d2c221195fe658f5a4735b62 [file] [log] [blame]
Patrick Williams70a47ba2021-09-02 09:53:31 -05001#ifndef PLATFORM_OEM_IBM_H
2#define PLATFORM_OEM_IBM_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include "base.h"
9#include <stddef.h>
10#include <stdint.h>
11
12enum 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 */
21struct 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 */
45int 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 Joseph7f839f92020-09-21 10:20:44 +053056#endif /* PLATFORM_OEM_IBM_H */