Skip to content

Commit

Permalink
Cleanup DOE header
Browse files Browse the repository at this point in the history
In particular clarify that the PCIe specification defines the size of a double word as four bytes.

Signed-off-by: Steven Bellock <[email protected]>
  • Loading branch information
steven-bellock committed Sep 9, 2024
1 parent b327ead commit ba789e1
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions include/industry_standard/pcidoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@

#pragma pack(1)


/* DOE header*/

/* DOE header
* The PCIe specification defines the size of a DW as four bytes. */
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)
/* 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.*/
* A value of 00000h indicate 2^18 DW == 2^20 bytes. */
uint32_t length;
/*uint32_t data_object_dw[length];*/
} pci_doe_data_object_header_t;
Expand All @@ -38,11 +37,9 @@ typedef struct {
#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*/
#define PCI_DOE_MAX_SIZE_IN_DW (4 * PCI_DOE_MAX_SIZE_IN_BYTE)

/* DOE Discovery */
typedef struct {
uint8_t index;
uint8_t version;
Expand All @@ -55,20 +52,16 @@ typedef struct {
uint8_t next_index;
} pci_doe_discovery_response_t;

/* SPDM Vendor Defined Message for PCI DOE. */

/* SPDM Vendor Defined Message for PCI DOE*/


/* PCI Protocol definition*/

/* 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*/

/* Standard ID and Vendor ID for PCISIG */
#define SPDM_STANDARD_ID_PCISIG SPDM_REGISTRY_ID_PCISIG
#define SPDM_VENDOR_ID_PCISIG 0x0001

Expand Down

0 comments on commit ba789e1

Please sign in to comment.