Changeset 105046 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 27, 2024 9:05:03 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Trace/VBoxTraceLogDecoders.cpp
r104973 r105046 537 537 static void vboxTraceLogDecodeSizedBufU16(PRTTRACELOGDECODERHLP pHlp, PTPMDECODECTX pCtx, const char *pszName) 538 538 { 539 pHlp->pfnStructBldBegin(pHlp, pszName); 539 if (pszName) 540 pHlp->pfnStructBldBegin(pHlp, pszName); 540 541 TPM_DECODE_INIT(); 541 542 TPM_DECODE_U16(u16Size, u16Size); … … 545 546 } 546 547 TPM_DECODE_END(); 547 pHlp->pfnStructBldEnd(pHlp); 548 if (pszName) 549 pHlp->pfnStructBldEnd(pHlp); 548 550 } 549 551 … … 646 648 TPM_DECODE_U32_HEX(hHierarchy, hHierarchy); 647 649 vboxTraceLogDecodeSizedBufU16(pHlp, pCtx, "ContextBlob"); 650 TPM_DECODE_END(); 651 pHlp->pfnStructBldEnd(pHlp); 652 } 653 654 655 static void vboxTraceLogDecode_TPM2B_SENSITIVE_CREATE(PRTTRACELOGDECODERHLP pHlp, PTPMDECODECTX pCtx, const char *pszName) 656 { 657 pHlp->pfnStructBldBegin(pHlp, pszName); 658 TPM_DECODE_INIT(); 659 /** @todo */ 660 vboxTraceLogDecodeSizedBufU16(pHlp, pCtx, NULL /*pszName*/); 661 TPM_DECODE_END(); 662 pHlp->pfnStructBldEnd(pHlp); 663 } 664 665 666 static void vboxTraceLogDecode_TPM2B_TEMPLATE(PRTTRACELOGDECODERHLP pHlp, PTPMDECODECTX pCtx, const char *pszName) 667 { 668 pHlp->pfnStructBldBegin(pHlp, pszName); 669 TPM_DECODE_INIT(); 670 /** @todo */ 671 vboxTraceLogDecodeSizedBufU16(pHlp, pCtx, NULL /*pszName*/); 672 TPM_DECODE_END(); 673 pHlp->pfnStructBldEnd(pHlp); 674 } 675 676 677 static void vboxTraceLogDecode_TPM2B_PRIVATE(PRTTRACELOGDECODERHLP pHlp, PTPMDECODECTX pCtx, const char *pszName) 678 { 679 pHlp->pfnStructBldBegin(pHlp, pszName); 680 TPM_DECODE_INIT(); 681 /** @todo */ 682 vboxTraceLogDecodeSizedBufU16(pHlp, pCtx, NULL /*pszName*/); 683 TPM_DECODE_END(); 684 pHlp->pfnStructBldEnd(pHlp); 685 } 686 687 688 static void vboxTraceLogDecode_TPM2B_PUBLIC(PRTTRACELOGDECODERHLP pHlp, PTPMDECODECTX pCtx, const char *pszName) 689 { 690 pHlp->pfnStructBldBegin(pHlp, pszName); 691 TPM_DECODE_INIT(); 692 /** @todo */ 693 vboxTraceLogDecodeSizedBufU16(pHlp, pCtx, NULL /*pszName*/); 694 TPM_DECODE_END(); 695 pHlp->pfnStructBldEnd(pHlp); 696 } 697 698 699 static void vboxTraceLogDecode_TPM2B_NAME(PRTTRACELOGDECODERHLP pHlp, PTPMDECODECTX pCtx, const char *pszName) 700 { 701 pHlp->pfnStructBldBegin(pHlp, pszName); 702 TPM_DECODE_INIT(); 703 /** @todo */ 704 vboxTraceLogDecodeSizedBufU16(pHlp, pCtx, NULL /*pszName*/); 648 705 TPM_DECODE_END(); 649 706 pHlp->pfnStructBldEnd(pHlp); … … 986 1043 987 1044 1045 static const char *g_apszHandlesClearControlReq[] = 1046 { 1047 "hAuth", 1048 NULL 1049 }; 1050 1051 1052 static DECLCALLBACK(void) vboxTraceLogDecodeEvtTpmDecodeClearControlReq(PRTTRACELOGDECODERHLP pHlp, PTPMSTATE pThis, PTPMDECODECTX pCtx) 1053 { 1054 RT_NOREF(pThis); 1055 1056 TPM_DECODE_INIT(); 1057 TPM_DECODE_BOOL(fDisable, fDisable); 1058 TPM_DECODE_END(); 1059 } 1060 1061 1062 static const char *g_apszHandlesClockSetReq[] = 1063 { 1064 "hAuth", 1065 NULL 1066 }; 1067 1068 1069 static DECLCALLBACK(void) vboxTraceLogDecodeEvtTpmDecodeClockSetReq(PRTTRACELOGDECODERHLP pHlp, PTPMSTATE pThis, PTPMDECODECTX pCtx) 1070 { 1071 RT_NOREF(pThis); 1072 1073 TPM_DECODE_INIT(); 1074 TPM_DECODE_U64(u64NewTime, u64NewTime); 1075 TPM_DECODE_END(); 1076 } 1077 1078 988 1079 static const char *g_apszHandlesHierarchyChangeAuthReq[] = 989 1080 { … … 1000 1091 TPM_DECODE_END(); 1001 1092 } 1093 1094 1095 static const char *g_apszHandlesHierarchyControlReq[] = 1096 { 1097 "hAuth", 1098 NULL 1099 }; 1100 1101 1102 static DECLCALLBACK(void) vboxTraceLogDecodeEvtTpmDecodeHierarchyControlReq(PRTTRACELOGDECODERHLP pHlp, PTPMSTATE pThis, PTPMDECODECTX pCtx) 1103 { 1104 RT_NOREF(pThis); 1105 1106 TPM_DECODE_INIT(); 1107 TPM_DECODE_U32_HEX(hEnable, hEnable); 1108 TPM_DECODE_BOOL( fState, fState); 1109 TPM_DECODE_END(); 1110 } 1111 1112 1113 static const char *g_apszHandlesNvUndefineSpaceReq[] = 1114 { 1115 "hAuth", 1116 "hNvIndex", 1117 NULL 1118 }; 1119 1120 1121 static const char *g_apszHandlesChangeEpsPpsReq[] = 1122 { 1123 "hAuth", 1124 NULL 1125 }; 1002 1126 1003 1127 … … 1140 1264 TPM_DECODE_END(); 1141 1265 } 1266 1267 1268 static const char *g_apszHandlesNvWriteLockReq[] = 1269 { 1270 "hAuth", 1271 "hNvIndex", 1272 NULL 1273 }; 1142 1274 1143 1275 … … 1624 1756 1625 1757 1758 static const char *g_apszHandlesCreateLoadedReq[] = 1759 { 1760 "hParent", 1761 NULL 1762 }; 1763 1764 1765 static const char *g_apszHandlesCreateLoadedResp[] = 1766 { 1767 "hObj", 1768 NULL 1769 }; 1770 1771 1772 static DECLCALLBACK(void) vboxTraceLogDecodeEvtTpmDecodeCreateLoadedReq(PRTTRACELOGDECODERHLP pHlp, PTPMSTATE pThis, PTPMDECODECTX pCtx) 1773 { 1774 RT_NOREF(pThis); 1775 1776 TPM_DECODE_INIT(); 1777 vboxTraceLogDecode_TPM2B_SENSITIVE_CREATE(pHlp, pCtx, "InSensitive"); 1778 TPM_DECODE_END_IF_ERROR(); 1779 vboxTraceLogDecode_TPM2B_TEMPLATE(pHlp, pCtx, "InPublic"); 1780 TPM_DECODE_END_IF_ERROR(); 1781 TPM_DECODE_END(); 1782 } 1783 1784 1785 static DECLCALLBACK(void) vboxTraceLogDecodeEvtTpmDecodeCreateLoadedResp(PRTTRACELOGDECODERHLP pHlp, PTPMSTATE pThis, PTPMDECODECTX pCtx) 1786 { 1787 RT_NOREF(pThis); 1788 1789 TPM_DECODE_INIT(); 1790 vboxTraceLogDecode_TPM2B_PRIVATE(pHlp, pCtx, "OutPrivate"); 1791 TPM_DECODE_END_IF_ERROR(); 1792 vboxTraceLogDecode_TPM2B_PUBLIC(pHlp, pCtx, "OutPublic"); 1793 TPM_DECODE_END_IF_ERROR(); 1794 vboxTraceLogDecode_TPM2B_NAME(pHlp, pCtx, "Name"); 1795 TPM_DECODE_END_IF_ERROR(); 1796 TPM_DECODE_END(); 1797 } 1798 1799 1626 1800 static struct 1627 1801 { … … 1640 1814 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_NV_UNDEFINE_SPACE_SPECIAL), 1641 1815 TPM_CMD_CODE_INIT( TPM2_CC_EVICT_CONTROL, g_apszHandlesEvictControlReq, NULL, vboxTraceLogDecodeEvtTpmDecodeEvictControlReq, NULL), 1642 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_HIERARCHY_CONTROL),1643 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_NV_UNDEFINE_SPACE),1644 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_CHANGE_EPS),1645 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_CHANGE_PPS),1816 TPM_CMD_CODE_INIT( TPM2_CC_HIERARCHY_CONTROL, g_apszHandlesHierarchyControlReq, NULL, vboxTraceLogDecodeEvtTpmDecodeHierarchyControlReq, NULL), 1817 TPM_CMD_CODE_INIT( TPM2_CC_NV_UNDEFINE_SPACE, g_apszHandlesNvUndefineSpaceReq, NULL, NULL, NULL), 1818 TPM_CMD_CODE_INIT( TPM2_CC_CHANGE_EPS, g_apszHandlesChangeEpsPpsReq, NULL, NULL, NULL), 1819 TPM_CMD_CODE_INIT( TPM2_CC_CHANGE_PPS, g_apszHandlesChangeEpsPpsReq, NULL, NULL, NULL), 1646 1820 TPM_CMD_CODE_INIT( TPM2_CC_CLEAR, g_apszHandlesClearReq, NULL, NULL, NULL), 1647 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_CLEAR_CONTROL),1648 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_CLOCK_SET),1821 TPM_CMD_CODE_INIT( TPM2_CC_CLEAR_CONTROL, g_apszHandlesClearControlReq, NULL, vboxTraceLogDecodeEvtTpmDecodeClearControlReq, NULL), 1822 TPM_CMD_CODE_INIT( TPM2_CC_CLOCK_SET, g_apszHandlesClockSetReq, NULL, vboxTraceLogDecodeEvtTpmDecodeClockSetReq, NULL), 1649 1823 TPM_CMD_CODE_INIT( TPM2_CC_HIERARCHY_CHANGE_AUTH, g_apszHandlesHierarchyChangeAuthReq, NULL, vboxTraceLogDecodeEvtTpmDecodeHierarchyChangeAuthReq, NULL), 1650 1824 TPM_CMD_CODE_INIT( TPM2_CC_NV_DEFINE_SPACE, g_apszHandlesNvDefineSpaceReq, NULL, vboxTraceLogDecodeEvtTpmDecodeNvDefineSpaceReq, NULL), … … 1662 1836 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_NV_EXTEND), 1663 1837 TPM_CMD_CODE_INIT( TPM2_CC_NV_WRITE, g_apszHandlesNvWriteReq, NULL, vboxTraceLogDecodeEvtTpmDecodeNvWriteReq, NULL), 1664 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_NV_WRITE_LOCK),1838 TPM_CMD_CODE_INIT( TPM2_CC_NV_WRITE_LOCK, g_apszHandlesNvWriteLockReq, NULL, NULL, NULL), 1665 1839 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_DICTIONARY_ATTACK_LOCK_RESET), 1666 1840 TPM_CMD_CODE_INIT( TPM2_CC_DICTIONARY_ATTACK_PARAMETERS, g_apszHandlesDictionaryAttackParametersReq, NULL, vboxTraceLogDecodeEvtTpmDecodeDictionaryAttackParametersReq, NULL), … … 1747 1921 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_POLICY_NV_WRITTEN), 1748 1922 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_POLICY_TEMPLATE), 1749 TPM_CMD_CODE_INIT _NOT_IMPL(TPM2_CC_CREATE_LOADED),1923 TPM_CMD_CODE_INIT( TPM2_CC_CREATE_LOADED, g_apszHandlesCreateLoadedReq, g_apszHandlesCreateLoadedResp, vboxTraceLogDecodeEvtTpmDecodeCreateLoadedReq, vboxTraceLogDecodeEvtTpmDecodeCreateLoadedResp), 1750 1924 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_POLICY_AUTHORIZE_NV), 1751 1925 TPM_CMD_CODE_INIT_NOT_IMPL(TPM2_CC_ENCRYPT_DECRYPT_2),
Note:
See TracChangeset
for help on using the changeset viewer.