VirtualBox

Changeset 104918 in vbox for trunk/include


Ignore:
Timestamp:
Jun 14, 2024 9:01:03 AM (7 months ago)
Author:
vboxsync
Message:

Devices/Trace: Some more decoding for TPM commands, bugref:10701

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/tpm.h

    r104905 r104918  
    55
    66/*
    7  * Copyright (C) 2021-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2021-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    4646#include <iprt/assertcompile.h>
    4747#include <iprt/string.h>
     48
     49
     50/** A TPM generic handle (TPM_HANDLE). */
     51typedef uint32_t TPMHANDLE;
     52/** TPM interface object handle. */
     53typedef TPMHANDLE TPMIDHOBJECT;
    4854
    4955
     
    414420/** @name Defines related to TPM2_CC_GET_CAPABILITY.
    415421 * @{ */
     422#define TPM2_CAP_ALGS                       UINT32_C(0x00000000)
     423#define TPM2_CAP_HANDLES                    UINT32_C(0x00000001)
     424#define TPM2_CAP_COMMANDS                   UINT32_C(0x00000002)
     425#define TPM2_CAP_PP_COMMANDS                UINT32_C(0x00000003)
     426#define TPM2_CAP_AUDIT_COMMANDS             UINT32_C(0x00000004)
     427#define TPM2_CAP_PCRS                       UINT32_C(0x00000005)
     428#define TPM2_CAP_ALGS                       UINT32_C(0x00000000)
    416429/** Return a TPM related property. */
    417 #define TPM2_CAP_TPM_PROPERTIES             UINT32_C(6)
    418 
     430#define TPM2_CAP_TPM_PROPERTIES             UINT32_C(0x00000006)
     431#define TPM2_CAP_PCR_PROPERTIES             UINT32_C(0x00000007)
     432#define TPM2_CAP_ECC_CURVES                 UINT32_C(0x00000008)
     433#define TPM2_CAP_AUTH_POLICIES              UINT32_C(0x00000009)
     434#define TPM2_CAP_ACT                        UINT32_C(0x0000000a)
     435
     436
     437#define TPM2_PT_FAMILY_INDICATOR            UINT32_C(0x00000100)
     438#define TPM2_PT_LEVEL                       UINT32_C(0x00000101)
     439#define TPM2_PT_REVISION                    UINT32_C(0x00000102)
     440#define TPM2_PT_DAY_OF_YEAR                 UINT32_C(0x00000103)
     441#define TPM2_PT_YEAR                        UINT32_C(0x00000104)
     442#define TPM2_PT_MANUFACTURER                UINT32_C(0x00000105)
     443#define TPM2_PT_VENDOR_STRING_1             UINT32_C(0x00000106)
     444#define TPM2_PT_VENDOR_STRING_2             UINT32_C(0x00000107)
     445#define TPM2_PT_VENDOR_STRING_3             UINT32_C(0x00000108)
     446#define TPM2_PT_VENDOR_STRING_4             UINT32_C(0x00000109)
     447#define TPM2_PT_VENDOR_TPM_TYPE             UINT32_C(0x0000010a)
     448#define TPM2_PT_FIRMWARE_VERSION_1          UINT32_C(0x0000010b)
     449#define TPM2_PT_FIRMWARE_VERSION_2          UINT32_C(0x0000010c)
    419450/** Returns the size of the input buffer. */
    420 #define TPM2_PT_INPUT_BUFFER                UINT32_C(0x10d)
     451#define TPM2_PT_INPUT_BUFFER                UINT32_C(0x0000010d)
     452#define TPM2_PT_HR_TRANSIENT_MIN            UINT32_C(0x0000010e)
     453#define TPM2_PT_HR_PERSISTENT_MIN           UINT32_C(0x0000010f)
     454#define TPM2_PT_HR_LOADED_MIN               UINT32_C(0x00000110)
     455#define TPM2_PT_ACTIVE_SESSIONS_MAX         UINT32_C(0x00000111)
     456#define TPM2_PT_PCR_COUNT                   UINT32_C(0x00000112)
     457#define TPM2_PT_PCR_SELECT_MIN              UINT32_C(0x00000113)
     458#define TPM2_PT_CONTEXT_GAP_MAX             UINT32_C(0x00000114)
     459#define TPM2_PT_RESERVED                    UINT32_C(0x00000115)
     460#define TPM2_PT_NV_COUNTERS_MAX             UINT32_C(0x00000116)
     461#define TPM2_PT_NV_INDEX                    UINT32_C(0x00000117)
     462#define TPM2_PT_MEMORY                      UINT32_C(0x00000118)
     463#define TPM2_PT_CLOCK_UPDATE                UINT32_C(0x00000119)
     464#define TPM2_PT_CONTEXT_HASH                UINT32_C(0x0000011a)
     465#define TPM2_PT_CONTEXT_SYM                 UINT32_C(0x0000011b)
     466#define TPM2_PT_CONTEXT_SYM_SIZE            UINT32_C(0x0000011c)
     467#define TPM2_PT_ORDERLY_COUNT               UINT32_C(0x0000011d)
     468#define TPM2_PT_MAX_COMMAND_SIZE            UINT32_C(0x0000011e)
     469#define TPM2_PT_MAX_RESPONSE_SIZE           UINT32_C(0x0000011f)
     470#define TPM2_PT_MAX_DIGEST                  UINT32_C(0x00000120)
     471#define TPM2_PT_MAX_OBJECT_CONTEXT          UINT32_C(0x00000121)
     472#define TPM2_PT_MAX_SESSION_CONTEXT         UINT32_C(0x00000122)
     473#define TPM2_PT_PS_FAMILY_INDICATOR         UINT32_C(0x00000123)
     474#define TPM2_PT_PS_LEVEL                    UINT32_C(0x00000124)
     475#define TPM2_PT_PS_REVISION                 UINT32_C(0x00000125)
     476#define TPM2_PT_PS_DAY_OF_YEAR              UINT32_C(0x00000126)
     477#define TPM2_PT_PS_YEAR                     UINT32_C(0x00000127)
     478#define TPM2_PT_SPLIT_MAX                   UINT32_C(0x00000128)
     479#define TPM2_PT_TOTAL_COMMANDS              UINT32_C(0x00000129)
     480#define TPM2_PT_LIBRARY_COMMANDS            UINT32_C(0x0000012a)
     481#define TPM2_PT_VENDOR_COMMANDS             UINT32_C(0x0000012b)
     482#define TPM2_PT_NV_BUFFER_MAX               UINT32_C(0x0000012c)
     483#define TPM2_PT_MODES                       UINT32_C(0x0000012d)
     484#define TPM2_PT_MAX_CAP_BUFFER              UINT32_C(0x0000012e)
     485#define TPM2_PT_FIRMWARE_SVN                UINT32_C(0x0000012f)
     486#define TPM2_PT_FIRMWARE_MAX_SVN            UINT32_C(0x00000130)
     487
    421488
    422489/**
     
    440507/** Pointer to a const TPM2_CC_GET_CAPABILITY request. */
    441508typedef const TPM2REQGETCAPABILITY *PCTPM2REQGETCAPABILITY;
     509/** @} */
     510
     511
     512/** @name Defines related to TPM2_CC_READ_PUBLIC.
     513 * @{ */
     514/**
     515 * TPM2_CC_READ_PUBLIC request.
     516 */
     517#pragma pack(1)
     518typedef struct TPM2REQREADPUBLIC
     519{
     520    /** Request header. */
     521    TPMREQHDR                   Hdr;
     522    /** The object handle to query. */
     523    TPMIDHOBJECT                hObj;
     524} TPM2REQREADPUBLIC;
     525#pragma pack()
     526/** Pointer to a TPM2_CC_READ_PUBLIC request. */
     527typedef TPM2REQREADPUBLIC *PTPM2REQREADPUBLIC;
     528/** Pointer to a const TPM2_CC_READ_PUBLIC request. */
     529typedef const TPM2REQREADPUBLIC *PCTPM2REQREADPUBLIC;
    442530/** @} */
    443531
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette