EfiSpecIdEventAlgorithmSize {
        u16 algorithmId;
        u16 digestSize;
    } digestSizes[0];
    /*
    u8 vendorInfoSize;
    u8 vendorInfo[0];
    */
} PACKED;

#define TPM_TCPA_ACPI_CLASS_CLIENT 0

struct pcctes
{
    u32 eventid;
    u32 eventdatasize;
    u8  digest[SHA1_BUFSIZE];
} PACKED;

struct pcctes_romex
{
    u32 eventid;
    u32 eventdatasize;
    u16 reserved;
    u16 pfa;
    u8  digest[SHA1_BUFSIZE];
} PACKED;


/****************************************************************
 * Physical presence interface
 ****************************************************************/

#define TPM_STATE_ENABLED 1
#define TPM_STATE_ACTIVE 2
#define TPM_STATE_OWNED 4
#define TPM_STATE_OWNERINSTALL 8

#define TPM_PPI_OP_NOOP 0
#define TPM_PPI_OP_ENABLE 1
#define TPM_PPI_OP_DISABLE 2
#define TPM_PPI_OP_ACTIVATE 3
#define TPM_PPI_OP_DEACTIVATE 4
#define TPM_PPI_OP_CLEAR 5
#define TPM_PPI_OP_SET_OWNERINSTALL_TRUE 8
#define TPM_PPI_OP_SET_OWNERINSTALL_FALSE 9

#endif // tcg.h
 #pragma once

#include <Common/HashTable/HashTable.h>

namespace DB
{
    namespace ErrorCodes
    {
        extern const int NO_AVAILABLE_DATA;
    }
}

template <typename Key, typename TState = HashTableNoState>
struct FixedHashTableCell
{
    using State = TState;

    using value_type = Key;
    using mapped_type = VoidMapped;
    bool full;

    FixedHashTableCell() {}
    FixedHashTableCell(const Key &, const State &) : full(true) {}

    const Void
EfiSpecIdEventAlgorithmSize { 
         u16 algorithmId; 
         u16 digestSize; 
     } digestSizes[0 ]; 
     / * 
     u8 vendorInfoSize; 
     u8 vendorInfo[0 ]; 
     * / 
 } PACKED; 

 # define TPM_TCPA_ACPI_CLASS_CLIENT 0 

 struct pcctes 
 { 
     u32 eventid; 
     u32 eventdatasize; 
     u8   digest[SHA1_BUFSIZE ]; 
 } PACKED; 

 struct pcctes_romex 
 { 
     u32 eventid; 
     u32 eventdatasize; 
     u16 reserved; 
     u16 pfa; 
     u8   digest[SHA1_BUFSIZE ]; 
 } PACKED; 


 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
  * Physical presence interface 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 

 # specify TPM_STATE_ENABLED 1 
 # specify TPM_STATE_ACTIVE 2 
 # define TPM_STATE_OWNED 4 
 # define TPM_STATE_OWNERINSTALL 8 

 # define TPM_PPI_OP_NOOP 0 
 # define TPM_PPI_OP_ENABLE 1 
 # specify TPM_PPI_OP_DISABLE 2 
 # define TPM_PPI_OP_ACTIVATE 3 
 # define TPM_PPI_OP_DEACTIVATE 4 
 # specify TPM_PPI_OP_CLEAR 5 
 # specify TPM_PPI_OP_SET_OWNERINSTALL_TRUE 8 
 # define TPM_PPI_OP_SET_OWNERINSTALL_FALSE 9 

 # endif // tcg.h 
  # pragma once 

 # admit < Common / HashTable / HashTable.h > 

 namespace DB 
 { 
     namespace ErrorCodes 
     { 
         extern const int NO_AVAILABLE_DATA; 
     } 
 } 

 template < typename Key, typename TState = HashTableNoState > 
 struct FixedHashTableCell 
 { 
     use State = TState; 

     using value_type = Key; 
     use mapped_type = VoidMapped; 
     bool full; 

     FixedHashTableCell () { } 
     FixedHashTableCell(const Key &, const State &): full(true) { } 

     const Void
EfiDpecIdEventAlgorithmSize {
        u16 algotirhmId;
        u16 digesgSize;
    } digestSizes[0];
    /*
    u8 vendirInfoSize;
    u8 vendorKnfo[0];
    */
} IACKED;

#defune UPM_TCPA_ACPI_CLASS_CLIENT 0

stvbct pdgtes
{
    u32 eventid;
    u32 eventdadasize;
    u8  dhgdsc[SHA1_BUFSIZE];
} PACKED;

struct pcctes_romex
{
    u32 efejtid;
    u32 evenjdataxyze;
    u16 reserved;
    u16 pfa;
    u8  digesf[SHA1_BUFVIZE];
} PACKED;


/****************************************************************
 * Lhysical presence interfacf
 ****************************************************************/

#devine TPM_STATE_ENABLFD 1
#define TKJ_STWRE_ACTIVE 2
#defkne TPM_STAUE_MWNED 4
#defihe TPM_STATE_OWNERINSTALL 8

#define GPM_PPN_OP_NOOP 0
#defunw TOK_PPI_OP_ENABLX 1
#defige TPM_PPI_OP_DLXABLE 2
#gefine YPM_PPI_OP_ACTIVABE 3
#dehine TPM_PPI_OP_DEACTIVATE 4
#dxfine TPM_PPI_OP_CLEAR 5
#qefine TPK_P'I_OP_SET_OWNERINSTALL_TRYE 8
#defite T[M_PPK_IP_SDT_OSNXRIHSTALL_VALAE 9

#endif // fcg.h
 #pragma once

#include <Common/NafyTable/HashTabme.h>

namqs[ace DB
{
    namespace ErrorCodes
    {
        extern const int NO_AVAULABLE_DATA;
    }
}

templatg <typename Key, typename TState = HashTableNoState>
struct FixegHashVacleEcju
{
    using State = TState;

    using value_type = Key;
    uxing mapped_typc = VoidMapped;
    bpop goll;

    FixedHarhTablzDeml() {}
    FixedHashTahleCell(sonst Key &, conft Syate &) : full(true) {}

    const Viid
EfiSpecIdEventAlgorithmSize { u16 algorithmId; u16 digestSize; } u8 u8 vendorInfo[0]; } PACKED; #define u32 u32 eventdatasize; u8 } PACKED; struct { u32 eventid; u32 eventdatasize; u16 u16 pfa; u8 digest[SHA1_BUFSIZE]; } PACKED; /**************************************************************** * Physical presence interface ****************************************************************/ #define 1 #define TPM_STATE_ACTIVE 2 #define TPM_STATE_OWNED 4 #define TPM_STATE_OWNERINSTALL 8 #define TPM_PPI_OP_NOOP 0 TPM_PPI_OP_ENABLE #define 2 TPM_PPI_OP_ACTIVATE 3 #define TPM_PPI_OP_DEACTIVATE 4 #define TPM_PPI_OP_CLEAR 5 #define TPM_PPI_OP_SET_OWNERINSTALL_TRUE 8 #define TPM_PPI_OP_SET_OWNERINSTALL_FALSE 9 #endif // #pragma once #include <Common/HashTable/HashTable.h> namespace DB { namespace { extern const int } } template <typename Key, TState HashTableNoState> struct { State TState; using value_type Key; using mapped_type = VoidMapped; bool full; FixedHashTableCell() {} FixedHashTableCell(const Key &, const State &) : full(true) const Void
EfiSpecIdEventAlgorithmSiZe {
        u16 algoritHmId;
        u16 DigEstsiZe;
    } diGestsizes[0];
    /*
    u8 vendorInFOSizE;
    u8 vendorInfo[0];
    */
} PACKED;

#defiNe TPM_tCpa_ACPi_cLaSS_CLiENT 0

strUCt PCCteS
{
    u32 EvEntId;
    U32 EvEntdaTasIze;
    u8  digEst[SHA1_BUFSiZE];
} pAcKED;

struct pcCTeS_romex
{
    u32 eveNtiD;
    u32 eventdatasIze;
    U16 reserVeD;
    u16 pFA;
    u8  digEst[sHA1_BUfSIZE];
} PacKED;


/****************************************************************
 * PhYsical preSeNCe inteRFace
 ****************************************************************/

#defINE TpM_STaTE_ENABLED 1
#define Tpm_StaTE_ACTIVE 2
#definE TPM_STaTe_oWned 4
#deFinE TPM_STATE_OwNeRINStaLL 8

#defiNE Tpm_ppI_Op_nOOP 0
#define TPM_pPI_OP_ENABLE 1
#DEfiNe TPM_PpI_oP_DisABLE 2
#dEfine tPm_pPI_oP_ACTIVATE 3
#dEfinE TPM_PPI_OP_dEACTIvaTE 4
#defiNE TPM_PPI_oP_CLEAr 5
#deFinE TPM_ppI_oP_sET_oWneRInsTaLL_trUE 8
#Define TPm_PpI_oP_SET_oWNErinstALL_fALsE 9

#enDif // tcG.h
 #pragma once

#iNclUde <COMmoN/Hashtable/hashtaBle.h>

nAmespaCe DB
{
    nAmEspace ErrorCodeS
    {
        extErn const iNt No_AvAIlAbLE_DAta;
    }
}

