-
Notifications
You must be signed in to change notification settings - Fork 102
/
pcidoe.h
101 lines (75 loc) · 2.51 KB
/
pcidoe.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/**
* Copyright Notice:
* Copyright 2021-2024 DMTF. All rights reserved.
* License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
**/
/** @file
* Definitions of Component Measurement and Authentication (CMA) ECN in PCI-SIG.
*
* Definitions of data Object Exchange (DOE) ECN in PCI-SIG.
*
* Definitions of Integrity and data Encryption (IDE) ECN in PCI-SIG.
**/
#ifndef PCI_DOE_BINDING_H
#define PCI_DOE_BINDING_H
#pragma pack(1)
/* DOE header*/
typedef struct {
uint16_t vendor_id;
uint8_t data_object_type;
uint8_t reserved;
/* length of the data object being transferred in number of DW, including the header (2 DW)
* It only includes bit[0~17], bit[18~31] are reserved.
* A value of 00000h indicate 2^18 DW == 2^20 byte.*/
uint32_t length;
/*uint32_t data_object_dw[length];*/
} pci_doe_data_object_header_t;
#define PCI_DOE_VENDOR_ID_PCISIG 0x0001
#define PCI_DOE_DATA_OBJECT_TYPE_DOE_DISCOVERY 0x00
#define PCI_DOE_DATA_OBJECT_TYPE_SPDM 0x01
#define PCI_DOE_DATA_OBJECT_TYPE_SECURED_SPDM 0x02
#define PCI_DOE_MAX_SIZE_IN_BYTE 0x00100000
#define PCI_DOE_MAX_SIZE_IN_DW 0x00040000
/* DOE Discovery*/
typedef struct {
uint8_t index;
uint8_t version;
uint8_t reserved[2];
} pci_doe_discovery_request_t;
typedef struct {
uint16_t vendor_id;
uint8_t data_object_type;
uint8_t next_index;
} pci_doe_discovery_response_t;
/* SPDM Vendor Defined Message for PCI DOE*/
/* PCI Protocol definition*/
typedef struct {
uint8_t protocol_id;
} pci_protocol_header_t;
#define PCI_PROTOCOL_ID_IDE_KM 0x00
/* Standard ID and Vendor ID for PCISIG*/
#define SPDM_STANDARD_ID_PCISIG SPDM_REGISTRY_ID_PCISIG
#define SPDM_VENDOR_ID_PCISIG 0x0001
typedef struct {
uint16_t standard_id; /* SPDM_STANDARD_ID_PCISIG*/
uint8_t len;
uint16_t vendor_id; /* SPDM_VENDOR_ID_PCISIG*/
uint16_t payload_length;
pci_protocol_header_t pci_protocol;
} pci_doe_spdm_vendor_defined_header_t;
typedef struct {
spdm_message_header_t spdm_header;
/* param1 == RSVD
* param2 == RSVD */
pci_doe_spdm_vendor_defined_header_t pci_doe_vendor_header;
/* pci_protocol specific content */
} pci_doe_spdm_vendor_defined_request_t;
typedef struct {
spdm_message_header_t spdm_header;
/* param1 == RSVD
* param2 == RSVD*/
pci_doe_spdm_vendor_defined_header_t pci_doe_vendor_header;
/* pci_protocol specific content */
} pci_doe_spdm_vendor_defined_response_t;
#pragma pack()
#endif /* PCI_DOE_BINDING_H */