Changeset 104923 in vbox for trunk/include/iprt/formats
- Timestamp:
- Jun 14, 2024 3:15:25 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/tpm.h
r104918 r104923 52 52 /** TPM interface object handle. */ 53 53 typedef TPMHANDLE TPMIDHOBJECT; 54 55 /** A TPM boolean value (TPMI_YES_NO). */ 56 typedef uint8_t TPMYESNO; 57 /** A No aka False value for TPMYESNO. */ 58 #define TPMYESNO_NO 0 59 /** A Yes aka True value for TPMYESNO. */ 60 #define TPMYESNO_YES 1 61 62 /** A TPM capability value (TPM_CAP). */ 63 typedef uint32_t TPMCAP; 64 65 66 /** 67 * TPM sized buffer. 68 */ 69 #pragma pack(1) 70 typedef struct TPMBUF 71 { 72 /** Size of the buffer in bytes - can be 0. */ 73 uint16_t u16Size; 74 /** Buffer area. */ 75 uint8_t abBuf[RT_FLEXIBLE_ARRAY_NESTED]; 76 } TPMBUF; 77 #pragma pack() 78 /** Pointer to a TPM buffer. */ 79 typedef TPMBUF *PTPMBUF; 80 /** Pointer to a const TPM buffer. */ 81 typedef const TPMBUF *PCTPMBUF; 82 54 83 55 84 … … 73 102 /** Pointer to a const TPM request header. */ 74 103 typedef const TPMREQHDR *PCTPMREQHDR; 104 105 106 /** 107 * TPM response header (everything big endian). 108 */ 109 #pragma pack(1) 110 typedef struct TPMRESPHDR 111 { 112 /** The tag for this request. */ 113 uint16_t u16Tag; 114 /** Size of the response in bytes. */ 115 uint32_t cbResp; 116 /** The error code for the response. */ 117 uint32_t u32ErrCode; 118 } TPMRESPHDR; 119 #pragma pack() 120 AssertCompileSize(TPMRESPHDR, 2 + 4 + 4); 121 /** Pointer to a TPM response header. */ 122 typedef TPMRESPHDR *PTPMRESPHDR; 123 /** Pointer to a const TPM response header. */ 124 typedef const TPMRESPHDR *PCTPMRESPHDR; 75 125 76 126 … … 507 557 /** Pointer to a const TPM2_CC_GET_CAPABILITY request. */ 508 558 typedef const TPM2REQGETCAPABILITY *PCTPM2REQGETCAPABILITY; 559 560 /** 561 * TPM2_CC_GET_CAPABILITY response. 562 */ 563 #pragma pack(1) 564 typedef struct TPM2RESPGETCAPABILITY 565 { 566 /** Request header. */ 567 TPMREQHDR Hdr; 568 /** The capability group to query. */ 569 TPMYESNO fMoreData; 570 /** The capability being returned (part of TPMS_CAPABILITY_DATA). */ 571 TPMCAP u32Cap; 572 /** Capability data. */ 573 uint8_t abCap[RT_FLEXIBLE_ARRAY_NESTED]; 574 } TPM2RESPGETCAPABILITY; 575 #pragma pack() 576 /** Pointer to a TPM2_CC_GET_CAPABILITY request. */ 577 typedef TPM2RESPGETCAPABILITY *PTPM2RESPGETCAPABILITY; 578 /** Pointer to a const TPM2_CC_GET_CAPABILITY request. */ 579 typedef const TPM2RESPGETCAPABILITY *PCTPM2RESPGETCAPABILITY; 509 580 /** @} */ 510 581 … … 531 602 532 603 533 /** 534 * TPM response header (everything big endian). 535 */ 536 #pragma pack(1) 537 typedef struct TPMRESPHDR 538 { 539 /** The tag for this request. */ 540 uint16_t u16Tag; 541 /** Size of the response in bytes. */ 542 uint32_t cbResp; 543 /** The error code for the response. */ 544 uint32_t u32ErrCode; 545 } TPMRESPHDR; 546 #pragma pack() 547 AssertCompileSize(TPMRESPHDR, 2 + 4 + 4); 548 /** Pointer to a TPM response header. */ 549 typedef TPMRESPHDR *PTPMRESPHDR; 550 /** Pointer to a const TPM response header. */ 551 typedef const TPMRESPHDR *PCTPMRESPHDR; 604 /** @name Defines related to TPM2_CC_GET_RANDOM. 605 * @{ */ 606 /** 607 * TPM2_CC_GET_RANDOM request. 608 */ 609 #pragma pack(1) 610 typedef struct TPM2REQGETRANDOM 611 { 612 /** Request header. */ 613 TPMREQHDR Hdr; 614 /** The number of random bytes requested. */ 615 uint16_t u16RandomBytes; 616 } TPM2REQGETRANDOM; 617 #pragma pack() 618 /** Pointer to a TPM2_CC_GET_RANDOM request. */ 619 typedef TPM2REQGETRANDOM *PTPM2REQGETRANDOM; 620 /** Pointer to a const TPM2_CC_GET_RANDOM request. */ 621 typedef const TPM2REQGETRANDOM *PCTPM2REQGETRANDOM; 622 623 /** 624 * TPM2_CC_GET_RANDOM response. 625 */ 626 #pragma pack(1) 627 typedef struct TPM2RESPGETRANDOM 628 { 629 /** Request header. */ 630 TPMRESPHDR Hdr; 631 /** The buffer holding the response data. */ 632 TPMBUF Buf; 633 } TPM2RESPGETRANDOM; 634 #pragma pack() 635 /** Pointer to a TPM2_CC_GET_RANDOM response. */ 636 typedef TPM2RESPGETRANDOM *PTPM2RESPGETRANDOM; 637 /** Pointer to a const TPM2_CC_GET_RANDOM response. */ 638 typedef const TPM2RESPGETRANDOM *PCTPM2RESPGETRANDOM; 639 /** @} */ 552 640 553 641
Note:
See TracChangeset
for help on using the changeset viewer.