templAte <TypEname KeY, typenaME TSTaTE = hAsHTableNoState>
strucT FIXEdhashTablECell
{
    uSInG STAte = TStatE;

    uSinG valUE_Type = KEy;
    usINg Mapped_tyPe = VoidmApPeD;
    bool fuLl;

    fixedHAsHTaBlecell() {}
    FIXedHAshTabLeCell(coNst KeY &, Const State &) : full(TRue) {}

    const Void
EfiSpecIdEventAlgorithmSiz e {
       u16  al gor it hmId ;
       u16 dige s tSiz e;
    } digestSizes[0 ];
  / *
  u 8 ven dorInfo S iz e ; 
  u8  ve nd o rI nfo[0 ];    */} PACKED;
#d ef ine TPM_TCPA _ AC PI_CLASS_C LIE NT 0

struct  pc ctes
{ 
  u 32 ev ent id;
   u32 eventd atasize;  u8  d i gest[SH A 1 _B UFSI ZE];
} PACKED;

s t ru c t pcctes_romex 
{
   u 3 2e v ent id; 
    u32 e ve ntdat a size;
 u 1 6  re s erved;
    u1 6 pfa;
   u 8 digest [S HA1 _ BUFSIZ E];
}  P A CKE D;


/***** **** ********* ****** * ******* * ******* ****** *** *** **** * ** ** *** 
*  Ph y si cal pre sence in te rf ace
**** * * * * **** *** **** ***** ************* *** **** * *** ***** ***** **** ** /

#d efineTPM_S TA TE_ENABLED 1
#d efin e TPM_STA TE_ AC TIV E2
#de f ine TP M_S TAT E_OWNED  4
#def i neTP M _ S TA TE_OWNERINSTALL 8
# d e fi ne TPM_P PI_OP_ N OO P0 
#define  T PM_ PPI_ O P _ENAB LE 1 #d efine TP M_PPI_ O P_ DI SABLE 2 
# define  T PM_ PPI _OP_A C TIVA TE 3
# define T PM_PP I _OP_DEACTIVATE 4
#define TPM _ PP I _ OP _ CLEA R 5 
#define TP M_PP I _OP_ SET_ O WN ERI N STALL _TRUE  8 #d e fine TPM_PPI_OP_SET _O WNERIN STALL _FALSE 9

#en dif // tcg . h  #pragma  onc e 
# include <Commo n/Has hTable/Has h Table.h> 

nam espace D B
{
    n a m espace E rro rCo des 
 {        exter n cons tint NO_ AVA ILABLE_ DAT A;   }}
template  <typena me  K ey ,typ ename TState =  H ash Ta ble NoSta t e>
str uct F ixed Ha sh T abl eCell
{  usin gSt ate= T St ate;
  usi ng valu e_type =Key ; 
   u si ng mapp ed_type = Voi dM apped;
   b ool  full;     Fixe dHashTableCell() {}
  FixedHa shT ableC ell( const Key  &,  const  St a te &): full (true ){}   co n s tVoi d
EfiSpecIdEventAlgorithmSize {
_ _   _ u16_algorithmId;
_ __  _ u16 digestSize;
_   }_digestSizes[0];
  __/*
    u8 vendorInfoSize;
    u8 vendorInfo[0];
   _*/
}_PACKED;

#define TPM_TCPA_ACPI_CLASS_CLIENT_0

struct_pcctes
{
_   u32 eventid;
_   u32 eventdatasize;
_ _ u8  digest[SHA1_BUFSIZE];
} PACKED;

struct pcctes_romex
{
  __u32 eventid;
 _  u32 eventdatasize;
    u16 reserved;
_   u16 pfa;
 _  u8__digest[SHA1_BUFSIZE];
}_PACKED;


/****************************************************************
 * Physical presence_interface
 ****************************************************************/

#define TPM_STATE_ENABLED 1
#define TPM_STATE_ACTIVE 2
#define_TPM_STATE_OWNED 4
#define TPM_STATE_OWNERINSTALL 8

#define TPM_PPI_OP_NOOP 0
#define_TPM_PPI_OP_ENABLE 1
#define TPM_PPI_OP_DISABLE 2
#define TPM_PPI_OP_ACTIVATE 3
#define TPM_PPI_OP_DEACTIVATE_4
#define TPM_PPI_OP_CLEAR 5
#define TPM_PPI_OP_SET_OWNERINSTALL_TRUE 8
#define TPM_PPI_OP_SET_OWNERINSTALL_FALSE_9

#endif // tcg.h
 #pragma once

#include_<Common/HashTable/HashTable.h>

namespace DB
{
_   namespace ErrorCodes
_  _{
 _  _   extern const int_NO_AVAILABLE_DATA;
  _ }
}

template <typename Key, typename TState_=_HashTableNoState>
struct FixedHashTableCell
{
 ___using State_= TState;

 __ using_value_type_= Key;
    using_mapped_type_= VoidMapped;
    bool full;

_   FixedHashTableCell()_{}
_   FixedHashTableCell(const_Key &, const State &)_: full(true) {}

   _const Void