xref: /openbmc/libpldm/src/control-internal.h (revision 869c287aa64e5156523f27070c355ffa09c2fc92)
1 #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>
10 
11 #ifndef PLDM_CONTROL_MAX_VERSION_TYPES
12 #define PLDM_CONTROL_MAX_VERSION_TYPES 6
13 #endif
14 
15 struct 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 
28 struct pldm_control {
29 	struct pldm_type_versions types[PLDM_CONTROL_MAX_VERSION_TYPES];
30 };
31