/* This function initialize TD_EVENT_HDR for EV_NO_ACTION Event Type other than EFI Specification ID event. The behavior is defined by TCG PC Client PFP Spec. Section 9.3.4 EV_NO_ACTION Event Types */
VOID InitNoActionEvent(IN OUT CC_EVENT_HDR *NoActionEvent, IN UINT32 EventSize)
/* This function initialize TD_EVENT_HDR for EV_NO_ACTION Event Type other than EFI Specification ID event. The behavior is defined by TCG PC Client PFP Spec. Section 9.3.4 EV_NO_ACTION Event Types */
VOID InitNoActionEvent(IN OUT CC_EVENT_HDR *NoActionEvent, IN UINT32 EventSize)
{
  UINT32         DigestListCount;
  TPMI_ALG_HASH  HashAlgId;
  UINT8          *DigestBuffer;
  DigestBuffer    = (UINT8 *)NoActionEvent->Digests.digests;
  DigestListCount = 0;
  NoActionEvent->MrIndex   = 0;
  NoActionEvent->EventType = EV_NO_ACTION;
  ZeroMem (&NoActionEvent->Digests, sizeof (NoActionEvent->Digests));
  if ((mTdxDxeData.BsCap.HashAlgorithmBitmap & EFI_CC_BOOT_HASH_ALG_SHA384) != 0) {
    HashAlgId = TPM_ALG_SHA384;
    CopyMem (DigestBuffer, &HashAlgId, sizeof (TPMI_ALG_HASH));
    DigestBuffer += sizeof (TPMI_ALG_HASH) + GetHashSizeFromAlgo (HashAlgId);
    DigestListCount++;
  }
  WriteUnaligned32 ((UINT32 *)&NoActionEvent->Digests.count, DigestListCount);
  WriteUnaligned32 ((UINT32 *)DigestBuffer, EventSize);
}