blob: 55c8015b1848a2fd771aebcd468271540da78958 [file] [log] [blame]
Matt Johnstonbde874e2024-11-05 16:03:51 +08001#pragma once
2
3#include <stdint.h>
4#include <stdbool.h>
5#include <string.h>
6
7#include <libpldm/pldm.h>
8#include <libpldm/utils.h>
9#include <compiler.h>
Matt Johnstonbde874e2024-11-05 16:03:51 +080010
11#ifndef PLDM_CONTROL_MAX_VERSION_TYPES
12#define PLDM_CONTROL_MAX_VERSION_TYPES 6
13#endif
14
15struct pldm_type_versions {
16 /* A buffer of ver32_t/uint32_t of version values, followed by crc32 */
17 /* NULL for unused entries */
18 const void *versions;
19 /* Includes the trailing crc32 entry */
20 uint8_t versions_count;
21
22 /* A buffer of 32 entries, for commands 0-0xff */
23 const bitfield8_t *commands;
24
25 uint8_t pldm_type;
26};
27
28struct pldm_control {
29 struct pldm_type_versions types[PLDM_CONTROL_MAX_VERSION_TYPES];
30};