From nobody Sun May 19 01:26:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49355+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49355+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571765840; cv=none; d=zoho.com; s=zohoarc; b=V+VH5ZCZqfRt+Dp90gigZzoWQ2ynYh6L0WTygrWrk91kDaG7OwOo/EEs+SDPjH/UgSz8sM72NQtkeccj9PnFNzG/CALHiX3uRCB/hroKfsgHfw8pR6BawwXYTbGW0qKory9Rgb3a7iLzbCQNzxJCxyxWDWCs1TRitfgRLffbke0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571765840; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=TCGmfYXsLjRp5Hj/m7Vrv7qzF4p4qa/O2nqxqNm9Tyk=; b=f1Tt/nVxvb+TUQ/ejl6qM9F9ibSlZMz9YMT2807KhJeQnyITWiX/D7gC29tyuyuGT9rWFqX9z7j8G4Z4RhE0XIBX8p2hgu/aLzBqyL3JUMQ7+wn5MQ0j0BH5AlwjqfTfDCn33I1mDqqg/NH5jl3KmOLncW0RApblRgd8xG981s8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49355+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1571765840618845.091417350958; Tue, 22 Oct 2019 10:37:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 57CwYY1788612x0vQK2MtQtP; Tue, 22 Oct 2019 10:37:20 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web10.684.1571765838571377049 for ; Tue, 22 Oct 2019 10:37:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 10:37:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,217,1569308400"; d="scan'208";a="209764520" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.156]) by orsmga002.jf.intel.com with ESMTP; 22 Oct 2019 10:37:17 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Chao Zhang Subject: [edk2-devel] [Patch v2 1/2] SecurityPkg: Replace EFI_D_* with DEBUG_* Date: Tue, 22 Oct 2019 10:37:15 -0700 Message-Id: <20191022173716.27700-2-michael.d.kinney@intel.com> In-Reply-To: <20191022173716.27700-1-michael.d.kinney@intel.com> References: <20191022173716.27700-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: 6xEY705MifXBm2GkYVNCCfLGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571765840; bh=2pvy4d582XbXtYe3loQmi8j4uwBW/2op6nkbWm4az9s=; h=Cc:Date:From:Reply-To:Subject:To; b=eYoue1SOY36w8/ojtAWq8vKj9XPBV5KgMz5OjGIFVU5NnF2uRZynC9dwgFXFSaRw/Yp ziZiGAcZwmVe7hq2zf/wGgrr4Som+Sd4GXWY4D4nMyHGOEk6isJrKW/k2Zdf0AFihpVu+ 5O4AMD9Jl/KeQFVz5sdU2Xpk3mtMMaclSZk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Update all DEBUG() macros in the SecurityPkg to use DEBUG_ instead of EFI_D_. This is required to pass PatchCheck.py checks. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Michael D Kinney --- SecurityPkg/Hash2DxeCrypto/Driver.c | 2 +- .../Library/AuthVariableLib/AuthService.c | 2 +- .../Library/AuthVariableLib/AuthVariableLib.c | 16 +- .../DxeImageVerificationLib.c | 2 +- .../DxeImageVerificationLib/Measurement.c | 8 +- .../DxeTcg2PhysicalPresenceLib.c | 36 ++-- .../DxeTcgPhysicalPresenceLib.c | 12 +- .../DxeTpm2MeasureBootLib.c | 14 +- .../DxeTpmMeasureBootLib.c | 4 +- SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c | 12 +- .../SmmTcg2PhysicalPresenceLib.c | 18 +- .../Library/Tpm12CommandLib/Tpm12Pcr.c | 2 +- .../Tpm12CommandLib/Tpm12PhysicalPresence.c | 2 +- .../Library/Tpm12DeviceLibDTpm/Tpm12Tis.c | 24 +-- .../Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.c | 4 +- .../Library/Tpm2CommandLib/Tpm2Capability.c | 30 +-- .../Library/Tpm2CommandLib/Tpm2Context.c | 4 +- .../Tpm2CommandLib/Tpm2DictionaryAttack.c | 8 +- .../Tpm2EnhancedAuthorization.c | 16 +- SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c | 2 +- .../Library/Tpm2CommandLib/Tpm2Hierarchy.c | 40 ++-- .../Library/Tpm2CommandLib/Tpm2Integrity.c | 42 ++-- .../Tpm2CommandLib/Tpm2Miscellaneous.c | 4 +- .../Library/Tpm2CommandLib/Tpm2NVStorage.c | 36 ++-- .../Library/Tpm2CommandLib/Tpm2Sequences.c | 26 +-- .../Library/Tpm2CommandLib/Tpm2Session.c | 6 +- .../Library/Tpm2CommandLib/Tpm2Startup.c | 4 +- .../Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 50 ++--- .../Library/Tpm2DeviceLibDTpm/Tpm2Tis.c | 24 +-- .../Tpm2DeviceLibRouterPei.c | 2 +- .../Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c | 4 +- .../Tcg/MemoryOverwriteControl/TcgMor.c | 20 +- .../TcgMorLockSmm.c | 2 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c | 4 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 2 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 6 +- SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 6 +- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 196 +++++++++--------- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 22 +- SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 24 +-- .../Tcg/TcgConfigDxe/TcgConfigDriver.c | 4 +- SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 28 +-- SecurityPkg/Tcg/TcgPei/TcgPei.c | 8 +- SecurityPkg/Tcg/TcgSmm/TcgSmm.c | 18 +- .../SecureBootConfigImpl.c | 24 +-- 45 files changed, 410 insertions(+), 410 deletions(-) diff --git a/SecurityPkg/Hash2DxeCrypto/Driver.c b/SecurityPkg/Hash2DxeCryp= to/Driver.c index 6aa88f8b3b..a6c5a2c0af 100644 --- a/SecurityPkg/Hash2DxeCrypto/Driver.c +++ b/SecurityPkg/Hash2DxeCrypto/Driver.c @@ -142,7 +142,7 @@ Hash2ServiceBindingDestroyChild ( } } if (Instance =3D=3D NULL) { - DEBUG ((EFI_D_ERROR, "Hash2ServiceBindingDestroyChild - Invalid handle= \n")); + DEBUG ((DEBUG_ERROR, "Hash2ServiceBindingDestroyChild - Invalid handle= \n")); return EFI_UNSUPPORTED; } =20 diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPk= g/Library/AuthVariableLib/AuthService.c index 486df55bed..4451be8b65 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -1744,7 +1744,7 @@ CleanCertsFromDb ( AuthVariableInfo.Attributes | EFI_VARIABLE_NON_VOL= ATILE ); CertCleaned =3D TRUE; - DEBUG((EFI_D_INFO, "Recovery!! Cert for Auth Variable %s Guid %g i= s removed for consistency\n", VariableName, &AuthVarGuid)); + DEBUG((DEBUG_INFO, "Recovery!! Cert for Auth Variable %s Guid %g i= s removed for consistency\n", VariableName, &AuthVarGuid)); FreePool(VariableName); break; } diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/Securi= tyPkg/Library/AuthVariableLib/AuthVariableLib.c index e80fadbf05..0cc8fc7b4a 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c @@ -153,9 +153,9 @@ AuthVariableLibInitialize ( =20 Status =3D AuthServiceInternalFindVariable (EFI_PLATFORM_KEY_NAME, &gEfi= GlobalVariableGuid, (VOID **) &Data, &DataSize); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "Variable %s does not exist.\n", EFI_PLATFORM_KEY_= NAME)); + DEBUG ((DEBUG_INFO, "Variable %s does not exist.\n", EFI_PLATFORM_KEY_= NAME)); } else { - DEBUG ((EFI_D_INFO, "Variable %s exists.\n", EFI_PLATFORM_KEY_NAME)); + DEBUG ((DEBUG_INFO, "Variable %s exists.\n", EFI_PLATFORM_KEY_NAME)); } =20 // @@ -238,9 +238,9 @@ AuthVariableLibInitialize ( return Status; } =20 - DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_SETUP_MODE_NAME, mPlatfor= mMode)); - DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_SECURE_BOOT_MODE_NAME, Se= cureBootMode)); - DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_SECURE_BOOT_ENABLE_NAME, = SecureBootEnable)); + DEBUG ((DEBUG_INFO, "Variable %s is %x\n", EFI_SETUP_MODE_NAME, mPlatfor= mMode)); + DEBUG ((DEBUG_INFO, "Variable %s is %x\n", EFI_SECURE_BOOT_MODE_NAME, Se= cureBootMode)); + DEBUG ((DEBUG_INFO, "Variable %s is %x\n", EFI_SECURE_BOOT_ENABLE_NAME, = SecureBootEnable)); =20 // // Initialize "CustomMode" in STANDARD_SECURE_BOOT_MODE state. @@ -257,7 +257,7 @@ AuthVariableLibInitialize ( return Status; } =20 - DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_CUSTOM_MODE_NAME, CustomM= ode)); + DEBUG ((DEBUG_INFO, "Variable %s is %x\n", EFI_CUSTOM_MODE_NAME, CustomM= ode)); =20 // // Check "certdb" variable's existence. @@ -289,7 +289,7 @@ AuthVariableLibInitialize ( // Status =3D CleanCertsFromDb(); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Clean up CertDB fail! Status %x\n", Status)); + DEBUG ((DEBUG_ERROR, "Clean up CertDB fail! Status %x\n", Status)); return Status; } } @@ -347,7 +347,7 @@ AuthVariableLibInitialize ( return Status; } =20 - DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_VENDOR_KEYS_VARIABLE_NAME= , mVendorKeyState)); + DEBUG ((DEBUG_INFO, "Variable %s is %x\n", EFI_VENDOR_KEYS_VARIABLE_NAME= , mVendorKeyState)); =20 AuthVarLibContextOut->StructVersion =3D AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_= VERSION; AuthVarLibContextOut->StructSize =3D sizeof (AUTH_VAR_LIB_CONTEXT_OUT); diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificati= onLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationL= ib.c index fe4cdccedd..67bccba1db 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -1880,7 +1880,7 @@ Done: NameStr =3D ConvertDevicePathToText (File, FALSE, TRUE); AddImageExeInfo (Action, NameStr, File, SignatureList, SignatureListSi= ze); if (NameStr !=3D NULL) { - DEBUG((EFI_D_INFO, "The image doesn't pass verification: %s\n", Name= Str)); + DEBUG((DEBUG_INFO, "The image doesn't pass verification: %s\n", Name= Str)); FreePool(NameStr); } Status =3D EFI_SECURITY_VIOLATION; diff --git a/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c b/Se= curityPkg/Library/DxeImageVerificationLib/Measurement.c index 86d8eb4840..351107785d 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c @@ -253,8 +253,8 @@ MeasureVariable ( VarSize ); =20 - DEBUG ((EFI_D_INFO, "DxeImageVerification: MeasureVariable (Pcr - %x, Ev= entType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_AUTHORITY)); - DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, Ve= ndorGuid)); + DEBUG ((DEBUG_INFO, "DxeImageVerification: MeasureVariable (Pcr - %x, Ev= entType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_AUTHORITY)); + DEBUG ((DEBUG_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, Ve= ndorGuid)); =20 Status =3D TpmMeasureAndLogData ( 7, @@ -295,7 +295,7 @@ SecureBootHook ( } =20 if (IsDataMeasured (VariableName, VendorGuid, Data, DataSize)) { - DEBUG ((EFI_D_ERROR, "MeasureSecureAuthorityVariable - IsDataMeasured\= n")); + DEBUG ((DEBUG_ERROR, "MeasureSecureAuthorityVariable - IsDataMeasured\= n")); return ; } =20 @@ -305,7 +305,7 @@ SecureBootHook ( Data, DataSize ); - DEBUG ((EFI_D_INFO, "MeasureBootPolicyVariable - %r\n", Status)); + DEBUG ((DEBUG_INFO, "MeasureBootPolicyVariable - %r\n", Status)); =20 if (!EFI_ERROR (Status)) { AddDataMeasured (VariableName, VendorGuid, Data, DataSize); diff --git a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2Physical= PresenceLib.c b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2Physi= calPresenceLib.c index 80e2e37bf4..99eac758fa 100644 --- a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenc= eLib.c +++ b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenc= eLib.c @@ -84,15 +84,15 @@ Tpm2CommandClear ( CopyMem (LocalAuthSession.hmac.buffer, PlatformAuth->buffer, PlatformA= uth->size); } =20 - DEBUG ((EFI_D_INFO, "Tpm2ClearControl ... \n")); + DEBUG ((DEBUG_INFO, "Tpm2ClearControl ... \n")); Status =3D Tpm2ClearControl (TPM_RH_PLATFORM, AuthSession, NO); - DEBUG ((EFI_D_INFO, "Tpm2ClearControl - %r\n", Status)); + DEBUG ((DEBUG_INFO, "Tpm2ClearControl - %r\n", Status)); if (EFI_ERROR (Status)) { goto Done; } - DEBUG ((EFI_D_INFO, "Tpm2Clear ... \n")); + DEBUG ((DEBUG_INFO, "Tpm2Clear ... \n")); Status =3D Tpm2Clear (TPM_RH_PLATFORM, AuthSession); - DEBUG ((EFI_D_INFO, "Tpm2Clear - %r\n", Status)); + DEBUG ((DEBUG_INFO, "Tpm2Clear - %r\n", Status)); =20 Done: ZeroMem (&LocalAuthSession.hmac, sizeof(LocalAuthSession.hmac)); @@ -126,7 +126,7 @@ Tpm2CommandChangeEps ( } =20 Status =3D Tpm2ChangeEPS (TPM_RH_PLATFORM, AuthSession); - DEBUG ((EFI_D_INFO, "Tpm2ChangeEPS - %r\n", Status)); + DEBUG ((DEBUG_INFO, "Tpm2ChangeEPS - %r\n", Status)); =20 ZeroMem(&LocalAuthSession.hmac, sizeof(LocalAuthSession.hmac)); return Status; @@ -913,7 +913,7 @@ Tcg2PhysicalPresenceLibProcessRequest ( &gEfiTcg2PhysicalPresenceGuid ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Error when lock variable %s, Status =3D= %r\n", TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE, Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Error when lock variable %s, Status =3D= %r\n", TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE, Status)); ASSERT_EFI_ERROR (Status); } } @@ -922,7 +922,7 @@ Tcg2PhysicalPresenceLibProcessRequest ( // Check S4 resume // if (GetBootModeHob () =3D=3D BOOT_ON_S4_RESUME) { - DEBUG ((EFI_D_INFO, "S4 Resume, Skip TPM PP process!\n")); + DEBUG ((DEBUG_INFO, "S4 Resume, Skip TPM PP process!\n")); return ; } =20 @@ -947,7 +947,7 @@ Tcg2PhysicalPresenceLibProcessRequest ( &PpiFlags ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Set physical presence flag failed, Stat= us =3D %r\n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Set physical presence flag failed, Stat= us =3D %r\n", Status)); return ; } DEBUG((DEBUG_INFO, "[TPM2] Initial physical presence flags value is 0x= %x\n", PpiFlags.PPFlags)); @@ -975,18 +975,18 @@ Tcg2PhysicalPresenceLibProcessRequest ( &TcgPpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Set physical presence variable failed, = Status =3D %r\n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Set physical presence variable failed, = Status =3D %r\n", Status)); return ; } } =20 - DEBUG ((EFI_D_INFO, "[TPM2] Flags=3D%x, PPRequest=3D%x (LastPPRequest=3D= %x)\n", PpiFlags.PPFlags, TcgPpData.PPRequest, TcgPpData.LastPPRequest)); + DEBUG ((DEBUG_INFO, "[TPM2] Flags=3D%x, PPRequest=3D%x (LastPPRequest=3D= %x)\n", PpiFlags.PPFlags, TcgPpData.PPRequest, TcgPpData.LastPPRequest)); =20 // // Execute pending TPM request. // Tcg2ExecutePendingTpmRequest (PlatformAuth, &TcgPpData, &PpiFlags); - DEBUG ((EFI_D_INFO, "[TPM2] PPResponse =3D %x (LastPPRequest=3D%x, Flags= =3D%x)\n", TcgPpData.PPResponse, TcgPpData.LastPPRequest, PpiFlags.PPFlags)= ); + DEBUG ((DEBUG_INFO, "[TPM2] PPResponse =3D %x (LastPPRequest=3D%x, Flags= =3D%x)\n", TcgPpData.PPResponse, TcgPpData.LastPPRequest, PpiFlags.PPFlags)= ); =20 } =20 @@ -1016,7 +1016,7 @@ Tcg2PhysicalPresenceLibNeedUserConfirm( // Check S4 resume // if (GetBootModeHob () =3D=3D BOOT_ON_S4_RESUME) { - DEBUG ((EFI_D_INFO, "S4 Resume, Skip TPM PP process!\n")); + DEBUG ((DEBUG_INFO, "S4 Resume, Skip TPM PP process!\n")); return FALSE; } =20 @@ -1092,7 +1092,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFun= ction ( UINTN DataSize; EFI_TCG2_PHYSICAL_PRESENCE PpData; =20 - DEBUG ((EFI_D_INFO, "[TPM2] ReturnOperationResponseToOsFunction\n")); + DEBUG ((DEBUG_INFO, "[TPM2] ReturnOperationResponseToOsFunction\n")); =20 // // Get the Physical Presence variable @@ -1108,7 +1108,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFun= ction ( if (EFI_ERROR (Status)) { *MostRecentRequest =3D 0; *Response =3D 0; - DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); return TCG_PP_RETURN_TPM_OPERATION_RESPONSE_FAILURE; } =20 @@ -1143,7 +1143,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction ( EFI_TCG2_PHYSICAL_PRESENCE PpData; EFI_TCG2_PHYSICAL_PRESENCE_FLAGS Flags; =20 - DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request =3D %x= , %x\n", OperationRequest, RequestParameter)); + DEBUG ((DEBUG_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request =3D %x= , %x\n", OperationRequest, RequestParameter)); =20 // // Get the Physical Presence variable @@ -1157,7 +1157,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction ( &PpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE; } =20 @@ -1179,7 +1179,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction ( &PpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Set PP variable failure! Status =3D %r\= n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Set PP variable failure! Status =3D %r\= n", Status)); return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE; } } @@ -1217,7 +1217,7 @@ Tcg2PhysicalPresenceLibGetManagementFlags ( EFI_TCG2_PHYSICAL_PRESENCE_FLAGS PpiFlags; UINTN DataSize; =20 - DEBUG ((EFI_D_INFO, "[TPM2] GetManagementFlags\n")); + DEBUG ((DEBUG_INFO, "[TPM2] GetManagementFlags\n")); =20 DataSize =3D sizeof (EFI_TCG2_PHYSICAL_PRESENCE_FLAGS); Status =3D gRT->GetVariable ( diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPr= esenceLib.c b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalP= resenceLib.c index 174172d5d7..a059342fcb 100644 --- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceL= ib.c +++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceL= ib.c @@ -1193,11 +1193,11 @@ TcgPhysicalPresenceLibProcessRequest ( &PpiFlags ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM] Set physical presence flag failed, Statu= s =3D %r\n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Set physical presence flag failed, Statu= s =3D %r\n", Status)); return ; } } - DEBUG ((EFI_D_INFO, "[TPM] PpiFlags =3D %x\n", PpiFlags.PPFlags)); + DEBUG ((DEBUG_INFO, "[TPM] PpiFlags =3D %x\n", PpiFlags.PPFlags)); =20 // // This flags variable controls whether physical presence is required fo= r TPM command. @@ -1211,7 +1211,7 @@ TcgPhysicalPresenceLibProcessRequest ( &gEfiPhysicalPresenceGuid ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM] Error when lock variable %s, Status =3D = %r\n", PHYSICAL_PRESENCE_FLAGS_VARIABLE, Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Error when lock variable %s, Status =3D = %r\n", PHYSICAL_PRESENCE_FLAGS_VARIABLE, Status)); ASSERT_EFI_ERROR (Status); } } @@ -1238,12 +1238,12 @@ TcgPhysicalPresenceLibProcessRequest ( &TcgPpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM] Set physical presence variable failed, S= tatus =3D %r\n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Set physical presence variable failed, S= tatus =3D %r\n", Status)); return; } } =20 - DEBUG ((EFI_D_INFO, "[TPM] Flags=3D%x, PPRequest=3D%x\n", PpiFlags.PPFla= gs, TcgPpData.PPRequest)); + DEBUG ((DEBUG_INFO, "[TPM] Flags=3D%x, PPRequest=3D%x\n", PpiFlags.PPFla= gs, TcgPpData.PPRequest)); =20 if (TcgPpData.PPRequest =3D=3D PHYSICAL_PRESENCE_NO_ACTION) { // @@ -1279,7 +1279,7 @@ TcgPhysicalPresenceLibProcessRequest ( // Execute pending TPM request. // ExecutePendingTpmRequest (TcgProtocol, &TcgPpData, PpiFlags); - DEBUG ((EFI_D_INFO, "[TPM] PPResponse =3D %x\n", TcgPpData.PPResponse)); + DEBUG ((DEBUG_INFO, "[TPM] PPResponse =3D %x\n", TcgPpData.PPResponse)); =20 // // Lock physical presence. diff --git a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLi= b.c b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c index 543635b2e4..919f42c95c 100644 --- a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c +++ b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c @@ -164,7 +164,7 @@ Tcg2MeasureGptTable ( (UINT8 *)PrimaryHeader ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Failed to Read Partition Table Header!\n")); + DEBUG ((DEBUG_ERROR, "Failed to Read Partition Table Header!\n")); FreePool (PrimaryHeader); return EFI_DEVICE_ERROR; } @@ -334,7 +334,7 @@ Tcg2MeasurePeImage ( break; default: DEBUG (( - EFI_D_ERROR, + DEBUG_ERROR, "Tcg2MeasurePeImage: Unknown subsystem type %d", ImageType )); @@ -441,7 +441,7 @@ DxeTpm2MeasureBootHandler ( // Tcg2 protocol is not installed. So, TPM2 is not present. // Don't do any measurement, and directly return EFI_SUCCESS. // - DEBUG ((EFI_D_VERBOSE, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Stat= us)); + DEBUG ((DEBUG_VERBOSE, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Stat= us)); return EFI_SUCCESS; } =20 @@ -454,7 +454,7 @@ DxeTpm2MeasureBootHandler ( // // TPM device doesn't work or activate. // - DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler (%r) - TPMPresentFlag = - %x\n", Status, ProtocolCapability.TPMPresentFlag)); + DEBUG ((DEBUG_ERROR, "DxeTpm2MeasureBootHandler (%r) - TPMPresentFlag = - %x\n", Status, ProtocolCapability.TPMPresentFlag)); return EFI_SUCCESS; } =20 @@ -503,7 +503,7 @@ DxeTpm2MeasureBootHandler ( // Measure GPT disk. // Status =3D Tcg2MeasureGptTable (Tcg2Protocol, Handle); - DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - Tcg2MeasureGp= tTable - %r\n", Status)); + DEBUG ((DEBUG_INFO, "DxeTpm2MeasureBootHandler - Tcg2MeasureGp= tTable - %r\n", Status)); if (!EFI_ERROR (Status)) { // // GPT disk check done. @@ -647,7 +647,7 @@ DxeTpm2MeasureBootHandler ( ImageContext.ImageType, DevicePathNode ); - DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - Tcg2MeasurePeImage - = %r\n", Status)); + DEBUG ((DEBUG_INFO, "DxeTpm2MeasureBootHandler - Tcg2MeasurePeImage - = %r\n", Status)); } =20 // @@ -658,7 +658,7 @@ Finish: FreePool (OrigDevicePathNode); } =20 - DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - %r\n", Status)); + DEBUG ((DEBUG_INFO, "DxeTpm2MeasureBootHandler - %r\n", Status)); =20 return Status; } diff --git a/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.= c b/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c index a2d3923ca6..65a3bde743 100644 --- a/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c +++ b/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c @@ -164,7 +164,7 @@ TcgMeasureGptTable ( (UINT8 *)PrimaryHeader ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Failed to Read Partition Table Header!\n")); + DEBUG ((DEBUG_ERROR, "Failed to Read Partition Table Header!\n")); FreePool (PrimaryHeader); return EFI_DEVICE_ERROR; } @@ -355,7 +355,7 @@ TcgMeasurePeImage ( break; default: DEBUG (( - EFI_D_ERROR, + DEBUG_ERROR, "TcgMeasurePeImage: Unknown subsystem type %d", ImageType )); diff --git a/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c b/SecurityPkg/Li= brary/HashLibTpm2/HashLibTpm2.c index f6819793ab..c33b49c25b 100644 --- a/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c +++ b/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c @@ -237,7 +237,7 @@ HashAndExtend ( TPM2B_EVENT EventData; TPM2B_DIGEST Result; =20 - DEBUG((EFI_D_VERBOSE, "\n HashAndExtend Entry \n")); + DEBUG((DEBUG_VERBOSE, "\n HashAndExtend Entry \n")); =20 SequenceHandle =3D 0xFFFFFFFF; // Know bad value =20 @@ -257,7 +257,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } - DEBUG((EFI_D_VERBOSE, "\n Tpm2HashSequenceStart Success \n")); + DEBUG((DEBUG_VERBOSE, "\n Tpm2HashSequenceStart Success \n")); =20 Buffer =3D (UINT8 *)(UINTN)DataToHash; for (HashLen =3D DataToHashLen; HashLen > sizeof(HashBuffer.buffer); Has= hLen -=3D sizeof(HashBuffer.buffer)) { @@ -271,7 +271,7 @@ HashAndExtend ( return EFI_DEVICE_ERROR; } } - DEBUG((EFI_D_VERBOSE, "\n Tpm2SequenceUpdate Success \n")); + DEBUG((DEBUG_VERBOSE, "\n Tpm2SequenceUpdate Success \n")); =20 HashBuffer.size =3D (UINT16)HashLen; CopyMem(HashBuffer.buffer, Buffer, (UINTN)HashLen); @@ -289,7 +289,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } - DEBUG((EFI_D_VERBOSE, "\n Tpm2EventSequenceComplete Success \n")); + DEBUG((DEBUG_VERBOSE, "\n Tpm2EventSequenceComplete Success \n")); } else { Status =3D Tpm2SequenceComplete ( SequenceHandle, @@ -299,7 +299,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } - DEBUG((EFI_D_VERBOSE, "\n Tpm2SequenceComplete Success \n")); + DEBUG((DEBUG_VERBOSE, "\n Tpm2SequenceComplete Success \n")); =20 DigestList->count =3D 1; DigestList->digests[0].hashAlg =3D AlgoId; @@ -311,7 +311,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } - DEBUG((EFI_D_VERBOSE, "\n Tpm2PcrExtend Success \n")); + DEBUG((DEBUG_VERBOSE, "\n Tpm2PcrExtend Success \n")); } =20 return EFI_SUCCESS; diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2Physical= PresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2Physi= calPresenceLib.c index 3827df9663..fa0bc48649 100644 --- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenc= eLib.c +++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenc= eLib.c @@ -54,7 +54,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunctio= n ( UINTN DataSize; EFI_TCG2_PHYSICAL_PRESENCE PpData; =20 - DEBUG ((EFI_D_INFO, "[TPM2] ReturnOperationResponseToOsFunction\n")); + DEBUG ((DEBUG_INFO, "[TPM2] ReturnOperationResponseToOsFunction\n")); =20 // // Get the Physical Presence variable @@ -70,7 +70,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunctio= n ( if (EFI_ERROR (Status)) { *MostRecentRequest =3D 0; *Response =3D 0; - DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); return TCG_PP_RETURN_TPM_OPERATION_RESPONSE_FAILURE; } =20 @@ -107,7 +107,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx ( EFI_TCG2_PHYSICAL_PRESENCE PpData; EFI_TCG2_PHYSICAL_PRESENCE_FLAGS Flags; =20 - DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request =3D %x= , %x\n", *OperationRequest, *RequestParameter)); + DEBUG ((DEBUG_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request =3D %x= , %x\n", *OperationRequest, *RequestParameter)); ReturnCode =3D TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS; =20 // @@ -122,7 +122,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx ( &PpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); ReturnCode =3D TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE; goto EXIT; } @@ -146,7 +146,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx ( &PpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Set PP variable failure! Status =3D %r\= n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Set PP variable failure! Status =3D %r\= n", Status)); ReturnCode =3D TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE; goto EXIT; } @@ -172,7 +172,7 @@ EXIT: // Sync PPRQ/PPRM from PP Variable if PP submission fails // if (ReturnCode !=3D TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS) { - DEBUG ((EFI_D_ERROR, "[TPM2] Submit PP Request failure! Sync PPRQ/PPRM= with PP variable.\n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Submit PP Request failure! Sync PPRQ/PPRM= with PP variable.\n", Status)); DataSize =3D sizeof (EFI_TCG2_PHYSICAL_PRESENCE); ZeroMem(&PpData, DataSize); Status =3D mTcg2PpSmmVariable->SmmGetVariable ( @@ -244,7 +244,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunctio= n ( EFI_TCG2_PHYSICAL_PRESENCE_FLAGS Flags; BOOLEAN RequestConfirmed; =20 - DEBUG ((EFI_D_INFO, "[TPM2] GetUserConfirmationStatusFunction, Request = =3D %x\n", OperationRequest)); + DEBUG ((DEBUG_INFO, "[TPM2] GetUserConfirmationStatusFunction, Request = =3D %x\n", OperationRequest)); =20 // // Get the Physical Presence variable @@ -258,7 +258,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunctio= n ( &PpData ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM2] Get PP variable failure! Status =3D %r\n"= , Status)); return TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION; } // @@ -273,7 +273,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunctio= n ( &Flags ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "[TPM2] Get PP flags failure! Status =3D %r\n", S= tatus)); + DEBUG ((DEBUG_ERROR, "[TPM2] Get PP flags failure! Status =3D %r\n", S= tatus)); return TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION; } =20 diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c b/SecurityPkg/L= ibrary/Tpm12CommandLib/Tpm12Pcr.c index 562cf582de..4fbcb3617c 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c @@ -69,7 +69,7 @@ Tpm12Extend ( } =20 if (SwapBytes32(Response.Hdr.returnCode) !=3D TPM_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm12Extend: Response Code error! 0x%08x\r\n", S= wapBytes32(Response.Hdr.returnCode))); + DEBUG ((DEBUG_ERROR, "Tpm12Extend: Response Code error! 0x%08x\r\n", S= wapBytes32(Response.Hdr.returnCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12PhysicalPresence.c b/= SecurityPkg/Library/Tpm12CommandLib/Tpm12PhysicalPresence.c index 208bff594d..6714d17d8e 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12PhysicalPresence.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12PhysicalPresence.c @@ -58,7 +58,7 @@ Tpm12PhysicalPresence ( } =20 if (SwapBytes32(Response.returnCode) !=3D TPM_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm12PhysicalPresence: Response Code error! 0x%0= 8x\r\n", SwapBytes32(Response.returnCode))); + DEBUG ((DEBUG_ERROR, "Tpm12PhysicalPresence: Response Code error! 0x%0= 8x\r\n", SwapBytes32(Response.returnCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c b/SecurityPk= g/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c index 9c5b3d5740..70c2a06890 100644 --- a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c +++ b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c @@ -266,22 +266,22 @@ Tpm12TisTpmCommand ( DEBUG_CODE ( UINTN DebugSize; =20 - DEBUG ((EFI_D_VERBOSE, "Tpm12TisTpmCommand Send - ")); + DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand Send - ")); if (SizeIn > 0x100) { DebugSize =3D 0x40; } else { DebugSize =3D SizeIn; } for (Index =3D 0; Index < DebugSize; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index])); } if (DebugSize !=3D SizeIn) { - DEBUG ((EFI_D_VERBOSE, "...... ")); + DEBUG ((DEBUG_VERBOSE, "...... ")); for (Index =3D SizeIn - 0x20; Index < SizeIn; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index])); } } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); TpmOutSize =3D 0; =20 @@ -352,11 +352,11 @@ Tpm12TisTpmCommand ( } } DEBUG_CODE ( - DEBUG ((EFI_D_VERBOSE, "Tpm12TisTpmCommand ReceiveHeader - ")); + DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand ReceiveHeader - ")); for (Index =3D 0; Index < sizeof (TPM_RSP_COMMAND_HDR); Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index])); } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); // // Check the response data header (tag, parasize and returncode) @@ -364,7 +364,7 @@ Tpm12TisTpmCommand ( CopyMem (&Data16, BufferOut, sizeof (UINT16)); RspTag =3D SwapBytes16 (Data16); if (RspTag !=3D TPM_TAG_RSP_COMMAND && RspTag !=3D TPM_TAG_RSP_AUTH1_COM= MAND && RspTag !=3D TPM_TAG_RSP_AUTH2_COMMAND) { - DEBUG ((EFI_D_ERROR, "TPM12: Response tag error - current tag value is= %x\n", RspTag)); + DEBUG ((DEBUG_ERROR, "TPM12: Response tag error - current tag value is= %x\n", RspTag)); Status =3D EFI_UNSUPPORTED; goto Exit; } @@ -396,11 +396,11 @@ Tpm12TisTpmCommand ( } Exit: DEBUG_CODE ( - DEBUG ((EFI_D_VERBOSE, "Tpm12TisTpmCommand Receive - ")); + DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand Receive - ")); for (Index =3D 0; Index < TpmOutSize; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index])); } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY); return Status; diff --git a/SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.c b/Se= curityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.c index f975b1bc8a..2869f9ec83 100644 --- a/SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.c +++ b/SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.c @@ -47,7 +47,7 @@ Tpm12SubmitCommand ( // // TCG protocol is not installed. So, TPM12 is not present. // - DEBUG ((EFI_D_ERROR, "Tpm12SubmitCommand - TCG - %r\n", Status)); + DEBUG ((DEBUG_ERROR, "Tpm12SubmitCommand - TCG - %r\n", Status)); return EFI_NOT_FOUND; } } @@ -91,7 +91,7 @@ Tpm12RequestUseTpm ( // // TCG protocol is not installed. So, TPM12 is not present. // - DEBUG ((EFI_D_ERROR, "Tpm12RequestUseTpm - TCG - %r\n", Status)); + DEBUG ((DEBUG_ERROR, "Tpm12RequestUseTpm - TCG - %r\n", Status)); return EFI_NOT_FOUND; } } diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c b/Security= Pkg/Library/Tpm2CommandLib/Tpm2Capability.c index 4e9f030e77..5b6be8e3c8 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c @@ -110,7 +110,7 @@ Tpm2GetCapability ( // Fail if command failed // if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2GetCapability: Response Code error! 0x%08x\r= \n", SwapBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2GetCapability: Response Code error! 0x%08x\r= \n", SwapBytes32(RecvBuffer.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -532,7 +532,7 @@ Tpm2GetCapabilitySupportedAndActivePcrs ( // If error, assume that we have at least SHA-1 (and return the error.) // if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "GetSupportedAndActivePcrs - Tpm2GetCapabilityPcr= s fail!\n")); + DEBUG ((DEBUG_ERROR, "GetSupportedAndActivePcrs - Tpm2GetCapabilityPcr= s fail!\n")); *TpmHashAlgorithmBitmap =3D HASH_ALG_SHA1; *ActivePcrBanks =3D HASH_ALG_SHA1; } @@ -541,48 +541,48 @@ Tpm2GetCapabilitySupportedAndActivePcrs ( // and currently allocated. // else { - DEBUG ((EFI_D_INFO, "GetSupportedAndActivePcrs - Count =3D %08x\n", Pc= rs.count)); + DEBUG ((DEBUG_INFO, "GetSupportedAndActivePcrs - Count =3D %08x\n", Pc= rs.count)); *TpmHashAlgorithmBitmap =3D 0; *ActivePcrBanks =3D 0; for (Index =3D 0; Index < Pcrs.count; Index++) { switch (Pcrs.pcrSelections[Index].hash) { case TPM_ALG_SHA1: - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 = present.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 = present.\n")); *TpmHashAlgorithmBitmap |=3D HASH_ALG_SHA1; if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSe= lections[Index].sizeofSelect)) { - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 1 active.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 1 active.\n")); *ActivePcrBanks |=3D HASH_ALG_SHA1; } break; case TPM_ALG_SHA256: - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA25= 6 present.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA25= 6 present.\n")); *TpmHashAlgorithmBitmap |=3D HASH_ALG_SHA256; if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSe= lections[Index].sizeofSelect)) { - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 256 active.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 256 active.\n")); *ActivePcrBanks |=3D HASH_ALG_SHA256; } break; case TPM_ALG_SHA384: - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA38= 4 present.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA38= 4 present.\n")); *TpmHashAlgorithmBitmap |=3D HASH_ALG_SHA384; if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSe= lections[Index].sizeofSelect)) { - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 384 active.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 384 active.\n")); *ActivePcrBanks |=3D HASH_ALG_SHA384; } break; case TPM_ALG_SHA512: - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA51= 2 present.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA51= 2 present.\n")); *TpmHashAlgorithmBitmap |=3D HASH_ALG_SHA512; if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSe= lections[Index].sizeofSelect)) { - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 512 active.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA= 512 active.\n")); *ActivePcrBanks |=3D HASH_ALG_SHA512; } break; case TPM_ALG_SM3_256: - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SM3_2= 56 present.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SM3_2= 56 present.\n")); *TpmHashAlgorithmBitmap |=3D HASH_ALG_SM3_256; if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSe= lections[Index].sizeofSelect)) { - DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SM3= _256 active.\n")); + DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SM3= _256 active.\n")); *ActivePcrBanks |=3D HASH_ALG_SM3_256; } break; @@ -837,11 +837,11 @@ Tpm2TestParms ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2TestParms - RecvBufferSize Error - %x\n", Re= cvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2TestParms - RecvBufferSize Error - %x\n", Re= cvBufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2TestParms - responseCode - %x\n", SwapBytes3= 2(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2TestParms - responseCode - %x\n", SwapBytes3= 2(RecvBuffer.Header.responseCode))); return EFI_UNSUPPORTED; } =20 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Context.c b/SecurityPkg= /Library/Tpm2CommandLib/Tpm2Context.c index 80b15a51f0..2d03224b23 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Context.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Context.c @@ -67,11 +67,11 @@ Tpm2FlushContext ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2FlushContext - RecvBufferSize Error - %x\n",= RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2FlushContext - RecvBufferSize Error - %x\n",= RecvBufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2FlushContext - responseCode - %x\n", SwapByt= es32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2FlushContext - responseCode - %x\n", SwapByt= es32(RecvBuffer.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2DictionaryAttack.c b/Se= curityPkg/Library/Tpm2CommandLib/Tpm2DictionaryAttack.c index f502113873..2f830e0aea 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2DictionaryAttack.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2DictionaryAttack.c @@ -102,12 +102,12 @@ Tpm2DictionaryAttackLockReset ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2DictionaryAttackLockReset - RecvBufferSize E= rror - %x\n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2DictionaryAttackLockReset - RecvBufferSize E= rror - %x\n", RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2DictionaryAttackLockReset - responseCode - %= x\n", SwapBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2DictionaryAttackLockReset - responseCode - %= x\n", SwapBytes32(RecvBuffer.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -193,12 +193,12 @@ Tpm2DictionaryAttackParameters ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2DictionaryAttackParameters - RecvBufferSize = Error - %x\n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2DictionaryAttackParameters - RecvBufferSize = Error - %x\n", RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2DictionaryAttackParameters - responseCode - = %x\n", SwapBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2DictionaryAttackParameters - responseCode - = %x\n", SwapBytes32(RecvBuffer.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2EnhancedAuthorization.c= b/SecurityPkg/Library/Tpm2CommandLib/Tpm2EnhancedAuthorization.c index 61c6367262..0404c0f321 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2EnhancedAuthorization.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2EnhancedAuthorization.c @@ -159,12 +159,12 @@ Tpm2PolicySecret ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicySecret - RecvBufferSize Error - %x\n",= RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PolicySecret - RecvBufferSize Error - %x\n",= RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicySecret - responseCode - %x\n", SwapByt= es32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PolicySecret - responseCode - %x\n", SwapByt= es32(RecvBuffer.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -263,11 +263,11 @@ Tpm2PolicyOR ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicyOR - RecvBufferSize Error - %x\n", Rec= vBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PolicyOR - RecvBufferSize Error - %x\n", Rec= vBufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicyOR - responseCode - %x\n", SwapBytes32= (RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PolicyOR - responseCode - %x\n", SwapBytes32= (RecvBuffer.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -318,11 +318,11 @@ Tpm2PolicyCommandCode ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicyCommandCode - RecvBufferSize Error - %= x\n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PolicyCommandCode - RecvBufferSize Error - %= x\n", RecvBufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicyCommandCode - responseCode - %x\n", Sw= apBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PolicyCommandCode - responseCode - %x\n", Sw= apBytes32(RecvBuffer.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -373,11 +373,11 @@ Tpm2PolicyGetDigest ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicyGetDigest - RecvBufferSize Error - %x\= n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PolicyGetDigest - RecvBufferSize Error - %x\= n", RecvBufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PolicyGetDigest - responseCode - %x\n", Swap= Bytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PolicyGetDigest - responseCode - %x\n", Swap= Bytes32(RecvBuffer.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c b/SecurityPkg/Li= brary/Tpm2CommandLib/Tpm2Help.c index 36c240d122..13eeb6ec18 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c @@ -266,7 +266,7 @@ CopyDigestListToBuffer ( Buffer =3D (UINT8 *)Buffer + sizeof(DigestList->count); for (Index =3D 0; Index < DigestList->count; Index++) { if (!IsHashAlgSupportedInHashAlgorithmMask(DigestList->digests[Index].= hashAlg, HashAlgorithmMask)) { - DEBUG ((EFI_D_ERROR, "WARNING: TPM2 Event log has HashAlg unsupporte= d by PCR bank (0x%x)\n", DigestList->digests[Index].hashAlg)); + DEBUG ((DEBUG_ERROR, "WARNING: TPM2 Event log has HashAlg unsupporte= d by PCR bank (0x%x)\n", DigestList->digests[Index].hashAlg)); continue; } CopyMem (Buffer, &DigestList->digests[Index].hashAlg, sizeof(DigestLis= t->digests[Index].hashAlg)); diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c b/SecurityP= kg/Library/Tpm2CommandLib/Tpm2Hierarchy.c index 8e05596763..50973f19e2 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c @@ -184,12 +184,12 @@ Tpm2SetPrimaryPolicy ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2SetPrimaryPolicy - RecvBufferSize Error - %x= \n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2SetPrimaryPolicy - RecvBufferSize Error - %x= \n", RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2SetPrimaryPolicy - responseCode - %x\n", Swa= pBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2SetPrimaryPolicy - responseCode - %x\n", Swa= pBytes32(RecvBuffer.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -252,7 +252,7 @@ Tpm2Clear ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Clear: Failed ExecuteCommand: Buffer Too Small\r= \n")); + DEBUG ((DEBUG_ERROR, "Clear: Failed ExecuteCommand: Buffer Too Small\r= \n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -262,7 +262,7 @@ Tpm2Clear ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Clear: Response size too large! %d\r\n", RespSiz= e)); + DEBUG ((DEBUG_ERROR, "Clear: Response size too large! %d\r\n", RespSiz= e)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -271,7 +271,7 @@ Tpm2Clear ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Clear: Response Code error! 0x%08x\r\n", SwapByt= es32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Clear: Response Code error! 0x%08x\r\n", SwapByt= es32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -346,7 +346,7 @@ Tpm2ClearControl ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "ClearControl: Failed ExecuteCommand: Buffer Too = Small\r\n")); + DEBUG ((DEBUG_ERROR, "ClearControl: Failed ExecuteCommand: Buffer Too = Small\r\n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -356,7 +356,7 @@ Tpm2ClearControl ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "ClearControl: Response size too large! %d\r\n", = RespSize)); + DEBUG ((DEBUG_ERROR, "ClearControl: Response size too large! %d\r\n", = RespSize)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -365,7 +365,7 @@ Tpm2ClearControl ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "ClearControl: Response Code error! 0x%08x\r\n", = SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "ClearControl: Response Code error! 0x%08x\r\n", = SwapBytes32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -459,7 +459,7 @@ Tpm2HierarchyChangeAuth ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "HierarchyChangeAuth: Failed ExecuteCommand: Buff= er Too Small\r\n")); + DEBUG ((DEBUG_ERROR, "HierarchyChangeAuth: Failed ExecuteCommand: Buff= er Too Small\r\n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -469,7 +469,7 @@ Tpm2HierarchyChangeAuth ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "HierarchyChangeAuth: Response size too large! %d= \r\n", RespSize)); + DEBUG ((DEBUG_ERROR, "HierarchyChangeAuth: Response size too large! %d= \r\n", RespSize)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -478,7 +478,7 @@ Tpm2HierarchyChangeAuth ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG((EFI_D_ERROR,"HierarchyChangeAuth: Response Code error! 0x%08x\r= \n", SwapBytes32(Res.Header.responseCode))); + DEBUG((DEBUG_ERROR,"HierarchyChangeAuth: Response Code error! 0x%08x\r= \n", SwapBytes32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -557,7 +557,7 @@ Tpm2ChangeEPS ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "ChangeEPS: Failed ExecuteCommand: Buffer Too Sma= ll\r\n")); + DEBUG ((DEBUG_ERROR, "ChangeEPS: Failed ExecuteCommand: Buffer Too Sma= ll\r\n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -567,7 +567,7 @@ Tpm2ChangeEPS ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "ChangeEPS: Response size too large! %d\r\n", Res= pSize)); + DEBUG ((DEBUG_ERROR, "ChangeEPS: Response size too large! %d\r\n", Res= pSize)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -576,7 +576,7 @@ Tpm2ChangeEPS ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG((EFI_D_ERROR,"ChangeEPS: Response Code error! 0x%08x\r\n", SwapB= ytes32(Res.Header.responseCode))); + DEBUG((DEBUG_ERROR,"ChangeEPS: Response Code error! 0x%08x\r\n", SwapB= ytes32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -655,7 +655,7 @@ Tpm2ChangePPS ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "ChangePPS: Failed ExecuteCommand: Buffer Too Sma= ll\r\n")); + DEBUG ((DEBUG_ERROR, "ChangePPS: Failed ExecuteCommand: Buffer Too Sma= ll\r\n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -665,7 +665,7 @@ Tpm2ChangePPS ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "ChangePPS: Response size too large! %d\r\n", Res= pSize)); + DEBUG ((DEBUG_ERROR, "ChangePPS: Response size too large! %d\r\n", Res= pSize)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -674,7 +674,7 @@ Tpm2ChangePPS ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG((EFI_D_ERROR,"ChangePPS: Response Code error! 0x%08x\r\n", SwapB= ytes32(Res.Header.responseCode))); + DEBUG((DEBUG_ERROR,"ChangePPS: Response Code error! 0x%08x\r\n", SwapB= ytes32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -763,7 +763,7 @@ Tpm2HierarchyControl ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "HierarchyControl: Failed ExecuteCommand: Buffer = Too Small\r\n")); + DEBUG ((DEBUG_ERROR, "HierarchyControl: Failed ExecuteCommand: Buffer = Too Small\r\n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -773,7 +773,7 @@ Tpm2HierarchyControl ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "HierarchyControl: Response size too large! %d\r\= n", RespSize)); + DEBUG ((DEBUG_ERROR, "HierarchyControl: Response size too large! %d\r\= n", RespSize)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -782,7 +782,7 @@ Tpm2HierarchyControl ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG((EFI_D_ERROR,"HierarchyControl: Response Code error! 0x%08x\r\n"= , SwapBytes32(Res.Header.responseCode))); + DEBUG((DEBUG_ERROR,"HierarchyControl: Response Code error! 0x%08x\r\n"= , SwapBytes32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c b/SecurityP= kg/Library/Tpm2CommandLib/Tpm2Integrity.c index ddb15178fb..8c87de0b0c 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c @@ -130,7 +130,7 @@ Tpm2PcrExtend ( Buffer +=3D sizeof(UINT16); DigestSize =3D GetHashSizeFromAlgo (Digests->digests[Index].hashAlg); if (DigestSize =3D=3D 0) { - DEBUG ((EFI_D_ERROR, "Unknown hash algorithm %d\r\n", Digests->diges= ts[Index].hashAlg)); + DEBUG ((DEBUG_ERROR, "Unknown hash algorithm %d\r\n", Digests->diges= ts[Index].hashAlg)); return EFI_DEVICE_ERROR; } CopyMem( @@ -151,7 +151,7 @@ Tpm2PcrExtend ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrExtend: Failed ExecuteCommand: Buffer Too= Small\r\n")); + DEBUG ((DEBUG_ERROR, "Tpm2PcrExtend: Failed ExecuteCommand: Buffer Too= Small\r\n")); return EFI_BUFFER_TOO_SMALL; } =20 @@ -160,7 +160,7 @@ Tpm2PcrExtend ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrExtend: Response size too large! %d\r\n",= RespSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrExtend: Response size too large! %d\r\n",= RespSize)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -168,7 +168,7 @@ Tpm2PcrExtend ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrExtend: Response Code error! 0x%08x\r\n",= SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PcrExtend: Response Code error! 0x%08x\r\n",= SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -246,7 +246,7 @@ Tpm2PcrEvent ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrEvent: Failed ExecuteCommand: Buffer Too = Small\r\n")); + DEBUG ((DEBUG_ERROR, "Tpm2PcrEvent: Failed ExecuteCommand: Buffer Too = Small\r\n")); return EFI_BUFFER_TOO_SMALL; } =20 @@ -255,7 +255,7 @@ Tpm2PcrEvent ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrEvent: Response size too large! %d\r\n", = RespSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrEvent: Response size too large! %d\r\n", = RespSize)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -263,7 +263,7 @@ Tpm2PcrEvent ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrEvent: Response Code error! 0x%08x\r\n", = SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PcrEvent: Response Code error! 0x%08x\r\n", = SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -284,7 +284,7 @@ Tpm2PcrEvent ( Buffer +=3D sizeof(UINT16); DigestSize =3D GetHashSizeFromAlgo (Digests->digests[Index].hashAlg); if (DigestSize =3D=3D 0) { - DEBUG ((EFI_D_ERROR, "Unknown hash algorithm %d\r\n", Digests->diges= ts[Index].hashAlg)); + DEBUG ((DEBUG_ERROR, "Unknown hash algorithm %d\r\n", Digests->diges= ts[Index].hashAlg)); return EFI_DEVICE_ERROR; } CopyMem( @@ -353,11 +353,11 @@ Tpm2PcrRead ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrRead - responseCode - %x\n", SwapBytes32(= RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2PcrRead - responseCode - %x\n", SwapBytes32(= RecvBuffer.Header.responseCode))); return EFI_NOT_FOUND; } =20 @@ -369,7 +369,7 @@ Tpm2PcrRead ( // PcrUpdateCounter // if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER) + sizeof(RecvBuffer.P= crUpdateCounter)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); return EFI_DEVICE_ERROR; } *PcrUpdateCounter =3D SwapBytes32(RecvBuffer.PcrUpdateCounter); @@ -378,7 +378,7 @@ Tpm2PcrRead ( // PcrSelectionOut // if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER) + sizeof(RecvBuffer.P= crUpdateCounter) + sizeof(RecvBuffer.PcrSelectionOut.count)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); return EFI_DEVICE_ERROR; } PcrSelectionOut->count =3D SwapBytes32(RecvBuffer.PcrSelectionOut.count); @@ -388,7 +388,7 @@ Tpm2PcrRead ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER) + sizeof(RecvBuffer.P= crUpdateCounter) + sizeof(RecvBuffer.PcrSelectionOut.count) + sizeof(RecvBu= ffer.PcrSelectionOut.pcrSelections[0]) * PcrSelectionOut->count) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", Recv= BufferSize)); return EFI_DEVICE_ERROR; } for (Index =3D 0; Index < PcrSelectionOut->count; Index++) { @@ -513,7 +513,7 @@ Tpm2PcrAllocate ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrAllocate: Failed ExecuteCommand: Buffer T= oo Small\r\n")); + DEBUG ((DEBUG_ERROR, "Tpm2PcrAllocate: Failed ExecuteCommand: Buffer T= oo Small\r\n")); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -523,7 +523,7 @@ Tpm2PcrAllocate ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "Tpm2PcrAllocate: Response size too large! %d\r\n= ", RespSize)); + DEBUG ((DEBUG_ERROR, "Tpm2PcrAllocate: Response size too large! %d\r\n= ", RespSize)); Status =3D EFI_BUFFER_TOO_SMALL; goto Done; } @@ -532,7 +532,7 @@ Tpm2PcrAllocate ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG((EFI_D_ERROR,"Tpm2PcrAllocate: Response Code error! 0x%08x\r\n",= SwapBytes32(Res.Header.responseCode))); + DEBUG((DEBUG_ERROR,"Tpm2PcrAllocate: Response Code error! 0x%08x\r\n",= SwapBytes32(Res.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -673,15 +673,15 @@ Tpm2PcrAllocateBanks ( &SizeNeeded, &SizeAvailable ); - DEBUG ((EFI_D_INFO, "Tpm2PcrAllocateBanks call Tpm2PcrAllocate - %r\n", = Status)); + DEBUG ((DEBUG_INFO, "Tpm2PcrAllocateBanks call Tpm2PcrAllocate - %r\n", = Status)); if (EFI_ERROR (Status)) { goto Done; } =20 - DEBUG ((EFI_D_INFO, "AllocationSuccess - %02x\n", AllocationSuccess)); - DEBUG ((EFI_D_INFO, "MaxPCR - %08x\n", MaxPCR)); - DEBUG ((EFI_D_INFO, "SizeNeeded - %08x\n", SizeNeeded)); - DEBUG ((EFI_D_INFO, "SizeAvailable - %08x\n", SizeAvailable)); + DEBUG ((DEBUG_INFO, "AllocationSuccess - %02x\n", AllocationSuccess)); + DEBUG ((DEBUG_INFO, "MaxPCR - %08x\n", MaxPCR)); + DEBUG ((DEBUG_INFO, "SizeNeeded - %08x\n", SizeNeeded)); + DEBUG ((DEBUG_INFO, "SizeAvailable - %08x\n", SizeAvailable)); =20 Done: ZeroMem(&LocalAuthSession.hmac, sizeof(LocalAuthSession.hmac)); diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Miscellaneous.c b/Secur= ityPkg/Library/Tpm2CommandLib/Tpm2Miscellaneous.c index 21f3bb5adf..8885691592 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Miscellaneous.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Miscellaneous.c @@ -96,12 +96,12 @@ Tpm2SetAlgorithmSet ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2SetAlgorithmSet - RecvBufferSize Error - %x\= n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2SetAlgorithmSet - RecvBufferSize Error - %x\= n", RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2SetAlgorithmSet - responseCode - %x\n", Swap= Bytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2SetAlgorithmSet - responseCode - %x\n", Swap= Bytes32(RecvBuffer.Header.responseCode))); Status =3D EFI_DEVICE_ERROR; goto Done; } diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c b/SecurityP= kg/Library/Tpm2CommandLib/Tpm2NVStorage.c index 87572de201..fb46af0fed 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c @@ -200,12 +200,12 @@ Tpm2NvReadPublic ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvReadPublic - RecvBufferSize Error - %x\n",= RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvReadPublic - RecvBufferSize Error - %x\n",= RecvBufferSize)); return EFI_DEVICE_ERROR; } ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvReadPublic - responseCode - %x\n", SwapByt= es32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2NvReadPublic - responseCode - %x\n", SwapByt= es32(RecvBuffer.Header.responseCode))); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -220,7 +220,7 @@ Tpm2NvReadPublic ( } =20 if (RecvBufferSize <=3D sizeof (TPM2_RESPONSE_HEADER) + sizeof (UINT16) = + sizeof(UINT16)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvReadPublic - RecvBufferSize Error - %x\n",= RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvReadPublic - RecvBufferSize Error - %x\n",= RecvBufferSize)); return EFI_NOT_FOUND; } =20 @@ -240,7 +240,7 @@ Tpm2NvReadPublic ( } =20 if (RecvBufferSize !=3D sizeof(TPM2_RESPONSE_HEADER) + sizeof(UINT16) + = NvPublicSize + sizeof(UINT16) + NvNameSize) { - DEBUG ((EFI_D_ERROR, "Tpm2NvReadPublic - RecvBufferSize Error - NvPubl= icSize %x\n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvReadPublic - RecvBufferSize Error - NvPubl= icSize %x\n", RecvBufferSize)); return EFI_NOT_FOUND; } =20 @@ -354,14 +354,14 @@ Tpm2NvDefineSpace ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvDefineSpace - RecvBufferSize Error - %x\n"= , RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvDefineSpace - RecvBufferSize Error - %x\n"= , RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } =20 ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvDefineSpace - responseCode - %x\n", SwapBy= tes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2NvDefineSpace - responseCode - %x\n", SwapBy= tes32(RecvBuffer.Header.responseCode))); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -462,14 +462,14 @@ Tpm2NvUndefineSpace ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvUndefineSpace - RecvBufferSize Error - %x\= n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvUndefineSpace - RecvBufferSize Error - %x\= n", RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } =20 ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvUndefineSpace - responseCode - %x\n", Swap= Bytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2NvUndefineSpace - responseCode - %x\n", Swap= Bytes32(RecvBuffer.Header.responseCode))); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -577,13 +577,13 @@ Tpm2NvRead ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvRead - RecvBufferSize Error - %x\n", RecvB= ufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvRead - RecvBufferSize Error - %x\n", RecvB= ufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvRead - responseCode - %x\n", ResponseCode)= ); + DEBUG ((DEBUG_ERROR, "Tpm2NvRead - responseCode - %x\n", ResponseCode)= ); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -723,13 +723,13 @@ Tpm2NvWrite ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvWrite - RecvBufferSize Error - %x\n", Recv= BufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvWrite - RecvBufferSize Error - %x\n", Recv= BufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvWrite - responseCode - %x\n", ResponseCode= )); + DEBUG ((DEBUG_ERROR, "Tpm2NvWrite - responseCode - %x\n", ResponseCode= )); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -843,14 +843,14 @@ Tpm2NvReadLock ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvReadLock - RecvBufferSize Error - %x\n", R= ecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvReadLock - RecvBufferSize Error - %x\n", R= ecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } =20 ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvReadLock - responseCode - %x\n", SwapBytes= 32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2NvReadLock - responseCode - %x\n", SwapBytes= 32(RecvBuffer.Header.responseCode))); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -930,14 +930,14 @@ Tpm2NvWriteLock ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvWriteLock - RecvBufferSize Error - %x\n", = RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvWriteLock - RecvBufferSize Error - %x\n", = RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } =20 ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvWriteLock - responseCode - %x\n", SwapByte= s32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2NvWriteLock - responseCode - %x\n", SwapByte= s32(RecvBuffer.Header.responseCode))); } switch (ResponseCode) { case TPM_RC_SUCCESS: @@ -1014,14 +1014,14 @@ Tpm2NvGlobalWriteLock ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2NvGlobalWriteLock - RecvBufferSize Error - %= x\n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2NvGlobalWriteLock - RecvBufferSize Error - %= x\n", RecvBufferSize)); Status =3D EFI_DEVICE_ERROR; goto Done; } =20 ResponseCode =3D SwapBytes32(RecvBuffer.Header.responseCode); if (ResponseCode !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2NvGlobalWriteLock - responseCode - %x\n", Sw= apBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2NvGlobalWriteLock - responseCode - %x\n", Sw= apBytes32(RecvBuffer.Header.responseCode))); } switch (ResponseCode) { case TPM_RC_SUCCESS: diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Sequences.c b/SecurityP= kg/Library/Tpm2CommandLib/Tpm2Sequences.c index 201c2170fc..3d99f0615c 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Sequences.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Sequences.c @@ -134,7 +134,7 @@ Tpm2HashSequenceStart ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "HashSequenceStart: Failed ExecuteCommand: Buffer= Too Small\r\n")); + DEBUG ((DEBUG_ERROR, "HashSequenceStart: Failed ExecuteCommand: Buffer= Too Small\r\n")); return EFI_BUFFER_TOO_SMALL; } =20 @@ -143,7 +143,7 @@ Tpm2HashSequenceStart ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "HashSequenceStart: Response size too large! %d\r= \n", RespSize)); + DEBUG ((DEBUG_ERROR, "HashSequenceStart: Response size too large! %d\r= \n", RespSize)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -151,7 +151,7 @@ Tpm2HashSequenceStart ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "HashSequenceStart: Response Code error! 0x%08x\r= \n", SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "HashSequenceStart: Response Code error! 0x%08x\r= \n", SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -231,7 +231,7 @@ Tpm2SequenceUpdate ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "SequenceUpdate: Failed ExecuteCommand: Buffer To= o Small\r\n")); + DEBUG ((DEBUG_ERROR, "SequenceUpdate: Failed ExecuteCommand: Buffer To= o Small\r\n")); return EFI_BUFFER_TOO_SMALL; } =20 @@ -240,7 +240,7 @@ Tpm2SequenceUpdate ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "SequenceUpdate: Response size too large! %d\r\n"= , RespSize)); + DEBUG ((DEBUG_ERROR, "SequenceUpdate: Response size too large! %d\r\n"= , RespSize)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -248,7 +248,7 @@ Tpm2SequenceUpdate ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "SequenceUpdate: Response Code error! 0x%08x\r\n"= , SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "SequenceUpdate: Response Code error! 0x%08x\r\n"= , SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -340,7 +340,7 @@ Tpm2EventSequenceComplete ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "EventSequenceComplete: Failed ExecuteCommand: Bu= ffer Too Small\r\n")); + DEBUG ((DEBUG_ERROR, "EventSequenceComplete: Failed ExecuteCommand: Bu= ffer Too Small\r\n")); return EFI_BUFFER_TOO_SMALL; } =20 @@ -349,7 +349,7 @@ Tpm2EventSequenceComplete ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "EventSequenceComplete: Response size too large! = %d\r\n", RespSize)); + DEBUG ((DEBUG_ERROR, "EventSequenceComplete: Response size too large! = %d\r\n", RespSize)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -357,7 +357,7 @@ Tpm2EventSequenceComplete ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "EventSequenceComplete: Response Code error! 0x%0= 8x\r\n", SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "EventSequenceComplete: Response Code error! 0x%0= 8x\r\n", SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 @@ -382,7 +382,7 @@ Tpm2EventSequenceComplete ( =20 DigestSize =3D GetHashSizeFromAlgo (Results->digests[Index].hashAlg); if (DigestSize =3D=3D 0) { - DEBUG ((EFI_D_ERROR, "EventSequenceComplete: Unknown hash algorithm = %d\r\n", Results->digests[Index].hashAlg)); + DEBUG ((DEBUG_ERROR, "EventSequenceComplete: Unknown hash algorithm = %d\r\n", Results->digests[Index].hashAlg)); return EFI_DEVICE_ERROR; } CopyMem( @@ -466,7 +466,7 @@ Tpm2SequenceComplete ( } =20 if (ResultBufSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "SequenceComplete: Failed ExecuteCommand: Buffer = Too Small\r\n")); + DEBUG ((DEBUG_ERROR, "SequenceComplete: Failed ExecuteCommand: Buffer = Too Small\r\n")); return EFI_BUFFER_TOO_SMALL; } =20 @@ -475,7 +475,7 @@ Tpm2SequenceComplete ( // RespSize =3D SwapBytes32(Res.Header.paramSize); if (RespSize > sizeof(Res)) { - DEBUG ((EFI_D_ERROR, "SequenceComplete: Response size too large! %d\r\= n", RespSize)); + DEBUG ((DEBUG_ERROR, "SequenceComplete: Response size too large! %d\r\= n", RespSize)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -483,7 +483,7 @@ Tpm2SequenceComplete ( // Fail if command failed // if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "SequenceComplete: Response Code error! 0x%08x\r\= n", SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "SequenceComplete: Response Code error! 0x%08x\r\= n", SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c b/SecurityPkg= /Library/Tpm2CommandLib/Tpm2Session.c index 57367432df..4ca616188c 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c @@ -124,7 +124,7 @@ Tpm2StartAuthSession ( break; default: ASSERT (FALSE); - DEBUG ((EFI_D_ERROR, "Tpm2StartAuthSession - Symmetric->algorithm - %x= \n", Symmetric->algorithm)); + DEBUG ((DEBUG_ERROR, "Tpm2StartAuthSession - Symmetric->algorithm - %x= \n", Symmetric->algorithm)); return EFI_UNSUPPORTED; } =20 @@ -144,11 +144,11 @@ Tpm2StartAuthSession ( } =20 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) { - DEBUG ((EFI_D_ERROR, "Tpm2StartAuthSession - RecvBufferSize Error - %x= \n", RecvBufferSize)); + DEBUG ((DEBUG_ERROR, "Tpm2StartAuthSession - RecvBufferSize Error - %x= \n", RecvBufferSize)); return EFI_DEVICE_ERROR; } if (SwapBytes32(RecvBuffer.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2StartAuthSession - responseCode - %x\n", Swa= pBytes32(RecvBuffer.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2StartAuthSession - responseCode - %x\n", Swa= pBytes32(RecvBuffer.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c b/SecurityPkg= /Library/Tpm2CommandLib/Tpm2Startup.c index 41f2367ba2..645ac49b87 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c @@ -77,7 +77,7 @@ Tpm2Startup ( DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_INITIALIZE\n")); return EFI_SUCCESS; default: - DEBUG ((EFI_D_ERROR, "Tpm2Startup: Response Code error! 0x%08x\r\n", R= esponseCode)); + DEBUG ((DEBUG_ERROR, "Tpm2Startup: Response Code error! 0x%08x\r\n", R= esponseCode)); return EFI_DEVICE_ERROR; } } @@ -113,7 +113,7 @@ Tpm2Shutdown ( } =20 if (SwapBytes32(Res.Header.responseCode) !=3D TPM_RC_SUCCESS) { - DEBUG ((EFI_D_ERROR, "Tpm2Shutdown: Response Code error! 0x%08x\r\n", = SwapBytes32(Res.Header.responseCode))); + DEBUG ((DEBUG_ERROR, "Tpm2Shutdown: Response Code error! 0x%08x\r\n", = SwapBytes32(Res.Header.responseCode))); return EFI_DEVICE_ERROR; } =20 diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c b/SecurityPkg/= Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c index 8596143b53..63cbafbb82 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c @@ -151,22 +151,22 @@ PtpCrbTpmCommand ( DEBUG_CODE ( UINTN DebugSize; =20 - DEBUG ((EFI_D_VERBOSE, "PtpCrbTpmCommand Send - ")); + DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Send - ")); if (SizeIn > 0x100) { DebugSize =3D 0x40; } else { DebugSize =3D SizeIn; } for (Index =3D 0; Index < DebugSize; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index])); } if (DebugSize !=3D SizeIn) { - DEBUG ((EFI_D_VERBOSE, "...... ")); + DEBUG ((DEBUG_VERBOSE, "...... ")); for (Index =3D SizeIn - 0x20; Index < SizeIn; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index])); } } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); TpmOutSize =3D 0; =20 @@ -283,11 +283,11 @@ PtpCrbTpmCommand ( BufferOut[Index] =3D MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]); } DEBUG_CODE ( - DEBUG ((EFI_D_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - ")); + DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - ")); for (Index =3D 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index])); } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); // // Check the reponse data header (tag, parasize and returncode) @@ -295,7 +295,7 @@ PtpCrbTpmCommand ( CopyMem (&Data16, BufferOut, sizeof (UINT16)); // TPM2 should not use this RSP_COMMAND if (SwapBytes16 (Data16) =3D=3D TPM_ST_RSP_COMMAND) { - DEBUG ((EFI_D_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMA= ND)); + DEBUG ((DEBUG_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMA= ND)); Status =3D EFI_UNSUPPORTED; goto GoIdle_Exit; } @@ -318,11 +318,11 @@ PtpCrbTpmCommand ( } =20 DEBUG_CODE ( - DEBUG ((EFI_D_VERBOSE, "PtpCrbTpmCommand Receive - ")); + DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Receive - ")); for (Index =3D 0; Index < TpmOutSize; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index])); } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); =20 GoReady_Exit: @@ -491,36 +491,36 @@ DumpPtpInfo ( // // Dump InterfaceId Register for PTP // - DEBUG ((EFI_D_INFO, "InterfaceId - 0x%08x\n", InterfaceId.Uint32)); - DEBUG ((EFI_D_INFO, " InterfaceType - 0x%02x\n", InterfaceId.Bits.In= terfaceType)); + DEBUG ((DEBUG_INFO, "InterfaceId - 0x%08x\n", InterfaceId.Uint32)); + DEBUG ((DEBUG_INFO, " InterfaceType - 0x%02x\n", InterfaceId.Bits.In= terfaceType)); if (InterfaceId.Bits.InterfaceType !=3D PTP_INTERFACE_IDENTIFIER_INTERFA= CE_TYPE_TIS) { - DEBUG ((EFI_D_INFO, " InterfaceVersion - 0x%02x\n", InterfaceId.Bits.= InterfaceVersion)); - DEBUG ((EFI_D_INFO, " CapFIFO - 0x%x\n", InterfaceId.Bits.Ca= pFIFO)); - DEBUG ((EFI_D_INFO, " CapCRB - 0x%x\n", InterfaceId.Bits.Ca= pCRB)); + DEBUG ((DEBUG_INFO, " InterfaceVersion - 0x%02x\n", InterfaceId.Bits.= InterfaceVersion)); + DEBUG ((DEBUG_INFO, " CapFIFO - 0x%x\n", InterfaceId.Bits.Ca= pFIFO)); + DEBUG ((DEBUG_INFO, " CapCRB - 0x%x\n", InterfaceId.Bits.Ca= pCRB)); } =20 // // Dump Capability Register for TIS and FIFO // - DEBUG ((EFI_D_INFO, "InterfaceCapability - 0x%08x\n", InterfaceCapabilit= y.Uint32)); + DEBUG ((DEBUG_INFO, "InterfaceCapability - 0x%08x\n", InterfaceCapabilit= y.Uint32)); if ((InterfaceId.Bits.InterfaceType =3D=3D PTP_INTERFACE_IDENTIFIER_INTE= RFACE_TYPE_TIS) || (InterfaceId.Bits.InterfaceType =3D=3D PTP_INTERFACE_IDENTIFIER_INTE= RFACE_TYPE_FIFO)) { - DEBUG ((EFI_D_INFO, " InterfaceVersion - 0x%x\n", InterfaceCapability= .Bits.InterfaceVersion)); + DEBUG ((DEBUG_INFO, " InterfaceVersion - 0x%x\n", InterfaceCapability= .Bits.InterfaceVersion)); } =20 // // Dump StatusEx Register for PTP FIFO // - DEBUG ((EFI_D_INFO, "StatusEx - 0x%02x\n", StatusEx)); + DEBUG ((DEBUG_INFO, "StatusEx - 0x%02x\n", StatusEx)); if (InterfaceCapability.Bits.InterfaceVersion =3D=3D INTERFACE_CAPABILIT= Y_INTERFACE_VERSION_PTP) { - DEBUG ((EFI_D_INFO, " TpmFamily - 0x%x\n", (StatusEx & PTP_FIFO_STS_E= X_TPM_FAMILY) >> PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET)); + DEBUG ((DEBUG_INFO, " TpmFamily - 0x%x\n", (StatusEx & PTP_FIFO_STS_E= X_TPM_FAMILY) >> PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET)); } =20 Vid =3D 0xFFFF; Did =3D 0xFFFF; Rid =3D 0xFF; PtpInterface =3D PcdGet8(PcdActiveTpmInterfaceType); - DEBUG ((EFI_D_INFO, "PtpInterface - %x\n", PtpInterface)); + DEBUG ((DEBUG_INFO, "PtpInterface - %x\n", PtpInterface)); switch (PtpInterface) { case Tpm2PtpInterfaceCrb: Vid =3D MmioRead16 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->Vid); @@ -536,9 +536,9 @@ DumpPtpInfo ( default: break; } - DEBUG ((EFI_D_INFO, "VID - 0x%04x\n", Vid)); - DEBUG ((EFI_D_INFO, "DID - 0x%04x\n", Did)); - DEBUG ((EFI_D_INFO, "RID - 0x%02x\n", Rid)); + DEBUG ((DEBUG_INFO, "VID - 0x%04x\n", Vid)); + DEBUG ((DEBUG_INFO, "DID - 0x%04x\n", Did)); + DEBUG ((DEBUG_INFO, "RID - 0x%02x\n", Rid)); } =20 /** diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c b/SecurityPkg/= Library/Tpm2DeviceLibDTpm/Tpm2Tis.c index d2ce8d1f09..f7bd71541a 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c @@ -221,22 +221,22 @@ Tpm2TisTpmCommand ( DEBUG_CODE ( UINTN DebugSize; =20 - DEBUG ((EFI_D_VERBOSE, "Tpm2TisTpmCommand Send - ")); + DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand Send - ")); if (SizeIn > 0x100) { DebugSize =3D 0x40; } else { DebugSize =3D SizeIn; } for (Index =3D 0; Index < DebugSize; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index])); } if (DebugSize !=3D SizeIn) { - DEBUG ((EFI_D_VERBOSE, "...... ")); + DEBUG ((DEBUG_VERBOSE, "...... ")); for (Index =3D SizeIn - 0x20; Index < SizeIn; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index])); } } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); TpmOutSize =3D 0; =20 @@ -333,11 +333,11 @@ Tpm2TisTpmCommand ( } } DEBUG_CODE ( - DEBUG ((EFI_D_VERBOSE, "Tpm2TisTpmCommand ReceiveHeader - ")); + DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand ReceiveHeader - ")); for (Index =3D 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index])); } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); // // Check the reponse data header (tag,parasize and returncode ) @@ -345,7 +345,7 @@ Tpm2TisTpmCommand ( CopyMem (&Data16, BufferOut, sizeof (UINT16)); // TPM2 should not use this RSP_COMMAND if (SwapBytes16 (Data16) =3D=3D TPM_ST_RSP_COMMAND) { - DEBUG ((EFI_D_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMA= ND)); + DEBUG ((DEBUG_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMA= ND)); Status =3D EFI_UNSUPPORTED; goto Exit; } @@ -377,11 +377,11 @@ Tpm2TisTpmCommand ( } Exit: DEBUG_CODE ( - DEBUG ((EFI_D_VERBOSE, "Tpm2TisTpmCommand Receive - ")); + DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand Receive - ")); for (Index =3D 0; Index < TpmOutSize; Index++) { - DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); + DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index])); } - DEBUG ((EFI_D_VERBOSE, "\n")); + DEBUG ((DEBUG_VERBOSE, "\n")); ); MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY); return Status; diff --git a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei= .c b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c index 2e77d35433..e24ef08515 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c +++ b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c @@ -123,7 +123,7 @@ Tpm2RegisterTpm2DeviceLib ( // // In PEI phase, there will be shadow driver dispatched again. // - DEBUG ((EFI_D_INFO, "Tpm2RegisterTpm2DeviceLib - Override\n")); + DEBUG ((DEBUG_INFO, "Tpm2RegisterTpm2DeviceLib - Override\n")); CopyMem (Tpm2DeviceInterface, Tpm2Device, sizeof(*Tpm2Device)); return EFI_SUCCESS; } else { diff --git a/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c b/Se= curityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c index c34c417093..9d12695a62 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c +++ b/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c @@ -46,7 +46,7 @@ Tpm2SubmitCommand ( // // Tcg2 protocol is not installed. So, TPM2 is not present. // - DEBUG ((EFI_D_ERROR, "Tpm2SubmitCommand - Tcg2 - %r\n", Status)); + DEBUG ((DEBUG_ERROR, "Tpm2SubmitCommand - Tcg2 - %r\n", Status)); return EFI_NOT_FOUND; } } @@ -90,7 +90,7 @@ Tpm2RequestUseTpm ( // // Tcg2 protocol is not installed. So, TPM2 is not present. // - DEBUG ((EFI_D_ERROR, "Tpm2RequestUseTpm - Tcg2 - %r\n", Status)); + DEBUG ((DEBUG_ERROR, "Tpm2RequestUseTpm - Tcg2 - %r\n", Status)); return EFI_NOT_FOUND; } } diff --git a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c b/SecurityPkg/= Tcg/MemoryOverwriteControl/TcgMor.c index fe2bd749fb..b359466a81 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c +++ b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c @@ -40,7 +40,7 @@ OnReadyToBoot ( // // Clear MOR_CLEAR_MEMORY_BIT // - DEBUG ((EFI_D_INFO, "TcgMor: Clear MorClearMemory bit\n")); + DEBUG ((DEBUG_INFO, "TcgMor: Clear MorClearMemory bit\n")); mMorControl &=3D 0xFE; =20 DataSize =3D sizeof (mMorControl); @@ -52,7 +52,7 @@ OnReadyToBoot ( &mMorControl ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "TcgMor: Clear MOR_CLEAR_MEMORY_BIT failure, Stat= us =3D %r\n")); + DEBUG ((DEBUG_ERROR, "TcgMor: Clear MOR_CLEAR_MEMORY_BIT failure, Stat= us =3D %r\n")); } } =20 @@ -168,7 +168,7 @@ InitiateTPerReset ( // Found a TCG device. // TcgFlag =3D TRUE; - DEBUG ((EFI_D_INFO, "This device is a TCG protocol device\n")); + DEBUG ((DEBUG_INFO, "This device is a TCG protocol device\n")); break; } =20 @@ -177,13 +177,13 @@ InitiateTPerReset ( // Found a IEEE 1667 device. // IeeeFlag =3D TRUE; - DEBUG ((EFI_D_INFO, "This device is a IEEE 1667 protocol device\n")); + DEBUG ((DEBUG_INFO, "This device is a IEEE 1667 protocol device\n")); break; } } =20 if (!TcgFlag && !IeeeFlag) { - DEBUG ((EFI_D_INFO, "Neither a TCG nor IEEE 1667 protocol device is fo= und\n")); + DEBUG ((DEBUG_INFO, "Neither a TCG nor IEEE 1667 protocol device is fo= und\n")); goto Exit; } =20 @@ -203,9 +203,9 @@ InitiateTPerReset ( ); =20 if (!EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "Send TPer Reset Command Successfully !\n")); + DEBUG ((DEBUG_INFO, "Send TPer Reset Command Successfully !\n")); } else { - DEBUG ((EFI_D_INFO, "Send TPer Reset Command Fail !\n")); + DEBUG ((DEBUG_INFO, "Send TPer Reset Command Fail !\n")); } } =20 @@ -213,7 +213,7 @@ InitiateTPerReset ( // // TBD : Perform a TPer Reset via IEEE 1667 Protocol // - DEBUG ((EFI_D_INFO, "IEEE 1667 Protocol didn't support yet!\n")); + DEBUG ((DEBUG_INFO, "IEEE 1667 Protocol didn't support yet!\n")); } =20 Exit: @@ -336,7 +336,7 @@ MorDriverEntryPoint ( DataSize, &mMorControl ); - DEBUG ((EFI_D_INFO, "TcgMor: Create MOR variable! Status =3D %r\n", St= atus)); + DEBUG ((DEBUG_INFO, "TcgMor: Create MOR variable! Status =3D %r\n", St= atus)); } else { // // Create a Ready To Boot Event and Clear the MorControl bit in the ca= ll back function. @@ -355,7 +355,7 @@ MorDriverEntryPoint ( // // Register EFI_END_OF_DXE_EVENT_GROUP_GUID event. // - DEBUG ((EFI_D_INFO, "TcgMor: Create EndofDxe Event for Mor TPer Reset!= \n")); + DEBUG ((DEBUG_INFO, "TcgMor: Create EndofDxe Event for Mor TPer Reset!= \n")); Status =3D gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_CALLBACK, diff --git a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSm= m.c b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c index 8c92317313..54986512a5 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c +++ b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c @@ -123,7 +123,7 @@ MorLockDriverEntryPointSmm ( // // This driver link to Smm Variable driver // - DEBUG ((EFI_D_INFO, "MorLockDriverEntryPointSmm\n")); + DEBUG ((DEBUG_INFO, "MorLockDriverEntryPointSmm\n")); =20 Status =3D gSmst->SmmLocateProtocol ( &gEfiSmmVariableProtocolGuid, diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c b/SecurityPkg/Tc= g/Tcg2Config/Tcg2ConfigDriver.c index 9052eced75..aa33ad1da9 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c @@ -355,7 +355,7 @@ Tcg2ConfigDriverEntryPoint ( &Tcg2DeviceDetection ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_DEVICE_DETECT= ION_NAME\n")); + DEBUG ((DEBUG_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_DEVICE_DETECT= ION_NAME\n")); Status =3D gRT->SetVariable ( TCG2_DEVICE_DETECTION_NAME, &gTcg2ConfigFormSetGuid, @@ -377,7 +377,7 @@ Tcg2ConfigDriverEntryPoint ( &Tcg2Configuration ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_NAME\= n")); + DEBUG ((DEBUG_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_NAME\= n")); } =20 // diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/= Tcg2Config/Tcg2ConfigImpl.c index baa8fcd08d..642926d882 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -953,7 +953,7 @@ InstallTcg2ConfigForm ( &Tcg2ConfigInfo ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_INFO_= NAME\n")); + DEBUG ((DEBUG_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_INFO_= NAME\n")); } =20 return EFI_SUCCESS; diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/= Tcg2Config/Tcg2ConfigPeim.c index a15919685e..b79a4afe41 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -104,11 +104,11 @@ Tcg2ConfigPeimEntryPoint ( // // Although we have SetupVariable info, we still need detect TPM device = manually. // - DEBUG ((EFI_D_INFO, "Tcg2Configuration.TpmDevice from Setup: %x\n", Tcg2= Configuration.TpmDevice)); + DEBUG ((DEBUG_INFO, "Tcg2Configuration.TpmDevice from Setup: %x\n", Tcg2= Configuration.TpmDevice)); =20 if (PcdGetBool (PcdTpmAutoDetection)) { TpmDevice =3D DetectTpmDevice (Tcg2Configuration.TpmDevice); - DEBUG ((EFI_D_INFO, "TpmDevice final: %x\n", TpmDevice)); + DEBUG ((DEBUG_INFO, "TpmDevice final: %x\n", TpmDevice)); if (TpmDevice !=3D TPM_DEVICE_NULL) { Tcg2Configuration.TpmDevice =3D TpmDevice; } @@ -129,7 +129,7 @@ Tcg2ConfigPeimEntryPoint ( Size =3D sizeof(mTpmInstanceId[Index].TpmInstanceGuid); Status =3D PcdSetPtrS (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[In= dex].TpmInstanceGuid); ASSERT_EFI_ERROR (Status); - DEBUG ((EFI_D_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].Tp= mInstanceGuid)); + DEBUG ((DEBUG_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].Tp= mInstanceGuid)); break; } } diff --git a/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c b/SecurityPkg/Tcg/Tc= g2Config/TpmDetection.c index eeaadc5e2f..57d3638f0c 100644 --- a/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c +++ b/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c @@ -47,7 +47,7 @@ DetectTpmDevice ( // In S3, we rely on normal boot Detection, because we save to ReadOnly = Variable in normal boot. // if (BootMode =3D=3D BOOT_ON_S3_RESUME) { - DEBUG ((EFI_D_INFO, "DetectTpmDevice: S3 mode\n")); + DEBUG ((DEBUG_INFO, "DetectTpmDevice: S3 mode\n")); =20 Status =3D PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, = NULL, (VOID **) &VariablePpi); ASSERT_EFI_ERROR (Status); @@ -65,12 +65,12 @@ DetectTpmDevice ( if (!EFI_ERROR (Status) && (Tcg2DeviceDetection.TpmDeviceDetected >=3D TPM_DEVICE_MIN) && (Tcg2DeviceDetection.TpmDeviceDetected <=3D TPM_DEVICE_MAX)) { - DEBUG ((EFI_D_ERROR, "TpmDevice from DeviceDetection: %x\n", Tcg2Dev= iceDetection.TpmDeviceDetected)); + DEBUG ((DEBUG_ERROR, "TpmDevice from DeviceDetection: %x\n", Tcg2Dev= iceDetection.TpmDeviceDetected)); return Tcg2DeviceDetection.TpmDeviceDetected; } } =20 - DEBUG ((EFI_D_INFO, "DetectTpmDevice:\n")); + DEBUG ((DEBUG_INFO, "DetectTpmDevice:\n")); =20 // dTPM available and not disabled by setup // We need check if it is TPM1.2 or TPM2.0 diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tc= g2Dxe.c index 85f2e0ae38..a75d4dad56 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -157,7 +157,7 @@ InternalDumpData ( { UINTN Index; for (Index =3D 0; Index < Size; Index++) { - DEBUG ((EFI_D_INFO, "%02x", (UINTN)Data[Index])); + DEBUG ((DEBUG_INFO, "%02x", (UINTN)Data[Index])); } } =20 @@ -260,15 +260,15 @@ InternalDumpHex ( Count =3D Size / COLUME_SIZE; Left =3D Size % COLUME_SIZE; for (Index =3D 0; Index < Count; Index++) { - DEBUG ((EFI_D_INFO, "%04x: ", Index * COLUME_SIZE)); + DEBUG ((DEBUG_INFO, "%04x: ", Index * COLUME_SIZE)); InternalDumpData (Data + Index * COLUME_SIZE, COLUME_SIZE); - DEBUG ((EFI_D_INFO, "\n")); + DEBUG ((DEBUG_INFO, "\n")); } =20 if (Left !=3D 0) { - DEBUG ((EFI_D_INFO, "%04x: ", Index * COLUME_SIZE)); + DEBUG ((DEBUG_INFO, "%04x: ", Index * COLUME_SIZE)); InternalDumpData (Data + Index * COLUME_SIZE, Left); - DEBUG ((EFI_D_INFO, "\n")); + DEBUG ((DEBUG_INFO, "\n")); } } =20 @@ -401,7 +401,7 @@ Tcg2GetCapability ( ProtocolCapability->StructureVersion.Minor =3D 0; ProtocolCapability->ProtocolVersion.Major =3D 1; ProtocolCapability->ProtocolVersion.Minor =3D 0; - DEBUG ((EFI_D_ERROR, "TreeGetCapability (Compatible) - %r\n", EFI_= SUCCESS)); + DEBUG ((DEBUG_ERROR, "TreeGetCapability (Compatible) - %r\n", EFI_= SUCCESS)); return EFI_SUCCESS; } } @@ -426,15 +426,15 @@ DumpEvent ( { UINTN Index; =20 - DEBUG ((EFI_D_INFO, " Event:\n")); - DEBUG ((EFI_D_INFO, " PCRIndex - %d\n", EventHdr->PCRIndex)); - DEBUG ((EFI_D_INFO, " EventType - 0x%08x\n", EventHdr->EventType)); - DEBUG ((EFI_D_INFO, " Digest - ")); + DEBUG ((DEBUG_INFO, " Event:\n")); + DEBUG ((DEBUG_INFO, " PCRIndex - %d\n", EventHdr->PCRIndex)); + DEBUG ((DEBUG_INFO, " EventType - 0x%08x\n", EventHdr->EventType)); + DEBUG ((DEBUG_INFO, " Digest - ")); for (Index =3D 0; Index < sizeof(TCG_DIGEST); Index++) { - DEBUG ((EFI_D_INFO, "%02x ", EventHdr->Digest.digest[Index])); + DEBUG ((DEBUG_INFO, "%02x ", EventHdr->Digest.digest[Index])); } - DEBUG ((EFI_D_INFO, "\n")); - DEBUG ((EFI_D_INFO, " EventSize - 0x%08x\n", EventHdr->EventSize)); + DEBUG ((DEBUG_INFO, "\n")); + DEBUG ((DEBUG_INFO, " EventSize - 0x%08x\n", EventHdr->EventSize)); InternalDumpHex ((UINT8 *)(EventHdr + 1), EventHdr->EventSize); } =20 @@ -454,33 +454,33 @@ DumpTcgEfiSpecIdEventStruct ( UINT8 *VendorInfo; UINT32 NumberOfAlgorithms; =20 - DEBUG ((EFI_D_INFO, " TCG_EfiSpecIDEventStruct:\n")); - DEBUG ((EFI_D_INFO, " signature - '")); + DEBUG ((DEBUG_INFO, " TCG_EfiSpecIDEventStruct:\n")); + DEBUG ((DEBUG_INFO, " signature - '")); for (Index =3D 0; Index < sizeof(TcgEfiSpecIdEventStruct->signature); In= dex++) { - DEBUG ((EFI_D_INFO, "%c", TcgEfiSpecIdEventStruct->signature[Index])); + DEBUG ((DEBUG_INFO, "%c", TcgEfiSpecIdEventStruct->signature[Index])); } - DEBUG ((EFI_D_INFO, "'\n")); - DEBUG ((EFI_D_INFO, " platformClass - 0x%08x\n", TcgEfiSpecIdEve= ntStruct->platformClass)); - DEBUG ((EFI_D_INFO, " specVersion - %d.%d%d\n", TcgEfiSpecIdEv= entStruct->specVersionMajor, TcgEfiSpecIdEventStruct->specVersionMinor, Tcg= EfiSpecIdEventStruct->specErrata)); - DEBUG ((EFI_D_INFO, " uintnSize - 0x%02x\n", TcgEfiSpecIdEve= ntStruct->uintnSize)); + DEBUG ((DEBUG_INFO, "'\n")); + DEBUG ((DEBUG_INFO, " platformClass - 0x%08x\n", TcgEfiSpecIdEve= ntStruct->platformClass)); + DEBUG ((DEBUG_INFO, " specVersion - %d.%d%d\n", TcgEfiSpecIdEv= entStruct->specVersionMajor, TcgEfiSpecIdEventStruct->specVersionMinor, Tcg= EfiSpecIdEventStruct->specErrata)); + DEBUG ((DEBUG_INFO, " uintnSize - 0x%02x\n", TcgEfiSpecIdEve= ntStruct->uintnSize)); =20 CopyMem (&NumberOfAlgorithms, TcgEfiSpecIdEventStruct + 1, sizeof(Number= OfAlgorithms)); - DEBUG ((EFI_D_INFO, " NumberOfAlgorithms - 0x%08x\n", NumberOfAlgorit= hms)); + DEBUG ((DEBUG_INFO, " NumberOfAlgorithms - 0x%08x\n", NumberOfAlgorit= hms)); =20 DigestSize =3D (TCG_EfiSpecIdEventAlgorithmSize *)((UINT8 *)TcgEfiSpecId= EventStruct + sizeof(*TcgEfiSpecIdEventStruct) + sizeof(NumberOfAlgorithms)= ); for (Index =3D 0; Index < NumberOfAlgorithms; Index++) { - DEBUG ((EFI_D_INFO, " digest(%d)\n", Index)); - DEBUG ((EFI_D_INFO, " algorithmId - 0x%04x\n", DigestSize[In= dex].algorithmId)); - DEBUG ((EFI_D_INFO, " digestSize - 0x%04x\n", DigestSize[In= dex].digestSize)); + DEBUG ((DEBUG_INFO, " digest(%d)\n", Index)); + DEBUG ((DEBUG_INFO, " algorithmId - 0x%04x\n", DigestSize[In= dex].algorithmId)); + DEBUG ((DEBUG_INFO, " digestSize - 0x%04x\n", DigestSize[In= dex].digestSize)); } VendorInfoSize =3D (UINT8 *)&DigestSize[NumberOfAlgorithms]; - DEBUG ((EFI_D_INFO, " VendorInfoSize - 0x%02x\n", *VendorInfoSize= )); + DEBUG ((DEBUG_INFO, " VendorInfoSize - 0x%02x\n", *VendorInfoSize= )); VendorInfo =3D VendorInfoSize + 1; - DEBUG ((EFI_D_INFO, " VendorInfo - ")); + DEBUG ((DEBUG_INFO, " VendorInfo - ")); for (Index =3D 0; Index < *VendorInfoSize; Index++) { - DEBUG ((EFI_D_INFO, "%02x ", VendorInfo[Index])); + DEBUG ((DEBUG_INFO, "%02x ", VendorInfo[Index])); } - DEBUG ((EFI_D_INFO, "\n")); + DEBUG ((DEBUG_INFO, "\n")); } =20 /** @@ -523,34 +523,34 @@ DumpEvent2 ( UINT32 EventSize; UINT8 *EventBuffer; =20 - DEBUG ((EFI_D_INFO, " Event:\n")); - DEBUG ((EFI_D_INFO, " PCRIndex - %d\n", TcgPcrEvent2->PCRIndex)); - DEBUG ((EFI_D_INFO, " EventType - 0x%08x\n", TcgPcrEvent2->EventType)= ); + DEBUG ((DEBUG_INFO, " Event:\n")); + DEBUG ((DEBUG_INFO, " PCRIndex - %d\n", TcgPcrEvent2->PCRIndex)); + DEBUG ((DEBUG_INFO, " EventType - 0x%08x\n", TcgPcrEvent2->EventType)= ); =20 - DEBUG ((EFI_D_INFO, " DigestCount: 0x%08x\n", TcgPcrEvent2->Digest.co= unt)); + DEBUG ((DEBUG_INFO, " DigestCount: 0x%08x\n", TcgPcrEvent2->Digest.co= unt)); =20 DigestCount =3D TcgPcrEvent2->Digest.count; HashAlgo =3D TcgPcrEvent2->Digest.digests[0].hashAlg; DigestBuffer =3D (UINT8 *)&TcgPcrEvent2->Digest.digests[0].digest; for (DigestIndex =3D 0; DigestIndex < DigestCount; DigestIndex++) { - DEBUG ((EFI_D_INFO, " HashAlgo : 0x%04x\n", HashAlgo)); - DEBUG ((EFI_D_INFO, " Digest(%d): ", DigestIndex)); + DEBUG ((DEBUG_INFO, " HashAlgo : 0x%04x\n", HashAlgo)); + DEBUG ((DEBUG_INFO, " Digest(%d): ", DigestIndex)); DigestSize =3D GetHashSizeFromAlgo (HashAlgo); for (Index =3D 0; Index < DigestSize; Index++) { - DEBUG ((EFI_D_INFO, "%02x ", DigestBuffer[Index])); + DEBUG ((DEBUG_INFO, "%02x ", DigestBuffer[Index])); } - DEBUG ((EFI_D_INFO, "\n")); + DEBUG ((DEBUG_INFO, "\n")); // // Prepare next // CopyMem (&HashAlgo, DigestBuffer + DigestSize, sizeof(TPMI_ALG_HASH)); DigestBuffer =3D DigestBuffer + DigestSize + sizeof(TPMI_ALG_HASH); } - DEBUG ((EFI_D_INFO, "\n")); + DEBUG ((DEBUG_INFO, "\n")); DigestBuffer =3D DigestBuffer - sizeof(TPMI_ALG_HASH); =20 CopyMem (&EventSize, DigestBuffer, sizeof(TcgPcrEvent2->EventSize)); - DEBUG ((EFI_D_INFO, " EventSize - 0x%08x\n", EventSize)); + DEBUG ((DEBUG_INFO, " EventSize - 0x%08x\n", EventSize)); EventBuffer =3D DigestBuffer + sizeof(TcgPcrEvent2->EventSize); InternalDumpHex (EventBuffer, EventSize); } @@ -616,7 +616,7 @@ DumpEventLog ( TCG_EfiSpecIDEventStruct *TcgEfiSpecIdEventStruct; UINTN NumberOfEvents; =20 - DEBUG ((EFI_D_INFO, "EventLogFormat: (0x%x)\n", EventLogFormat)); + DEBUG ((DEBUG_INFO, "EventLogFormat: (0x%x)\n", EventLogFormat)); =20 switch (EventLogFormat) { case EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2: @@ -626,11 +626,11 @@ DumpEventLog ( EventHdr =3D (TCG_PCR_EVENT_HDR *)((UINTN)EventHdr + sizeof(TCG_PCR_= EVENT_HDR) + EventHdr->EventSize); } if (FinalEventsTable =3D=3D NULL) { - DEBUG ((EFI_D_INFO, "FinalEventsTable: NOT FOUND\n")); + DEBUG ((DEBUG_INFO, "FinalEventsTable: NOT FOUND\n")); } else { - DEBUG ((EFI_D_INFO, "FinalEventsTable: (0x%x)\n", FinalEventsTabl= e)); - DEBUG ((EFI_D_INFO, " Version: (0x%x)\n", FinalEventsTabl= e->Version)); - DEBUG ((EFI_D_INFO, " NumberOfEvents: (0x%x)\n", FinalEventsTabl= e->NumberOfEvents)); + DEBUG ((DEBUG_INFO, "FinalEventsTable: (0x%x)\n", FinalEventsTabl= e)); + DEBUG ((DEBUG_INFO, " Version: (0x%x)\n", FinalEventsTabl= e->Version)); + DEBUG ((DEBUG_INFO, " NumberOfEvents: (0x%x)\n", FinalEventsTabl= e->NumberOfEvents)); =20 EventHdr =3D (TCG_PCR_EVENT_HDR *)(UINTN)(FinalEventsTable + 1); for (NumberOfEvents =3D 0; NumberOfEvents < FinalEventsTable->Number= OfEvents; NumberOfEvents++) { @@ -656,11 +656,11 @@ DumpEventLog ( } =20 if (FinalEventsTable =3D=3D NULL) { - DEBUG ((EFI_D_INFO, "FinalEventsTable: NOT FOUND\n")); + DEBUG ((DEBUG_INFO, "FinalEventsTable: NOT FOUND\n")); } else { - DEBUG ((EFI_D_INFO, "FinalEventsTable: (0x%x)\n", FinalEventsTabl= e)); - DEBUG ((EFI_D_INFO, " Version: (0x%x)\n", FinalEventsTabl= e->Version)); - DEBUG ((EFI_D_INFO, " NumberOfEvents: (0x%x)\n", FinalEventsTabl= e->NumberOfEvents)); + DEBUG ((DEBUG_INFO, "FinalEventsTable: (0x%x)\n", FinalEventsTabl= e)); + DEBUG ((DEBUG_INFO, " Version: (0x%x)\n", FinalEventsTabl= e->Version)); + DEBUG ((DEBUG_INFO, " NumberOfEvents: (0x%x)\n", FinalEventsTabl= e->NumberOfEvents)); =20 TcgPcrEvent2 =3D (TCG_PCR_EVENT2 *)(UINTN)(FinalEventsTable + 1); for (NumberOfEvents =3D 0; NumberOfEvents < FinalEventsTable->Number= OfEvents; NumberOfEvents++) { @@ -703,7 +703,7 @@ Tcg2GetEventLog ( { UINTN Index; =20 - DEBUG ((EFI_D_INFO, "Tcg2GetEventLog ... (0x%x)\n", EventLogFormat)); + DEBUG ((DEBUG_INFO, "Tcg2GetEventLog ... (0x%x)\n", EventLogFormat)); =20 if (This =3D=3D NULL) { return EFI_INVALID_PARAMETER; @@ -738,7 +738,7 @@ Tcg2GetEventLog ( =20 if (EventLogLocation !=3D NULL) { *EventLogLocation =3D mTcgDxeData.EventLogAreaStruct[Index].Lasa; - DEBUG ((EFI_D_INFO, "Tcg2GetEventLog (EventLogLocation - %x)\n", *Even= tLogLocation)); + DEBUG ((DEBUG_INFO, "Tcg2GetEventLog (EventLogLocation - %x)\n", *Even= tLogLocation)); } =20 if (EventLogLastEntry !=3D NULL) { @@ -747,15 +747,15 @@ Tcg2GetEventLog ( } else { *EventLogLastEntry =3D (EFI_PHYSICAL_ADDRESS)(UINTN)mTcgDxeData.Even= tLogAreaStruct[Index].LastEvent; } - DEBUG ((EFI_D_INFO, "Tcg2GetEventLog (EventLogLastEntry - %x)\n", *Eve= ntLogLastEntry)); + DEBUG ((DEBUG_INFO, "Tcg2GetEventLog (EventLogLastEntry - %x)\n", *Eve= ntLogLastEntry)); } =20 if (EventLogTruncated !=3D NULL) { *EventLogTruncated =3D mTcgDxeData.EventLogAreaStruct[Index].EventLogT= runcated; - DEBUG ((EFI_D_INFO, "Tcg2GetEventLog (EventLogTruncated - %x)\n", *Eve= ntLogTruncated)); + DEBUG ((DEBUG_INFO, "Tcg2GetEventLog (EventLogTruncated - %x)\n", *Eve= ntLogTruncated)); } =20 - DEBUG ((EFI_D_INFO, "Tcg2GetEventLog - %r\n", EFI_SUCCESS)); + DEBUG ((DEBUG_INFO, "Tcg2GetEventLog - %r\n", EFI_SUCCESS)); =20 // Dump Event Log for debug purpose if ((EventLogLocation !=3D NULL) && (EventLogLastEntry !=3D NULL)) { @@ -810,10 +810,10 @@ TcgCommLogEvent ( } =20 if (NewLogSize + *LogSize > MaxSize) { - DEBUG ((EFI_D_INFO, " MaxSize - 0x%x\n", MaxSize)); - DEBUG ((EFI_D_INFO, " NewLogSize - 0x%x\n", NewLogSize)); - DEBUG ((EFI_D_INFO, " LogSize - 0x%x\n", *LogSize)); - DEBUG ((EFI_D_INFO, "TcgCommLogEvent - %r\n", EFI_OUT_OF_RESOURCES)); + DEBUG ((DEBUG_INFO, " MaxSize - 0x%x\n", MaxSize)); + DEBUG ((DEBUG_INFO, " NewLogSize - 0x%x\n", NewLogSize)); + DEBUG ((DEBUG_INFO, " LogSize - 0x%x\n", *LogSize)); + DEBUG ((DEBUG_INFO, "TcgCommLogEvent - %r\n", EFI_OUT_OF_RESOURCES)); return EFI_OUT_OF_RESOURCES; } =20 @@ -926,8 +926,8 @@ TcgDxeLogEvent ( // Increase the NumberOfEvents in FinalEventsTable // (mTcgDxeData.FinalEventsTable[Index])->NumberOfEvents ++; - DEBUG ((EFI_D_INFO, "FinalEventsTable->NumberOfEvents - 0x%x\n", (mT= cgDxeData.FinalEventsTable[Index])->NumberOfEvents)); - DEBUG ((EFI_D_INFO, " Size - 0x%x\n", (UINTN)EventLogAreaStruct->Ev= entLogSize)); + DEBUG ((DEBUG_INFO, "FinalEventsTable->NumberOfEvents - 0x%x\n", (mT= cgDxeData.FinalEventsTable[Index])->NumberOfEvents)); + DEBUG ((DEBUG_INFO, " Size - 0x%x\n", (UINTN)EventLogAreaStruct->Ev= entLogSize)); } } =20 @@ -1047,12 +1047,12 @@ TcgDxeLogHashEvent ( UINT8 *DigestBuffer; UINT32 *EventSizePtr; =20 - DEBUG ((EFI_D_INFO, "SupportedEventLogs - 0x%08x\n", mTcgDxeData.BsCap.S= upportedEventLogs)); + DEBUG ((DEBUG_INFO, "SupportedEventLogs - 0x%08x\n", mTcgDxeData.BsCap.S= upportedEventLogs)); =20 RetStatus =3D EFI_SUCCESS; for (Index =3D 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0= ]); Index++) { if ((mTcgDxeData.BsCap.SupportedEventLogs & mTcg2EventInfo[Index].LogF= ormat) !=3D 0) { - DEBUG ((EFI_D_INFO, " LogFormat - 0x%08x\n", mTcg2EventInfo[Index].= LogFormat)); + DEBUG ((DEBUG_INFO, " LogFormat - 0x%08x\n", mTcg2EventInfo[Index].= LogFormat)); switch (mTcg2EventInfo[Index].LogFormat) { case EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2: Status =3D GetDigestFromDigestList (TPM_ALG_SHA1, DigestList, &New= EventHdr->Digest); @@ -1156,7 +1156,7 @@ TcgDxeHashLogExtendEvent ( } =20 if (Status =3D=3D EFI_DEVICE_ERROR) { - DEBUG ((EFI_D_ERROR, "TcgDxeHashLogExtendEvent - %r. Disable TPM.\n", = Status)); + DEBUG ((DEBUG_ERROR, "TcgDxeHashLogExtendEvent - %r. Disable TPM.\n", = Status)); mTcgDxeData.BsCap.TPMPresentFlag =3D FALSE; REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, @@ -1234,7 +1234,7 @@ Tcg2HashLogExtendEvent ( } } if (Status =3D=3D EFI_DEVICE_ERROR) { - DEBUG ((EFI_D_ERROR, "MeasurePeImageAndExtend - %r. Disable TPM.\n",= Status)); + DEBUG ((DEBUG_ERROR, "MeasurePeImageAndExtend - %r. Disable TPM.\n",= Status)); mTcgDxeData.BsCap.TPMPresentFlag =3D FALSE; REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, @@ -1280,7 +1280,7 @@ Tcg2SubmitCommand ( { EFI_STATUS Status; =20 - DEBUG ((EFI_D_INFO, "Tcg2SubmitCommand ...\n")); + DEBUG ((DEBUG_INFO, "Tcg2SubmitCommand ...\n")); =20 if ((This =3D=3D NULL) || (InputParameterBlockSize =3D=3D 0) || (InputParameterBlock =3D=3D NU= LL) || @@ -1305,7 +1305,7 @@ Tcg2SubmitCommand ( &OutputParameterBlockSize, OutputParameterBlock ); - DEBUG ((EFI_D_INFO, "Tcg2SubmitCommand - %r\n", Status)); + DEBUG ((DEBUG_INFO, "Tcg2SubmitCommand - %r\n", Status)); return Status; } =20 @@ -1351,7 +1351,7 @@ Tcg2SetActivePCRBanks ( EFI_STATUS Status; UINT32 ReturnCode; =20 - DEBUG ((EFI_D_INFO, "Tcg2SetActivePCRBanks ... (0x%x)\n", ActivePcrBanks= )); + DEBUG ((DEBUG_INFO, "Tcg2SetActivePCRBanks ... (0x%x)\n", ActivePcrBanks= )); =20 if (ActivePcrBanks =3D=3D 0) { return EFI_INVALID_PARAMETER; @@ -1378,7 +1378,7 @@ Tcg2SetActivePCRBanks ( Status =3D EFI_DEVICE_ERROR; } =20 - DEBUG ((EFI_D_INFO, "Tcg2SetActivePCRBanks - %r\n", Status)); + DEBUG ((DEBUG_INFO, "Tcg2SetActivePCRBanks - %r\n", Status)); =20 return Status; } @@ -1459,7 +1459,7 @@ SetupEventLog ( UINT32 NumberOfAlgorithms; TCG_EfiStartupLocalityEvent StartupLocalityEvent; =20 - DEBUG ((EFI_D_INFO, "SetupEventLog\n")); + DEBUG ((DEBUG_INFO, "SetupEventLog\n")); =20 // // 1. Create Log Area @@ -1838,7 +1838,7 @@ MeasureSeparatorEvent ( TCG_PCR_EVENT_HDR TcgEvent; UINT32 EventData; =20 - DEBUG ((EFI_D_INFO, "MeasureSeparatorEvent Pcr - %x\n", PCRIndex)); + DEBUG ((DEBUG_INFO, "MeasureSeparatorEvent Pcr - %x\n", PCRIndex)); =20 EventData =3D 0; TcgEvent.PCRIndex =3D PCRIndex; @@ -1883,8 +1883,8 @@ MeasureVariable ( UINTN VarNameLength; UEFI_VARIABLE_DATA *VarLog; =20 - DEBUG ((EFI_D_INFO, "Tcg2Dxe: MeasureVariable (Pcr - %x, EventType - %x,= ", (UINTN)PCRIndex, (UINTN)EventType)); - DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, Ve= ndorGuid)); + DEBUG ((DEBUG_INFO, "Tcg2Dxe: MeasureVariable (Pcr - %x, EventType - %x,= ", (UINTN)PCRIndex, (UINTN)EventType)); + DEBUG ((DEBUG_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, Ve= ndorGuid)); =20 VarNameLength =3D StrLen (VarName); TcgEvent.PCRIndex =3D PCRIndex; @@ -2234,11 +2234,11 @@ MeasureSecureBootPolicy ( =20 if (PcdGetBool (PcdFirmwareDebuggerInitialized)) { Status =3D MeasureLaunchOfFirmwareDebugger (); - DEBUG ((EFI_D_INFO, "MeasureLaunchOfFirmwareDebugger - %r\n", Status)); + DEBUG ((DEBUG_INFO, "MeasureLaunchOfFirmwareDebugger - %r\n", Status)); } =20 Status =3D MeasureAllSecureVariables (); - DEBUG ((EFI_D_INFO, "MeasureAllSecureVariables - %r\n", Status)); + DEBUG ((DEBUG_INFO, "MeasureAllSecureVariables - %r\n", Status)); =20 // // We need measure Separator(7) here, because this event must be between= SecureBootPolicy (Configure) @@ -2247,7 +2247,7 @@ MeasureSecureBootPolicy ( // the Authority measurement happen before ReadToBoot event. // Status =3D MeasureSeparatorEvent (7); - DEBUG ((EFI_D_INFO, "MeasureSeparatorEvent - %r\n", Status)); + DEBUG ((DEBUG_INFO, "MeasureSeparatorEvent - %r\n", Status)); return ; } =20 @@ -2278,7 +2278,7 @@ OnReadyToBoot ( // Status =3D MeasureHandoffTables (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "HOBs not Measured. Error!\n")); + DEBUG ((DEBUG_ERROR, "HOBs not Measured. Error!\n")); } =20 // @@ -2286,7 +2286,7 @@ OnReadyToBoot ( // Status =3D MeasureAllBootVariables (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Boot Variables not Measured. Error!\n")); + DEBUG ((DEBUG_ERROR, "Boot Variables not Measured. Error!\n")); } =20 // @@ -2297,7 +2297,7 @@ OnReadyToBoot ( EFI_CALLING_EFI_APPLICATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_AP= PLICATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_AP= PLICATION)); } =20 // @@ -2331,7 +2331,7 @@ OnReadyToBoot ( EFI_RETURNING_FROM_EFI_APPLICATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_RETURNING_FROM= _EFI_APPLICATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_RETURNING_FROM= _EFI_APPLICATION)); } =20 // @@ -2343,11 +2343,11 @@ OnReadyToBoot ( EFI_CALLING_EFI_APPLICATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_AP= PLICATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_AP= PLICATION)); } } =20 - DEBUG ((EFI_D_INFO, "TPM2 Tcg2Dxe Measure Data when ReadyToBoot\n")); + DEBUG ((DEBUG_INFO, "TPM2 Tcg2Dxe Measure Data when ReadyToBoot\n")); // // Increase boot attempt counter. // @@ -2381,7 +2381,7 @@ OnExitBootServices ( EFI_EXIT_BOOT_SERVICES_INVOCATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_INVOCATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_INVOCATION)); } =20 // @@ -2392,7 +2392,7 @@ OnExitBootServices ( EFI_EXIT_BOOT_SERVICES_SUCCEEDED ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_SUCCEEDED)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_SUCCEEDED)); } } =20 @@ -2422,7 +2422,7 @@ OnExitBootServicesFailed ( EFI_EXIT_BOOT_SERVICES_FAILED ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_FAILED)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_FAILED)); } =20 } @@ -2545,13 +2545,13 @@ DriverEntry ( } =20 if (GetFirstGuidHob (&gTpmErrorHobGuid) !=3D NULL) { - DEBUG ((EFI_D_ERROR, "TPM2 error!\n")); + DEBUG ((DEBUG_ERROR, "TPM2 error!\n")); return EFI_DEVICE_ERROR; } =20 Status =3D Tpm2RequestUseTpm (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "TPM2 not detected!\n")); + DEBUG ((DEBUG_ERROR, "TPM2 not detected!\n")); return Status; } =20 @@ -2566,14 +2566,14 @@ DriverEntry ( mTcgDxeData.BsCap.StructureVersion.Major =3D 1; mTcgDxeData.BsCap.StructureVersion.Minor =3D 1; =20 - DEBUG ((EFI_D_INFO, "Tcg2.ProtocolVersion - %02x.%02x\n", mTcgDxeData.B= sCap.ProtocolVersion.Major, mTcgDxeData.BsCap.ProtocolVersion.Minor)); - DEBUG ((EFI_D_INFO, "Tcg2.StructureVersion - %02x.%02x\n", mTcgDxeData.B= sCap.StructureVersion.Major, mTcgDxeData.BsCap.StructureVersion.Minor)); + DEBUG ((DEBUG_INFO, "Tcg2.ProtocolVersion - %02x.%02x\n", mTcgDxeData.B= sCap.ProtocolVersion.Major, mTcgDxeData.BsCap.ProtocolVersion.Minor)); + DEBUG ((DEBUG_INFO, "Tcg2.StructureVersion - %02x.%02x\n", mTcgDxeData.B= sCap.StructureVersion.Major, mTcgDxeData.BsCap.StructureVersion.Minor)); =20 Status =3D Tpm2GetCapabilityManufactureID (&mTcgDxeData.BsCap.Manufactur= erID); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityManufactureID fail!\n")); + DEBUG ((DEBUG_ERROR, "Tpm2GetCapabilityManufactureID fail!\n")); } else { - DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityManufactureID - %08x\n", mTcgDxe= Data.BsCap.ManufacturerID)); + DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityManufactureID - %08x\n", mTcgDxe= Data.BsCap.ManufacturerID)); } =20 DEBUG_CODE ( @@ -2582,19 +2582,19 @@ DriverEntry ( =20 Status =3D Tpm2GetCapabilityFirmwareVersion (&FirmwareVersion1, &Firmw= areVersion2); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityFirmwareVersion fail!\n")); + DEBUG ((DEBUG_ERROR, "Tpm2GetCapabilityFirmwareVersion fail!\n")); } else { - DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityFirmwareVersion - %08x %08x\n"= , FirmwareVersion1, FirmwareVersion2)); + DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityFirmwareVersion - %08x %08x\n"= , FirmwareVersion1, FirmwareVersion2)); } ); =20 Status =3D Tpm2GetCapabilityMaxCommandResponseSize (&MaxCommandSize, &Ma= xResponseSize); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityMaxCommandResponseSize fail!\n"= )); + DEBUG ((DEBUG_ERROR, "Tpm2GetCapabilityMaxCommandResponseSize fail!\n"= )); } else { mTcgDxeData.BsCap.MaxCommandSize =3D (UINT16)MaxCommandSize; mTcgDxeData.BsCap.MaxResponseSize =3D (UINT16)MaxResponseSize; - DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityMaxCommandResponseSize - %08x, %= 08x\n", MaxCommandSize, MaxResponseSize)); + DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityMaxCommandResponseSize - %08x, %= 08x\n", MaxCommandSize, MaxResponseSize)); } =20 // @@ -2621,7 +2621,7 @@ DriverEntry ( } else { mTcgDxeData.BsCap.NumberOfPCRBanks =3D PcdGet32 (PcdTcg2NumberOfPCRBan= ks); if (PcdGet32 (PcdTcg2NumberOfPCRBanks) > NumberOfPCRBanks) { - DEBUG ((EFI_D_ERROR, "ERROR: PcdTcg2NumberOfPCRBanks(0x%x) > NumberO= fPCRBanks(0x%x)\n", PcdGet32 (PcdTcg2NumberOfPCRBanks), NumberOfPCRBanks)); + DEBUG ((DEBUG_ERROR, "ERROR: PcdTcg2NumberOfPCRBanks(0x%x) > NumberO= fPCRBanks(0x%x)\n", PcdGet32 (PcdTcg2NumberOfPCRBanks), NumberOfPCRBanks)); mTcgDxeData.BsCap.NumberOfPCRBanks =3D NumberOfPCRBanks; } } @@ -2634,10 +2634,10 @@ DriverEntry ( mTcgDxeData.BsCap.SupportedEventLogs &=3D ~EFI_TCG2_EVENT_LOG_FORMAT_T= CG_1_2; } =20 - DEBUG ((EFI_D_INFO, "Tcg2.SupportedEventLogs - 0x%08x\n", mTcgDxeData.Bs= Cap.SupportedEventLogs)); - DEBUG ((EFI_D_INFO, "Tcg2.HashAlgorithmBitmap - 0x%08x\n", mTcgDxeData.B= sCap.HashAlgorithmBitmap)); - DEBUG ((EFI_D_INFO, "Tcg2.NumberOfPCRBanks - 0x%08x\n", mTcgDxeData= .BsCap.NumberOfPCRBanks)); - DEBUG ((EFI_D_INFO, "Tcg2.ActivePcrBanks - 0x%08x\n", mTcgDxeData= .BsCap.ActivePcrBanks)); + DEBUG ((DEBUG_INFO, "Tcg2.SupportedEventLogs - 0x%08x\n", mTcgDxeData.Bs= Cap.SupportedEventLogs)); + DEBUG ((DEBUG_INFO, "Tcg2.HashAlgorithmBitmap - 0x%08x\n", mTcgDxeData.B= sCap.HashAlgorithmBitmap)); + DEBUG ((DEBUG_INFO, "Tcg2.NumberOfPCRBanks - 0x%08x\n", mTcgDxeData= .BsCap.NumberOfPCRBanks)); + DEBUG ((DEBUG_INFO, "Tcg2.ActivePcrBanks - 0x%08x\n", mTcgDxeData= .BsCap.ActivePcrBanks)); =20 if (mTcgDxeData.BsCap.TPMPresentFlag) { // @@ -2694,7 +2694,7 @@ DriverEntry ( // Install Tcg2Protocol // Status =3D InstallTcg2 (); - DEBUG ((EFI_D_INFO, "InstallTcg2 - %r\n", Status)); + DEBUG ((DEBUG_INFO, "InstallTcg2 - %r\n", Status)); =20 return Status; } diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tc= g2Pei.c index f28f33fdec..921adc48f2 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -210,7 +210,7 @@ SyncPcrAllocationsAndPcrMask ( UINT32 Tpm2PcrMask; UINT32 NewTpm2PcrMask; =20 - DEBUG ((EFI_D_ERROR, "SyncPcrAllocationsAndPcrMask!\n")); + DEBUG ((DEBUG_ERROR, "SyncPcrAllocationsAndPcrMask!\n")); =20 // // Determine the current TPM support and the Platform PCR mask. @@ -240,9 +240,9 @@ SyncPcrAllocationsAndPcrMask ( if ((TpmActivePcrBanks & Tpm2PcrMask) !=3D TpmActivePcrBanks) { NewTpmActivePcrBanks =3D TpmActivePcrBanks & Tpm2PcrMask; =20 - DEBUG ((EFI_D_INFO, "%a - Reallocating PCR banks from 0x%X to 0x%X.\n"= , __FUNCTION__, TpmActivePcrBanks, NewTpmActivePcrBanks)); + DEBUG ((DEBUG_INFO, "%a - Reallocating PCR banks from 0x%X to 0x%X.\n"= , __FUNCTION__, TpmActivePcrBanks, NewTpmActivePcrBanks)); if (NewTpmActivePcrBanks =3D=3D 0) { - DEBUG ((EFI_D_ERROR, "%a - No viable PCRs active! Please set a less = restrictive value for PcdTpm2HashMask!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - No viable PCRs active! Please set a less = restrictive value for PcdTpm2HashMask!\n", __FUNCTION__)); ASSERT (FALSE); } else { Status =3D Tpm2PcrAllocateBanks (NULL, (UINT32)TpmHashAlgorithmBitma= p, NewTpmActivePcrBanks); @@ -250,7 +250,7 @@ SyncPcrAllocationsAndPcrMask ( // // We can't do much here, but we hope that this doesn't happen. // - DEBUG ((EFI_D_ERROR, "%a - Failed to reallocate PCRs!\n", __FUNCTI= ON__)); + DEBUG ((DEBUG_ERROR, "%a - Failed to reallocate PCRs!\n", __FUNCTI= ON__)); ASSERT_EFI_ERROR (Status); } // @@ -267,9 +267,9 @@ SyncPcrAllocationsAndPcrMask ( if ((Tpm2PcrMask & TpmHashAlgorithmBitmap) !=3D Tpm2PcrMask) { NewTpm2PcrMask =3D Tpm2PcrMask & TpmHashAlgorithmBitmap; =20 - DEBUG ((EFI_D_INFO, "%a - Updating PcdTpm2HashMask from 0x%X to 0x%X.\= n", __FUNCTION__, Tpm2PcrMask, NewTpm2PcrMask)); + DEBUG ((DEBUG_INFO, "%a - Updating PcdTpm2HashMask from 0x%X to 0x%X.\= n", __FUNCTION__, Tpm2PcrMask, NewTpm2PcrMask)); if (NewTpm2PcrMask =3D=3D 0) { - DEBUG ((EFI_D_ERROR, "%a - No viable PCRs supported! Please set a le= ss restrictive value for PcdTpm2HashMask!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - No viable PCRs supported! Please set a le= ss restrictive value for PcdTpm2HashMask!\n", __FUNCTION__)); ASSERT (FALSE); } =20 @@ -308,7 +308,7 @@ LogHashEvent ( RetStatus =3D EFI_SUCCESS; for (Index =3D 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0= ]); Index++) { if ((SupportedEventLogs & mTcg2EventInfo[Index].LogFormat) !=3D 0) { - DEBUG ((EFI_D_INFO, " LogFormat - 0x%08x\n", mTcg2EventInfo[Index].= LogFormat)); + DEBUG ((DEBUG_INFO, " LogFormat - 0x%08x\n", mTcg2EventInfo[Index].= LogFormat)); switch (mTcg2EventInfo[Index].LogFormat) { case EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2: Status =3D GetDigestFromDigestList (TPM_ALG_SHA1, DigestList, &New= EventHdr->Digest); @@ -403,7 +403,7 @@ HashLogExtendEvent ( } =20 if (Status =3D=3D EFI_DEVICE_ERROR) { - DEBUG ((EFI_D_ERROR, "HashLogExtendEvent - %r. Disable TPM.\n", Status= )); + DEBUG ((DEBUG_ERROR, "HashLogExtendEvent - %r. Disable TPM.\n", Status= )); BuildGuidHob (&gTpmErrorHobGuid,0); REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, @@ -851,7 +851,7 @@ PeimEntryMA ( } =20 if (GetFirstGuidHob (&gTpmErrorHobGuid) !=3D NULL) { - DEBUG ((EFI_D_ERROR, "TPM2 error!\n")); + DEBUG ((DEBUG_ERROR, "TPM2 error!\n")); return EFI_DEVICE_ERROR; } =20 @@ -915,7 +915,7 @@ PeimEntryMA ( for (PcrIndex =3D 0; PcrIndex < 8; PcrIndex++) { Status =3D MeasureSeparatorEventWithError (PcrIndex); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Separator Event with Error not Measured. E= rror!\n")); + DEBUG ((DEBUG_ERROR, "Separator Event with Error not Measured. E= rror!\n")); } } } @@ -946,7 +946,7 @@ PeimEntryMA ( =20 Done: if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "TPM2 error! Build Hob\n")); + DEBUG ((DEBUG_ERROR, "TPM2 error! Build Hob\n")); BuildGuidHob (&gTpmErrorHobGuid,0); REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tc= g2Smm.c index 14e4ed0ee1..8e5c05d456 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c @@ -155,7 +155,7 @@ MemoryClearCallback ( ); if (EFI_ERROR (Status)) { mTcgNvs->MemoryClear.ReturnCode =3D MOR_REQUEST_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] Get MOR variable failure! Status =3D %r\= n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Get MOR variable failure! Status =3D %r\= n", Status)); return EFI_SUCCESS; } =20 @@ -165,7 +165,7 @@ MemoryClearCallback ( MorControl &=3D ~MOR_CLEAR_MEMORY_BIT_MASK; } else { mTcgNvs->MemoryClear.ReturnCode =3D MOR_REQUEST_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] MOR Parameter error! Parameter =3D %x\n", = mTcgNvs->MemoryClear.Parameter)); + DEBUG ((DEBUG_ERROR, "[TPM] MOR Parameter error! Parameter =3D %x\n", = mTcgNvs->MemoryClear.Parameter)); return EFI_SUCCESS; } =20 @@ -179,7 +179,7 @@ MemoryClearCallback ( ); if (EFI_ERROR (Status)) { mTcgNvs->MemoryClear.ReturnCode =3D MOR_REQUEST_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Set MOR variable failure! Status =3D %r\n"= , Status)); } =20 return EFI_SUCCESS; @@ -259,7 +259,7 @@ UpdatePPVersion ( DataPtr +=3D 1) { if (AsciiStrCmp((CHAR8 *)DataPtr, PHYSICAL_PRESENCE_VERSION_TAG) =3D= =3D 0) { Status =3D AsciiStrCpyS((CHAR8 *)DataPtr, PHYSICAL_PRESENCE_VERSION_= SIZE, PPVer); - DEBUG((EFI_D_INFO, "TPM2 Physical Presence Interface Version update = status 0x%x\n", Status)); + DEBUG((DEBUG_INFO, "TPM2 Physical Presence Interface Version update = status 0x%x\n", Status)); return Status; } } @@ -548,7 +548,7 @@ UpdateHID ( // Status =3D Tpm2GetCapabilityManufactureID(&ManufacturerID); if (!EFI_ERROR(Status)) { - DEBUG((EFI_D_INFO, "TPM_PT_MANUFACTURER 0x%08x\n", ManufacturerID)); + DEBUG((DEBUG_INFO, "TPM_PT_MANUFACTURER 0x%08x\n", ManufacturerID)); // // ManufacturerID defined in TCG Vendor ID Registry // may tailed with 0x00 or 0x20 @@ -568,15 +568,15 @@ UpdateHID ( PnpHID =3D FALSE; } } else { - DEBUG ((EFI_D_ERROR, "Get TPM_PT_MANUFACTURER failed %x!\n", Status)); + DEBUG ((DEBUG_ERROR, "Get TPM_PT_MANUFACTURER failed %x!\n", Status)); ASSERT(FALSE); return Status; } =20 Status =3D Tpm2GetCapabilityFirmwareVersion(&FirmwareVersion1, &Firmware= Version2); if (!EFI_ERROR(Status)) { - DEBUG((EFI_D_INFO, "TPM_PT_FIRMWARE_VERSION_1 0x%x\n", FirmwareVersion= 1)); - DEBUG((EFI_D_INFO, "TPM_PT_FIRMWARE_VERSION_2 0x%x\n", FirmwareVersion= 2)); + DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_1 0x%x\n", FirmwareVersion= 1)); + DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_2 0x%x\n", FirmwareVersion= 2)); // // #### is Firmware Version 1 // @@ -587,7 +587,7 @@ UpdateHID ( } =20 } else { - DEBUG ((EFI_D_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X failed %x!\n", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X failed %x!\n", Sta= tus)); ASSERT(FALSE); return Status; } @@ -615,7 +615,7 @@ UpdateHID ( } } =20 - DEBUG((EFI_D_ERROR, "TPM2 ACPI HID TAG for patch not found!\n")); + DEBUG((DEBUG_ERROR, "TPM2 ACPI HID TAG for patch not found!\n")); return EFI_NOT_FOUND; } =20 @@ -801,7 +801,7 @@ PublishTpm2 ( case Tpm2PtpInterfaceTis: break; default: - DEBUG((EFI_D_ERROR, "TPM2 InterfaceType get error! %d\n", InterfaceTyp= e)); + DEBUG((DEBUG_ERROR, "TPM2 InterfaceType get error! %d\n", InterfaceTyp= e)); break; } =20 @@ -855,7 +855,7 @@ InitializeTcgSmm ( EFI_HANDLE SwHandle; =20 if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceT= pm20DtpmGuid)){ - DEBUG ((EFI_D_ERROR, "No TPM2 DTPM instance required!\n")); + DEBUG ((DEBUG_ERROR, "No TPM2 DTPM instance required!\n")); return EFI_UNSUPPORTED; } =20 diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c b/SecurityPkg/T= cg/TcgConfigDxe/TcgConfigDriver.c index fb06624fdb..3416e8cf38 100644 --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c @@ -33,13 +33,13 @@ TcgConfigDriverEntryPoint ( EFI_TCG_PROTOCOL *TcgProtocol; =20 if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceT= pm12Guid)){ - DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n")); + DEBUG ((DEBUG_ERROR, "No TPM12 instance required!\n")); return EFI_UNSUPPORTED; } =20 Status =3D Tpm12RequestUseTpm (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "TPM not detected!\n")); + DEBUG ((DEBUG_ERROR, "TPM not detected!\n")); return Status; } =20 diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDx= e.c index 6feb886308..a364cd07c5 100644 --- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c +++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c @@ -588,7 +588,7 @@ TcgDxeHashLogExtendEventI ( =20 Done: if ((Status =3D=3D EFI_DEVICE_ERROR) || (Status =3D=3D EFI_TIMEOUT)) { - DEBUG ((EFI_D_ERROR, "TcgDxeHashLogExtendEventI - %r. Disable TPM.\n",= Status)); + DEBUG ((DEBUG_ERROR, "TcgDxeHashLogExtendEventI - %r. Disable TPM.\n",= Status)); TcgData->BsCap.TPMPresentFlag =3D FALSE; REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, @@ -1127,7 +1127,7 @@ OnReadyToBoot ( // Status =3D MeasureHandoffTables (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "HOBs not Measured. Error!\n")); + DEBUG ((DEBUG_ERROR, "HOBs not Measured. Error!\n")); } =20 // @@ -1135,7 +1135,7 @@ OnReadyToBoot ( // Status =3D MeasureAllBootVariables (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Boot Variables not Measured. Error!\n")); + DEBUG ((DEBUG_ERROR, "Boot Variables not Measured. Error!\n")); } =20 // @@ -1145,7 +1145,7 @@ OnReadyToBoot ( EFI_CALLING_EFI_APPLICATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_AP= PLICATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_CALLING_EFI_AP= PLICATION)); } =20 // @@ -1177,11 +1177,11 @@ OnReadyToBoot ( EFI_RETURNING_FROM_EFI_APPLICATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_RETURNING_FROM= _EFI_APPLICATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_RETURNING_FROM= _EFI_APPLICATION)); } } =20 - DEBUG ((EFI_D_INFO, "TPM TcgDxe Measure Data when ReadyToBoot\n")); + DEBUG ((DEBUG_INFO, "TPM TcgDxe Measure Data when ReadyToBoot\n")); // // Increase boot attempt counter. // @@ -1260,7 +1260,7 @@ InstallAcpiTable ( } =20 if (EFI_ERROR (Status)) { - DEBUG((EFI_D_ERROR, "Tcg Acpi Table installation failure")); + DEBUG((DEBUG_ERROR, "Tcg Acpi Table installation failure")); } } =20 @@ -1289,7 +1289,7 @@ OnExitBootServices ( EFI_EXIT_BOOT_SERVICES_INVOCATION ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_INVOCATION)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_INVOCATION)); } =20 // @@ -1299,7 +1299,7 @@ OnExitBootServices ( EFI_EXIT_BOOT_SERVICES_SUCCEEDED ); if (EFI_ERROR (Status)){ - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_SUCCEEDED)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_SUCCEEDED)); } } =20 @@ -1328,7 +1328,7 @@ OnExitBootServicesFailed ( EFI_EXIT_BOOT_SERVICES_FAILED ); if (EFI_ERROR (Status)){ - DEBUG ((EFI_D_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_FAILED)); + DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVIC= ES_FAILED)); } } =20 @@ -1381,25 +1381,25 @@ DriverEntry ( VOID *Registration; =20 if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceT= pm12Guid)){ - DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n")); + DEBUG ((DEBUG_ERROR, "No TPM12 instance required!\n")); return EFI_UNSUPPORTED; } =20 if (GetFirstGuidHob (&gTpmErrorHobGuid) !=3D NULL) { - DEBUG ((EFI_D_ERROR, "TPM error!\n")); + DEBUG ((DEBUG_ERROR, "TPM error!\n")); return EFI_DEVICE_ERROR; } =20 Status =3D Tpm12RequestUseTpm (); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "TPM not detected!\n")); + DEBUG ((DEBUG_ERROR, "TPM not detected!\n")); return Status; } =20 Status =3D GetTpmStatus (&mTcgDxeData.BsCap.TPMDeactivatedFlag); if (EFI_ERROR (Status)) { DEBUG (( - EFI_D_ERROR, + DEBUG_ERROR, "DriverEntry: TPM not working properly\n" )); return Status; diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPe= i.c index 0adfcc50c5..203615d0ab 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.c +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c @@ -307,7 +307,7 @@ HashLogExtendEvent ( =20 Done: if ((Status =3D=3D EFI_DEVICE_ERROR) || (Status =3D=3D EFI_TIMEOUT)) { - DEBUG ((EFI_D_ERROR, "HashLogExtendEvent - %r. Disable TPM.\n", Status= )); + DEBUG ((DEBUG_ERROR, "HashLogExtendEvent - %r. Disable TPM.\n", Status= )); BuildGuidHob (&gTpmErrorHobGuid,0); REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, @@ -768,12 +768,12 @@ PeimEntryMA ( EFI_BOOT_MODE BootMode; =20 if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceT= pm12Guid)){ - DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n")); + DEBUG ((DEBUG_ERROR, "No TPM12 instance required!\n")); return EFI_UNSUPPORTED; } =20 if (GetFirstGuidHob (&gTpmErrorHobGuid) !=3D NULL) { - DEBUG ((EFI_D_ERROR, "TPM error!\n")); + DEBUG ((DEBUG_ERROR, "TPM error!\n")); return EFI_DEVICE_ERROR; } =20 @@ -837,7 +837,7 @@ PeimEntryMA ( =20 Done: if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "TPM error! Build Hob\n")); + DEBUG ((DEBUG_ERROR, "TPM error! Build Hob\n")); BuildGuidHob (&gTpmErrorHobGuid,0); REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MINOR, diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.c b/SecurityPkg/Tcg/TcgSmm/TcgSm= m.c index a60efc7d69..4032586f12 100644 --- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.c +++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.c @@ -62,13 +62,13 @@ PhysicalPresenceCallback ( &PpData ); =20 - DEBUG ((EFI_D_INFO, "[TPM] PP callback, Parameter =3D %x\n", mTcgNvs->Ph= ysicalPresence.Parameter)); + DEBUG ((DEBUG_INFO, "[TPM] PP callback, Parameter =3D %x\n", mTcgNvs->Ph= ysicalPresence.Parameter)); if (mTcgNvs->PhysicalPresence.Parameter =3D=3D ACPI_FUNCTION_RETURN_REQU= EST_RESPONSE_TO_OS) { if (EFI_ERROR (Status)) { mTcgNvs->PhysicalPresence.ReturnCode =3D PP_RETURN_TPM_OPERATION_RE= SPONSE_FAILURE; mTcgNvs->PhysicalPresence.LastRequest =3D 0; mTcgNvs->PhysicalPresence.Response =3D 0; - DEBUG ((EFI_D_ERROR, "[TPM] Get PP variable failure! Status =3D %r\n= ", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Get PP variable failure! Status =3D %r\n= ", Status)); return EFI_SUCCESS; } mTcgNvs->PhysicalPresence.ReturnCode =3D PP_RETURN_TPM_OPERATION_RESP= ONSE_SUCCESS; @@ -78,7 +78,7 @@ PhysicalPresenceCallback ( || (mTcgNvs->PhysicalPresence.Parameter =3D=3D ACPI_FUNCTION_SUB= MIT_REQUEST_TO_BIOS_2)) { if (EFI_ERROR (Status)) { mTcgNvs->PhysicalPresence.ReturnCode =3D TCG_PP_SUBMIT_REQUEST_TO_PR= EOS_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] Get PP variable failure! Status =3D %r\n= ", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Get PP variable failure! Status =3D %r\n= ", Status)); return EFI_SUCCESS; } if (mTcgNvs->PhysicalPresence.Request =3D=3D PHYSICAL_PRESENCE_SET_OPE= RATOR_AUTH) { @@ -124,7 +124,7 @@ PhysicalPresenceCallback ( } else if (mTcgNvs->PhysicalPresence.Parameter =3D=3D ACPI_FUNCTION_GET_= USER_CONFIRMATION_STATUS_FOR_REQUEST) { if (EFI_ERROR (Status)) { mTcgNvs->PhysicalPresence.ReturnCode =3D TCG_PP_GET_USER_CONFIRMATIO= N_BLOCKED_BY_BIOS_CONFIGURATION; - DEBUG ((EFI_D_ERROR, "[TPM] Get PP variable failure! Status =3D %r\n= ", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Get PP variable failure! Status =3D %r\n= ", Status)); return EFI_SUCCESS; } // @@ -140,7 +140,7 @@ PhysicalPresenceCallback ( ); if (EFI_ERROR (Status)) { mTcgNvs->PhysicalPresence.ReturnCode =3D TCG_PP_GET_USER_CONFIRMATIO= N_BLOCKED_BY_BIOS_CONFIGURATION; - DEBUG ((EFI_D_ERROR, "[TPM] Get PP flags failure! Status =3D %r\n", = Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Get PP flags failure! Status =3D %r\n", = Status)); return EFI_SUCCESS; } =20 @@ -257,7 +257,7 @@ MemoryClearCallback ( ); if (EFI_ERROR (Status)) { mTcgNvs->MemoryClear.ReturnCode =3D MOR_REQUEST_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] Get MOR variable failure! Status =3D %r\= n", Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Get MOR variable failure! Status =3D %r\= n", Status)); return EFI_SUCCESS; } =20 @@ -267,7 +267,7 @@ MemoryClearCallback ( MorControl &=3D ~MOR_CLEAR_MEMORY_BIT_MASK; } else { mTcgNvs->MemoryClear.ReturnCode =3D MOR_REQUEST_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] MOR Parameter error! Parameter =3D %x\n", = mTcgNvs->MemoryClear.Parameter)); + DEBUG ((DEBUG_ERROR, "[TPM] MOR Parameter error! Parameter =3D %x\n", = mTcgNvs->MemoryClear.Parameter)); return EFI_SUCCESS; } =20 @@ -281,7 +281,7 @@ MemoryClearCallback ( ); if (EFI_ERROR (Status)) { mTcgNvs->MemoryClear.ReturnCode =3D MOR_REQUEST_GENERAL_FAILURE; - DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status =3D %r\n"= , Status)); + DEBUG ((DEBUG_ERROR, "[TPM] Set MOR variable failure! Status =3D %r\n"= , Status)); } =20 return EFI_SUCCESS; @@ -424,7 +424,7 @@ InitializeTcgSmm ( EFI_HANDLE SwHandle; =20 if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceT= pm12Guid)){ - DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n")); + DEBUG ((DEBUG_ERROR, "No TPM12 instance required!\n")); return EFI_UNSUPPORTED; } =20 diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.c index a15038da12..7e018ce95d 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c @@ -341,7 +341,7 @@ DeleteVariable ( =20 Status =3D CreateTimeBasedPayload (&DataSize, &Data); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); return Status; } =20 @@ -500,11 +500,11 @@ EnrollPlatformKey ( } FilePostFix =3D Private->FileContext->FileName + NameLength - 4; if (!IsDerEncodeCertificate(FilePostFix)) { - DEBUG ((EFI_D_ERROR, "Unsupported file type, only DER encoded certific= ate (%s) is supported.", mSupportX509Suffix)); + DEBUG ((DEBUG_ERROR, "Unsupported file type, only DER encoded certific= ate (%s) is supported.", mSupportX509Suffix)); return EFI_INVALID_PARAMETER; } - DEBUG ((EFI_D_INFO, "FileName=3D %s\n", Private->FileContext->FileName)); - DEBUG ((EFI_D_INFO, "FilePostFix =3D %s\n", FilePostFix)); + DEBUG ((DEBUG_INFO, "FileName=3D %s\n", Private->FileContext->FileName)); + DEBUG ((DEBUG_INFO, "FilePostFix =3D %s\n", FilePostFix)); =20 // // Prase the selected PK file and generature PK certificate list. @@ -526,7 +526,7 @@ EnrollPlatformKey ( DataSize =3D PkCert->SignatureListSize; Status =3D CreateTimeBasedPayload (&DataSize, (UINT8**) &PkCert); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); goto ON_EXIT; } =20 @@ -539,7 +539,7 @@ EnrollPlatformKey ( ); if (EFI_ERROR (Status)) { if (Status =3D=3D EFI_OUT_OF_RESOURCES) { - DEBUG ((EFI_D_ERROR, "Enroll PK failed with out of resource.\n")); + DEBUG ((DEBUG_ERROR, "Enroll PK failed with out of resource.\n")); } goto ON_EXIT; } @@ -694,7 +694,7 @@ EnrollRsa2048ToKek ( | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTHE= NTICATED_WRITE_ACCESS; Status =3D CreateTimeBasedPayload (&KekSigListSize, (UINT8**) &KekSigLis= t); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); goto ON_EXIT; } =20 @@ -818,7 +818,7 @@ EnrollX509ToKek ( | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTH= ENTICATED_WRITE_ACCESS; Status =3D CreateTimeBasedPayload (&KekSigListSize, (UINT8**) &KekSigLis= t); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); goto ON_EXIT; } =20 @@ -991,7 +991,7 @@ EnrollX509toSigDB ( | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTH= ENTICATED_WRITE_ACCESS; Status =3D CreateTimeBasedPayload (&SigDBSize, (UINT8**) &Data); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); goto ON_EXIT; } =20 @@ -2337,7 +2337,7 @@ EnrollImageSignatureToSigDB ( | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTH= ENTICATED_WRITE_ACCESS; Status =3D CreateTimeBasedPayload (&SigDBSize, (UINT8**) &Data); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", Sta= tus)); goto ON_EXIT; } =20 @@ -2794,7 +2794,7 @@ DeleteKeyExchangeKey ( if ((Attr & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) !=3D 0) { Status =3D CreateTimeBasedPayload (&DataSize, &OldData); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", S= tatus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", S= tatus)); goto ON_EXIT; } } @@ -2995,7 +2995,7 @@ DeleteSignature ( if ((Attr & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) !=3D 0) { Status =3D CreateTimeBasedPayload (&DataSize, &OldData); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fail to create time-based data payload: %r", S= tatus)); + DEBUG ((DEBUG_ERROR, "Fail to create time-based data payload: %r", S= tatus)); goto ON_EXIT; } } --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49355): https://edk2.groups.io/g/devel/message/49355 Mute This Topic: https://groups.io/mt/36446732/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 01:26:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49356+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49356+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571765841; cv=none; d=zoho.com; s=zohoarc; b=YW2UU+Dw2u4+6vthJ7sR3+6knSnUN+g3hWEsiFDGuwn6YXVt7gGvQtCIM+Zixbc4h7Vp88TGxVA8ubD0XG3D2KGXSNRjol2oZSs/+m2y4DfZoWA+S9UK+zIjzIzvxQuZ/VYt+Jsim3NdbSIV830y3wxaEAE4O3SWcI4REWW1avA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571765841; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=OYNoUaNopd2lltwtfmO1bSuZwLmHVSq2y8vQkwJnZzs=; b=bXrEYShq+4Z2AnKTizz1FdKRx8V6B+NIFNAt8rJ58x3s/F9poBZTyIfacVz2TQh6feYZS0tzEEyihYxziN+GOZMsc+L0rCQmPZ7NnlhJ+YnOXiBet0IPOympfgBKuQF3GRpXlqHHQGT7tZK/fM2SA1wOUYyQobiHsdZw3lsHV+8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49356+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1571765841639871.2924585351295; Tue, 22 Oct 2019 10:37:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5uSPYY1788612xx8GCk1Jqdd; Tue, 22 Oct 2019 10:37:20 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web10.684.1571765838571377049 for ; Tue, 22 Oct 2019 10:37:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 10:37:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,217,1569308400"; d="scan'208";a="209764523" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.156]) by orsmga002.jf.intel.com with ESMTP; 22 Oct 2019 10:37:18 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Sean Brogan , Jiewen Yao , Jian J Wang , Chao Zhang Subject: [edk2-devel] [Patch v2 2/2] SecurityPkg: Fix spelling errors Date: Tue, 22 Oct 2019 10:37:16 -0700 Message-Id: <20191022173716.27700-3-michael.d.kinney@intel.com> In-Reply-To: <20191022173716.27700-1-michael.d.kinney@intel.com> References: <20191022173716.27700-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: slWWbHCRwOw5GFjaB6h1qduzx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571765840; bh=NOPAGM1z9LjiZ6EMNDZu/sKJ6awPTaOwlb0SjD65rBg=; h=Cc:Date:From:Reply-To:Subject:To; b=gbrrV92Z3Ag/oYfsqNHDUH1sxm1lWvOAaZtEDyZDD4abdKQ1/HZxDf6OfMxxz9YI+r4 T5WLteZI3N/iADNP9XTrx8w+0bgpXy/BBZz4iO3QISvtbvSe7neTEZX6qLLEutaZIDiGN pferyK0qJuNu03zUGWVucoebZxvDs4NnWpM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Sean Brogan https://bugzilla.tianocore.org/show_bug.cgi?id=3D2265 Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Michael D Kinney --- SecurityPkg/FvReportPei/FvReportPei.c | 4 ++-- SecurityPkg/Hash2DxeCrypto/Driver.c | 6 ++--- SecurityPkg/Hash2DxeCrypto/Driver.h | 4 ++-- SecurityPkg/HddPassword/HddPasswordDxe.c | 10 ++++---- SecurityPkg/HddPassword/HddPasswordDxe.h | 2 +- .../HddPassword/HddPasswordStrings.uni | 2 +- .../Guid/AuthenticatedVariableFormat.h | 2 +- .../Include/Library/Tcg2PhysicalPresenceLib.h | 4 ++-- .../Include/Library/TcgStorageCoreLib.h | 12 +++++----- SecurityPkg/Include/Library/Tpm2CommandLib.h | 2 +- SecurityPkg/Include/Library/TpmCommLib.h | 2 +- .../Ppi/FirmwareVolumeInfoPrehashedFV.h | 4 ++-- .../Library/AuthVariableLib/AuthService.c | 4 ++-- .../AuthVariableLib/AuthServiceInternal.h | 2 +- .../Library/AuthVariableLib/AuthVariableLib.c | 4 ++-- .../DxeImageAuthenticationStatusLib.c | 2 +- .../DxeImageVerificationLib.c | 10 ++++---- .../DxeRsa2048Sha256GuidedSectionExtractLib.c | 4 ++-- ...xeRsa2048Sha256GuidedSectionExtractLib.inf | 2 +- ...xeRsa2048Sha256GuidedSectionExtractLib.uni | 2 +- .../DxeTpm2MeasureBootLib.c | 4 ++-- .../DxeTpmMeasureBootLib.c | 4 ++-- .../DxeTpmMeasurementLib.c | 2 +- .../HashInstanceLibSha1/HashInstanceLibSha1.c | 2 +- .../HashInstanceLibSha256.c | 2 +- .../HashInstanceLibSha384.c | 2 +- .../HashInstanceLibSha512.c | 2 +- SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c | 2 +- .../PeiRsa2048Sha256GuidedSectionExtractLib.c | 4 ++-- ...eiRsa2048Sha256GuidedSectionExtractLib.inf | 2 +- ...eiRsa2048Sha256GuidedSectionExtractLib.uni | 2 +- .../TcgStorageCoreLib/TcgStorageCore.c | 10 ++++---- .../TcgStorageCoreLib/TcgStorageUtil.c | 2 +- .../TcgStorageOpalLib/TcgStorageOpalUtil.c | 6 ++--- .../Library/Tpm12CommandLib/Tpm12NvStorage.c | 2 +- .../Library/Tpm12DeviceLibDTpm/Tpm12Tis.c | 2 +- .../Library/Tpm2CommandLib/Tpm2Capability.c | 4 ++-- .../Library/Tpm2CommandLib/Tpm2Hierarchy.c | 2 +- .../Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c | 2 +- .../Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c | 2 +- .../Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 4 ++-- .../Library/Tpm2DeviceLibDTpm/Tpm2Tis.c | 4 ++-- SecurityPkg/Library/TpmCommLib/CommonHeader.h | 2 +- SecurityPkg/Library/TpmCommLib/TisPc.c | 2 +- .../Pkcs7VerifyDxe/Pkcs7VerifyDxe.c | 18 +++++++------- .../RandomNumberGenerator/RngDxe/RdRand.c | 2 +- SecurityPkg/SecurityPkg.dec | 18 +++++++------- SecurityPkg/SecurityPkg.dsc | 2 +- SecurityPkg/SecurityPkg.uni | 12 +++++----- .../Tcg/MemoryOverwriteControl/TcgMor.c | 6 ++--- .../Tcg/MemoryOverwriteControl/TcgMor.inf | 2 +- .../Tcg/MemoryOverwriteControl/TcgMor.uni | 2 +- .../TcgMorLock.c | 4 ++-- .../TcgMorLock.h | 2 +- .../TcgMorLock.uni | 4 ++-- .../TcgMorLockSmm.inf | 2 +- .../Tcg/Opal/OpalPassword/OpalDriver.c | 6 ++--- .../Tcg/Opal/OpalPassword/OpalDriver.h | 6 ++--- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 10 ++++---- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h | 8 +++---- .../PhysicalPresencePei/PhysicalPresencePei.c | 2 +- SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 6 ++--- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c | 2 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 ++-- SecurityPkg/Tcg/Tcg2Dxe/MeasureBootPeCoff.c | 2 +- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 2 +- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 16 ++++++------- SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 22 ++++++++--------- SecurityPkg/Tcg/Tcg2Smm/Tpm.asl | 6 ++--- .../Tcg/TcgConfigDxe/TcgConfigDriver.c | 2 +- SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 6 ++--- SecurityPkg/Tcg/TcgPei/TcgPei.c | 18 +++++++------- SecurityPkg/Tcg/TcgSmm/Tpm.asl | 6 ++--- .../SecureBootConfigDriver.c | 2 +- .../SecureBootConfigDxe.inf | 2 +- .../SecureBootConfigDxe.uni | 2 +- .../SecureBootConfigImpl.c | 24 +++++++++---------- .../SecureBootConfigImpl.h | 10 ++++---- .../SecureBootConfigMisc.c | 8 +++---- .../SecureBootConfigNvData.h | 4 ++-- .../SecureBootConfigStrings.uni | 4 ++-- 81 files changed, 205 insertions(+), 205 deletions(-) diff --git a/SecurityPkg/FvReportPei/FvReportPei.c b/SecurityPkg/FvReportPe= i/FvReportPei.c index d24470af6b..d709760ea3 100644 --- a/SecurityPkg/FvReportPei/FvReportPei.c +++ b/SecurityPkg/FvReportPei/FvReportPei.c @@ -145,7 +145,7 @@ VerifyHashedFv ( ASSERT (HashValue !=3D NULL); =20 // - // Calcuate hash value for each FV first. + // Calculate hash value for each FV first. // FvHashValue =3D HashValue; for (FvIndex =3D 0; FvIndex < FvNumber; ++FvIndex) { @@ -281,7 +281,7 @@ ReportHashedFv ( @param[in] StoredHashFvPpi Pointer to PPI containing hash information. @param[in] BootMode Current boot mode. =20 - @retval Pointer to structure containning valid hash information for curr= ent boot mode. + @retval Pointer to structure containing valid hash information for curre= nt boot mode. @retval NULL if there's no hash associated with current boot mode. **/ STATIC diff --git a/SecurityPkg/Hash2DxeCrypto/Driver.c b/SecurityPkg/Hash2DxeCryp= to/Driver.c index a6c5a2c0af..0d123b2a2f 100644 --- a/SecurityPkg/Hash2DxeCrypto/Driver.c +++ b/SecurityPkg/Hash2DxeCrypto/Driver.c @@ -22,7 +22,7 @@ EFI_SERVICE_BINDING_PROTOCOL mHash2ServiceBindingProto= col =3D { it is not NULL, then the I/O services= are added to the existing child handle. =20 - @retval EFI_SUCCES The protocol was added to ChildHandle. + @retval EFI_SUCCESS The protocol was added to ChildHandle. @retval EFI_INVALID_PARAMETER ChildHandle is NULL. @retval EFI_OUT_OF_RESOURCES There are not enough resources availa= ble to create the child. @@ -99,7 +99,7 @@ Hash2ServiceBindingCreateChild ( instance. @param[in] ChildHandle Handle of the child to destroy. =20 - @retval EFI_SUCCES The protocol was removed from ChildHandle. + @retval EFI_SUCCESS The protocol was removed from ChildHandle. @retval EFI_UNSUPPORTED ChildHandle does not support the protocol= that is being removed. @retval EFI_INVALID_PARAMETER ChildHandle is NULL. @@ -193,7 +193,7 @@ Hash2ServiceBindingDestroyChild ( @param[in] ImageHandle The image handle of the driver. @param[in] SystemTable The system table. =20 - @retval EFI_SUCCES The service binding protocols is successfully i= nstalled. + @retval EFI_SUCCESS The service binding protocols is successfully i= nstalled. @retval Others Other errors as indicated. =20 **/ diff --git a/SecurityPkg/Hash2DxeCrypto/Driver.h b/SecurityPkg/Hash2DxeCryp= to/Driver.h index 162279e469..7b8996912a 100644 --- a/SecurityPkg/Hash2DxeCrypto/Driver.h +++ b/SecurityPkg/Hash2DxeCrypto/Driver.h @@ -79,7 +79,7 @@ typedef struct { it is not NULL, then the I/O services= are added to the existing child handle. =20 - @retval EFI_SUCCES The protocol was added to ChildHandle. + @retval EFI_SUCCESS The protocol was added to ChildHandle. @retval EFI_INVALID_PARAMETER ChildHandle is NULL. @retval EFI_OUT_OF_RESOURCES There are not enough resources availa= ble to create the child. @@ -104,7 +104,7 @@ Hash2ServiceBindingCreateChild ( instance. @param[in] ChildHandle Handle of the child to destroy. =20 - @retval EFI_SUCCES The protocol was removed from ChildHandle. + @retval EFI_SUCCESS The protocol was removed from ChildHandle. @retval EFI_UNSUPPORTED ChildHandle does not support the protocol= that is being removed. @retval EFI_INVALID_PARAMETER ChildHandle is NULL. diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.c b/SecurityPkg/HddPass= word/HddPasswordDxe.c index 051e64091d..a25b3471d0 100644 --- a/SecurityPkg/HddPassword/HddPasswordDxe.c +++ b/SecurityPkg/HddPassword/HddPasswordDxe.c @@ -120,7 +120,7 @@ BuildHddPasswordDeviceInfo ( =20 // // 1. Handle device which already set password. - // 2. When request to send freeze comamnd, driver also needs to handle= device + // 2. When request to send freeze command, driver also needs to handle= device // which support security feature. // if ((!PasswordIsFullZero (ConfigFormEntry->Password)) || @@ -2008,9 +2008,9 @@ SaveHddPasswordRequest ( } =20 /** - Get the HDD Password configuration form entry by the index of the goto o= pcode actived. + Get the HDD Password configuration form entry by the index of the goto o= pcode activated. =20 - @param[in] Index The 0-based index of the goto opcode actived. + @param[in] Index The 0-based index of the goto opcode activated. =20 @return The HDD Password configuration form entry found. **/ @@ -2758,7 +2758,7 @@ HddPasswordConfigFormInit ( @param ImageHandle Image handle this driver. @param SystemTable Pointer to SystemTable. =20 - @retval EFI_SUCESS This function always complete successfully. + @retval EFI_SUCCESS This function always complete successfully. =20 **/ EFI_STATUS @@ -2806,7 +2806,7 @@ HddPasswordDxeInit ( ASSERT_EFI_ERROR (Status); =20 // - // Make HDD_PASSWORD_VARIABLE_NAME varible read-only. + // Make HDD_PASSWORD_VARIABLE_NAME variable read-only. // Status =3D gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (= VOID **) &VariableLock); if (!EFI_ERROR (Status)) { diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.h b/SecurityPkg/HddPass= word/HddPasswordDxe.h index f695ca9454..87db587eb6 100644 --- a/SecurityPkg/HddPassword/HddPasswordDxe.h +++ b/SecurityPkg/HddPassword/HddPasswordDxe.h @@ -88,7 +88,7 @@ typedef struct _HDD_PASSWORD_DXE_PRIVATE_DATA { #define HDD_PASSWORD_DXE_PRIVATE_FROM_THIS(a) CR (a, HDD_PASSWORD_DXE_PRI= VATE_DATA, ConfigAccess, HDD_PASSWORD_DXE_PRIVATE_SIGNATURE) =20 // -//Iterate through the doule linked list. NOT delete safe +//Iterate through the double linked list. NOT delete safe // #define EFI_LIST_FOR_EACH(Entry, ListHead) \ for (Entry =3D (ListHead)->ForwardLink; Entry !=3D (ListHead); Entry =3D= Entry->ForwardLink) diff --git a/SecurityPkg/HddPassword/HddPasswordStrings.uni b/SecurityPkg/H= ddPassword/HddPasswordStrings.uni index 188c40f349..b6fddffced 100644 --- a/SecurityPkg/HddPassword/HddPasswordStrings.uni +++ b/SecurityPkg/HddPassword/HddPasswordStrings.uni @@ -16,7 +16,7 @@ #string STR_SECURITY_HDD_BANNER_ONE #language en-US "Allows Acce= ss to Set, Modify and Clear HardDisk User and" #string STR_SECURITY_HDD_BANNER_TWO #language en-US "Master Pass= words." #string STR_SECURITY_HDD_BANNER_THREE #language en-US "User Passwo= rd need to be installed for Enabling Security." -#string STR_SECURITY_HDD_BANNER_FOUR #language en-US "Master Pass= word can be modified only when succesfully" +#string STR_SECURITY_HDD_BANNER_FOUR #language en-US "Master Pass= word can be modified only when successfully" #string STR_SECURITY_HDD_BANNER_FIVE #language en-US "unlocked wi= th User Password in POST." =20 #string STR_HDD_SECURITY_HD #language en-US "HDD Passwor= d" diff --git a/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h b/Secur= ityPkg/Include/Guid/AuthenticatedVariableFormat.h index 2a097826a0..44ceebc488 100644 --- a/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h +++ b/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h @@ -54,7 +54,7 @@ extern EFI_GUID gEfiVendorKeysNvGuid; =20 /// /// "VendorKeysNv" variable to record the out of band secure boot keys mo= dification. -/// This variable is a read-only NV varaible that indicates whether someo= ne other than +/// This variable is a read-only NV variable that indicates whether someo= ne other than /// the platform vendor has used a mechanism not defined by the UEFI Spec= ification to /// transition the system to setup mode or to update secure boot keys. /// diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h b/Securi= tyPkg/Include/Library/Tcg2PhysicalPresenceLib.h index 8da3deaf86..39febcb655 100644 --- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h +++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h @@ -29,8 +29,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // UEFI TCG2 library definition bit of the BIOS Information Flags // -#define TCG2_BIOS_INFORMATION_FLAG_HIERACHY_CONTROL_STORAGE_DISABLE B= IT8 -#define TCG2_BIOS_INFORMATION_FLAG_HIERACHY_CONTROL_ENDORSEMENT_DISABLE B= IT9 +#define TCG2_BIOS_INFORMATION_FLAG_HIERARCHY_CONTROL_STORAGE_DISABLE = BIT8 +#define TCG2_BIOS_INFORMATION_FLAG_HIERARCHY_CONTROL_ENDORSEMENT_DISABLE = BIT9 =20 // // UEFI TCG2 library definition bit of the BIOS Storage Management Flags diff --git a/SecurityPkg/Include/Library/TcgStorageCoreLib.h b/SecurityPkg/= Include/Library/TcgStorageCoreLib.h index 190065b63e..c25a56a14c 100644 --- a/SecurityPkg/Include/Library/TcgStorageCoreLib.h +++ b/SecurityPkg/Include/Library/TcgStorageCoreLib.h @@ -696,7 +696,7 @@ TcgGetTokenUINT64( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -713,7 +713,7 @@ TcgGetNextUINT8( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -729,7 +729,7 @@ TcgGetNextUINT16( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -745,7 +745,7 @@ TcgGetNextUINT32( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -761,7 +761,7 @@ TcgGetNextUINT64( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -1261,7 +1261,7 @@ TcgEnumLevel0Discovery( Get Feature code from the header. =20 @param DiscoveryHeader The discovery header. - @param FeatureCode reutrn the Feature code. + @param FeatureCode return the Feature code. @param FeatureSize return the Feature size. =20 @retval return the Feature code data. diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Inc= lude/Library/Tpm2CommandLib.h index d78d5ee1ba..ce381e786b 100644 --- a/SecurityPkg/Include/Library/Tpm2CommandLib.h +++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h @@ -585,7 +585,7 @@ Tpm2PcrAllocateBanks ( NOTE: To simplify this function, leave returned CapabilityData for caller to u= npack since there are many capability categories and only few categories will be used in firmw= are. It means the caller - need swap the byte order for the feilds in CapabilityData. + need swap the byte order for the fields in CapabilityData. =20 @param[in] Capability Group selection; determines the format of= the response. @param[in] Property Further definition of information. diff --git a/SecurityPkg/Include/Library/TpmCommLib.h b/SecurityPkg/Include= /Library/TpmCommLib.h index b9aca60b82..7e102a6a11 100644 --- a/SecurityPkg/Include/Library/TpmCommLib.h +++ b/SecurityPkg/Include/Library/TpmCommLib.h @@ -214,7 +214,7 @@ TisPcWaitRegisterBits ( in the time of default TIS_TIMEOUT_D. =20 @param[in] TisReg Pointer to TIS register. - @param[out] BurstCount Pointer to a buffer to store the got B= urstConut. + @param[out] BurstCount Pointer to a buffer to store the got B= urstCount. =20 @retval EFI_SUCCESS Get BurstCount. @retval EFI_INVALID_PARAMETER TisReg is NULL or BurstCount is NULL. diff --git a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h b/Secu= rityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h index 2fc95537dc..1b7320e916 100644 --- a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h +++ b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h @@ -26,10 +26,10 @@ typedef struct _HASH_INFO { // // This PPI carries prehashsed data for one FV. Platform should ensure 1:= 1 mapping between pre-hashed PPI and corresponding FV. // The Count field in PPI is followed by Count number of FV hash info entr= ies, which can be extended to PCR and logged to TCG event log directly by T= CG modules. -// TCG module checks TPM required hash algorithms(PcdTpm2HashMask) with ea= ch pre-hased PPIs +// TCG module checks TPM required hash algorithms(PcdTpm2HashMask) with ea= ch pre-hashed PPIs // For each pre-hashed PPI // If PPI carries hash generated by equivalent or larger algorithm set= than TPM required, directly use PPI -// else, drops PPI data and cacluate all hash again +// else, drops PPI data and calculate all hash again // typedef struct { UINT32 FvBase; diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPk= g/Library/AuthVariableLib/AuthService.c index 4451be8b65..37fd2d9519 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -425,7 +425,7 @@ CheckSignatureListFormat( RsaContext =3D NULL; =20 // - // Walk throuth the input signature list and check the data format. + // Walk through the input signature list and check the data format. // If any signature is incorrectly formed, the whole check will fail. // while ((SigDataSize > 0) && (SigDataSize >=3D SigList->SignatureListSize= )) { @@ -1069,7 +1069,7 @@ AuthServiceInternalCompareTimeStamp ( @param[out] Sha256Digest Sha256 digest calculated. =20 @return EFI_ABORTED Digest process failed. - @return EFI_SUCCESS SHA256 Digest is succesfully calculated. + @return EFI_SUCCESS SHA256 Digest is successfully calculated. =20 **/ EFI_STATUS diff --git a/SecurityPkg/Library/AuthVariableLib/AuthServiceInternal.h b/Se= curityPkg/Library/AuthVariableLib/AuthServiceInternal.h index da2c40bc37..2bec637f75 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthServiceInternal.h +++ b/SecurityPkg/Library/AuthVariableLib/AuthServiceInternal.h @@ -159,7 +159,7 @@ DeleteCertsFromDb ( /** Clean up signer's certificates for common authenticated variable by corresponding VariableName and VendorGuid from "certdb". - Sytem may break down during Timebased Variable update & certdb update, + System may break down during Timebased Variable update & certdb update, make them inconsistent, this function is called in AuthVariable Init to= ensure consistency =20 diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/Securi= tyPkg/Library/AuthVariableLib/AuthVariableLib.c index 0cc8fc7b4a..7f31458edb 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c @@ -96,7 +96,7 @@ VOID **mAuthVarAddressPointer[9]; AUTH_VAR_LIB_CONTEXT_IN *mAuthVarLibContextIn =3D NULL; =20 /** - Initialization for authenticated varibale services. + Initialization for authenticated variable services. If this initialization returns error status, other APIs will not work and expect to be not called then. =20 @@ -382,7 +382,7 @@ AuthVariableLibInitialize ( @retval EFI_INVALID_PARAMETER Invalid parameter. @retval EFI_WRITE_PROTECTED Variable is write-protected. @retval EFI_OUT_OF_RESOURCES There is not enough resource. - @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_TIME= _BASED_AUTHENTICATED_WRITE_ACESS + @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_TIME= _BASED_AUTHENTICATED_WRITE_ACCESS set, but the AuthInfo does NOT pass th= e validation check carried out by the firmware. @retval EFI_UNSUPPORTED Unsupported to process authenticated v= ariable. diff --git a/SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAu= thenticationStatusLib.c b/SecurityPkg/Library/DxeImageAuthenticationStatusL= ib/DxeImageAuthenticationStatusLib.c index 38448f0c8c..e4ddff21b5 100644 --- a/SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthentic= ationStatusLib.c +++ b/SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthentic= ationStatusLib.c @@ -49,7 +49,7 @@ DxeImageAuthenticationStatusHandler ( =20 =20 /** - Register image authenticaion status check handler. + Register image authentication status check handler. =20 @param ImageHandle ImageHandle of the loaded driver. @param SystemTable Pointer to the EFI System Table. diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificati= onLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationL= ib.c index 67bccba1db..1ead4d3756 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -745,7 +745,7 @@ AddImageExeInfo ( if (ImageExeInfoTable !=3D NULL) { // // The table has been found! - // We must enlarge the table to accomodate the new exe info entry. + // We must enlarge the table to accommodate the new exe info entry. // ImageExeInfoTableSize =3D GetImageExeInfoTableSize (ImageExeInfoTable); } else { @@ -947,7 +947,7 @@ Done: =20 @param[in] VariableName Name of database variable that is search= ed in. @param[in] Signature Pointer to signature that is searched fo= r. - @param[in] CertType Pointer to hash algrithom. + @param[in] CertType Pointer to hash algorithm. @param[in] SignatureSize Size of Signature. =20 @return TRUE Found the signature in the variable data= base. @@ -992,7 +992,7 @@ IsSignatureFoundInDatabase ( goto Done; } // - // Enumerate all signature data in SigDB to check if executable's signat= ure exists. + // Enumerate all signature data in SigDB to check if signature exists fo= r executable. // CertList =3D (EFI_SIGNATURE_LIST *) Data; while ((DataSize > 0) && (DataSize >=3D CertList->SignatureListSize)) { @@ -1844,7 +1844,7 @@ DxeImageVerificationHandler ( =20 if (OffSet !=3D (SecDataDir->VirtualAddress + SecDataDir->Size)) { // - // The Size in Certificate Table or the attribute certicate table is c= orrupted. + // The Size in Certificate Table or the attribute certificate table is= corrupted. // VerifyStatus =3D EFI_ACCESS_DENIED; } @@ -1855,7 +1855,7 @@ DxeImageVerificationHandler ( Status =3D EFI_ACCESS_DENIED; if (Action =3D=3D EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED || Action =3D=3D= EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND) { // - // Get image hash value as executable's signature. + // Get image hash value as signature of executable. // SignatureListSize =3D sizeof (EFI_SIGNATURE_LIST) + sizeof (EFI_SIGN= ATURE_DATA) - 1 + mImageDigestSize; SignatureList =3D (EFI_SIGNATURE_LIST *) AllocateZeroPool (Signa= tureListSize); diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/Dx= eRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/DxeRsa2048Sha= 256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c index 0059328950..28807d4d98 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.c @@ -2,7 +2,7 @@ =20 This library registers RSA 2048 SHA 256 guided section handler to parse RSA 2048 SHA 256 encapsulation section and extract raw data. - It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. + It uses the BaseCryptLib based on OpenSSL to authenticate the signature. =20 Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -213,7 +213,7 @@ Rsa2048Sha256GuidedSectionHandler ( } =20 // - // All paths from here return EFI_SUCESS and result is returned in Authe= nticationStatus + // All paths from here return EFI_SUCCESS and result is returned in Auth= enticationStatus // Status =3D EFI_SUCCESS; =20 diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/Dx= eRsa2048Sha256GuidedSectionExtractLib.inf b/SecurityPkg/Library/DxeRsa2048S= ha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf index 0822fd0856..9c426edace 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.inf +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.inf @@ -3,7 +3,7 @@ # ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided = section handler # that parses RSA 2048 SHA 256 encapsulation section and extracts raw dat= a. # -# It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. +# It uses the BaseCryptLib based on OpenSSL to authenticate the signature. # # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/Dx= eRsa2048Sha256GuidedSectionExtractLib.uni b/SecurityPkg/Library/DxeRsa2048S= ha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.uni index 484bde0afc..f0294a68f5 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.uni +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.uni @@ -4,7 +4,7 @@ // ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided = section handler // that parses RSA 2048 SHA 256 encapsulation section and extracts raw dat= a. // -// It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. +// It uses the BaseCryptLib based on OpenSSL to authenticate the signature. // // Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// diff --git a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLi= b.c b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c index 919f42c95c..3a71e020d7 100644 --- a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c +++ b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c @@ -362,7 +362,7 @@ Tcg2MeasurePeImage ( if (Status =3D=3D EFI_VOLUME_FULL) { // // Volume full here means the image is hashed and its result is extend= ed to PCR. - // But the event log cann't be saved since log area is full. + // But the event log can't be saved since log area is full. // Just return EFI_SUCCESS in order not to block the image load. // Status =3D EFI_SUCCESS; @@ -541,7 +541,7 @@ DxeTpm2MeasureBootHandler ( } // // The PE image from unmeasured Firmware volume need be measured - // The PE image from measured Firmware volume will be mearsured accord= ing to policy below. + // The PE image from measured Firmware volume will be measured accordi= ng to policy below. // If it is driver, do not measure // If it is application, still measure. // diff --git a/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.= c b/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c index 65a3bde743..80a398b12a 100644 --- a/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c +++ b/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c @@ -649,7 +649,7 @@ TcgMeasurePeImage ( if (Status =3D=3D EFI_OUT_OF_RESOURCES) { // // Out of resource here means the image is hashed and its result is ex= tended to PCR. - // But the event log cann't be saved since log area is full. + // But the event log can't be saved since log area is full. // Just return EFI_SUCCESS in order not to block the image load. // Status =3D EFI_SUCCESS; @@ -838,7 +838,7 @@ DxeTpmMeasureBootHandler ( } // // The PE image from unmeasured Firmware volume need be measured - // The PE image from measured Firmware volume will be mearsured accord= ing to policy below. + // The PE image from measured Firmware volume will be measured accordi= ng to policy below. // If it is driver, do not measure // If it is application, still measure. // diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.= c b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c index adf03bb226..061136ee78 100644 --- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c +++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c @@ -56,7 +56,7 @@ Tpm12MeasureAndLogData ( TcgEvent =3D NULL; =20 // - // Tpm active/deactive state is checked in HashLogExtendEvent + // Tpm activation state is checked in HashLogExtendEvent // Status =3D gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **) &T= cgProtocol); if (EFI_ERROR(Status)){ diff --git a/SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.c = b/SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.c index 9ca784a873..52521b6444 100644 --- a/SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.c +++ b/SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.c @@ -128,7 +128,7 @@ HASH_INTERFACE mSha1InternalHashInstance =3D { /** The function register SHA1 instance. =20 - @retval EFI_SUCCESS SHA1 instance is registered, or system dose not su= rpport registr SHA1 instance + @retval EFI_SUCCESS SHA1 instance is registered, or system does not su= pport register SHA1 instance **/ EFI_STATUS EFIAPI diff --git a/SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha25= 6.c b/SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.c index 01fce3fd2b..760e20bae0 100644 --- a/SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.c +++ b/SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.c @@ -128,7 +128,7 @@ HASH_INTERFACE mSha256InternalHashInstance =3D { /** The function register SHA256 instance. =20 - @retval EFI_SUCCESS SHA256 instance is registered, or system dose not = surpport registr SHA256 instance + @retval EFI_SUCCESS SHA256 instance is registered, or system does not = support register SHA256 instance **/ EFI_STATUS EFIAPI diff --git a/SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha38= 4.c b/SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.c index 29f6c8a828..99e2416a8e 100644 --- a/SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.c +++ b/SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.c @@ -128,7 +128,7 @@ HASH_INTERFACE mSha384InternalHashInstance =3D { /** The function register SHA384 instance. =20 - @retval EFI_SUCCESS SHA384 instance is registered, or system dose not = surpport registr SHA384 instance + @retval EFI_SUCCESS SHA384 instance is registered, or system does not = support register SHA384 instance **/ EFI_STATUS EFIAPI diff --git a/SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha51= 2.c b/SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.c index d5389e1e22..b047791e02 100644 --- a/SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.c +++ b/SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.c @@ -127,7 +127,7 @@ HASH_INTERFACE mSha512InternalHashInstance =3D { /** The function register SHA512 instance. =20 - @retval EFI_SUCCESS SHA512 instance is registered, or system dose not = surpport registr SHA512 instance + @retval EFI_SUCCESS SHA512 instance is registered, or system does not = support register SHA512 instance **/ EFI_STATUS EFIAPI diff --git a/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c b/SecurityPkg/Li= brary/HashLibTpm2/HashLibTpm2.c index c33b49c25b..876b15fad4 100644 --- a/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c +++ b/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c @@ -29,7 +29,7 @@ TPM2_HASH_MASK mTpm2HashMask[] =3D { }; =20 /** - The function get algorith from hash mask info. + The function get algorithm from hash mask info. =20 @return Hash algorithm **/ diff --git a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/Pe= iRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/PeiRsa2048Sha= 256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c index df16715120..a759183d20 100644 --- a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.c @@ -2,7 +2,7 @@ =20 This library registers RSA 2048 SHA 256 guided section handler to parse RSA 2048 SHA 256 encapsulation section and extract raw data. - It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. + It uses the BaseCryptLib based on OpenSSL to authenticate the signature. =20 Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -197,7 +197,7 @@ Rsa2048Sha256GuidedSectionHandler ( } =20 // - // All paths from here return EFI_SUCESS and result is returned in Authe= nticationStatus + // All paths from here return EFI_SUCCESS and result is returned in Auth= enticationStatus // Status =3D EFI_SUCCESS; =20 diff --git a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/Pe= iRsa2048Sha256GuidedSectionExtractLib.inf b/SecurityPkg/Library/PeiRsa2048S= ha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.inf index 3fd5e52430..dac97a050e 100644 --- a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.inf +++ b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.inf @@ -3,7 +3,7 @@ # ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided = section handler # that parses RSA 2048 SHA 256 encapsulation section and extracts raw dat= a. # -# It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. +# It uses the BaseCryptLib based on OpenSSL to authenticate the signature. # # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# diff --git a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/Pe= iRsa2048Sha256GuidedSectionExtractLib.uni b/SecurityPkg/Library/PeiRsa2048S= ha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.uni index 484bde0afc..f0294a68f5 100644 --- a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.uni +++ b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.uni @@ -4,7 +4,7 @@ // ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided = section handler // that parses RSA 2048 SHA 256 encapsulation section and extracts raw dat= a. // -// It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. +// It uses the BaseCryptLib based on OpenSSL to authenticate the signature. // // Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c b/Secur= ityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c index 1c072fac23..f9c57a13f2 100644 --- a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c +++ b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c @@ -1249,7 +1249,7 @@ TcgGetTokenByteSequence( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -1282,7 +1282,7 @@ TcgGetNextUINT8( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -1315,7 +1315,7 @@ TcgGetNextUINT16( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -1348,7 +1348,7 @@ TcgGetNextUINT32( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 @@ -1370,7 +1370,7 @@ TcgGetNextUINT64( Get next specify value. =20 @param ParseStruct Input parse structure. - @param Value Return vlaue. + @param Value Return value. =20 @retval return the action result. =20 diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageUtil.c b/Secur= ityPkg/Library/TcgStorageCoreLib/TcgStorageUtil.c index d06ad62c91..b6d5cf9890 100644 --- a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageUtil.c +++ b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageUtil.c @@ -810,7 +810,7 @@ TcgFindFeatureCallback( Get Feature code from the header. =20 @param DiscoveryHeader The discovery header. - @param FeatureCode reutrn the Feature code. + @param FeatureCode return the Feature code. @param FeatureSize return the Feature size. =20 @retval return the Feature code data. diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/S= ecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c index bc52cceabd..b4927a0872 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c @@ -11,7 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include "TcgStorageOpalLibInternal.h" =20 -#define OPAL_MSID_LENGHT 128 +#define OPAL_MSID_LENGTH 128 =20 /** Creates a session with OPAL_UID_ADMIN_SP as OPAL_ADMIN_SP_PSID_AUTHORITY= , then reverts device using Admin SP Revert method. @@ -1095,7 +1095,7 @@ GetRevertTimeOut ( OPAL_DISK_SUPPORT_ATTRIBUTE SupportedAttributes; UINT16 BaseComId; UINT32 MsidLength; - UINT8 Msid[OPAL_MSID_LENGHT]; + UINT8 Msid[OPAL_MSID_LENGTH]; UINT32 RemovalMechanishLists[ResearvedMechanism]; UINT8 ActiveDataRemovalMechanism; =20 @@ -1104,7 +1104,7 @@ GetRevertTimeOut ( return 0; } =20 - TcgResult =3D OpalUtilGetMsid (Session, Msid, OPAL_MSID_LENGHT, &MsidLen= gth); + TcgResult =3D OpalUtilGetMsid (Session, Msid, OPAL_MSID_LENGTH, &MsidLen= gth); if (TcgResult !=3D TcgResultSuccess) { return 0; } diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c b/Securit= yPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c index 609186fb7c..8295a1d267 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c @@ -218,7 +218,7 @@ Tpm12NvWriteValue ( if (EFI_ERROR (Status)) { return Status; } - DEBUG ((DEBUG_INFO, "Tpm12NvWritedValue - ReturnCode =3D %x\n", SwapByte= s32 (Response.returnCode))); + DEBUG ((DEBUG_INFO, "Tpm12NvWriteValue - ReturnCode =3D %x\n", SwapBytes= 32 (Response.returnCode))); switch (SwapBytes32 (Response.returnCode)) { case TPM_SUCCESS: return EFI_SUCCESS; diff --git a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c b/SecurityPk= g/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c index 70c2a06890..0902e044be 100644 --- a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c +++ b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c @@ -125,7 +125,7 @@ Tpm12TisPcWaitRegisterBits ( in the time of default TIS_TIMEOUT_D. =20 @param[in] TisReg Pointer to TIS register. - @param[out] BurstCount Pointer to a buffer to store the got B= urstConut. + @param[out] BurstCount Pointer to a buffer to store the got B= urstCount. =20 @retval EFI_SUCCESS Get BurstCount. @retval EFI_INVALID_PARAMETER TisReg is NULL or BurstCount is NULL. diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c b/Security= Pkg/Library/Tpm2CommandLib/Tpm2Capability.c index 5b6be8e3c8..1ab6a438f2 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c @@ -53,7 +53,7 @@ typedef struct { NOTE: To simplify this function, leave returned CapabilityData for caller to u= npack since there are many capability categories and only few categories will be used in firmw= are. It means the caller - need swap the byte order for the feilds in CapabilityData. + need swap the byte order for the fields in CapabilityData. =20 @param[in] Capability Group selection; determines the format of= the response. @param[in] Property Further definition of information. @@ -119,7 +119,7 @@ Tpm2GetCapability ( // *MoreData =3D RecvBuffer.MoreData; // - // Does not unpack all possiable property here, the caller should unpack= it and note the byte order. + // Does not unpack all possible property here, the caller should unpack = it and note the byte order. // CopyMem (CapabilityData, &RecvBuffer.CapabilityData, RecvBufferSize - si= zeof (TPM2_RESPONSE_HEADER) - sizeof (UINT8)); =20 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c b/SecurityP= kg/Library/Tpm2CommandLib/Tpm2Hierarchy.c index 50973f19e2..043d358a06 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c @@ -435,7 +435,7 @@ Tpm2HierarchyChangeAuth ( WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16(NewAuth->size)); Buffer +=3D sizeof(UINT16); =20 - // New Authorizeation + // New Authorization CopyMem(Buffer, NewAuth->buffer, NewAuth->size); Buffer +=3D NewAuth->size; =20 diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c b/Se= curityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c index 53b9bc42fb..42e1ecbce9 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c @@ -137,7 +137,7 @@ Tpm2RegisterTpm2DeviceLib ( /** The function caches current active TPM interface type. =20 - @retval EFI_SUCCESS DTPM2.0 instance is registered, or system dose not= surpport registr DTPM2.0 instance + @retval EFI_SUCCESS DTPM2.0 instance is registered, or system does not= support register DTPM2.0 instance **/ EFI_STATUS EFIAPI diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c b/= SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c index 435cbf6298..691eaa40c0 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c @@ -93,7 +93,7 @@ TPM2_DEVICE_INTERFACE mDTpm2InternalTpm2Device =3D { /** The function register DTPM2.0 instance and caches current active TPM int= erface type. =20 - @retval EFI_SUCCESS DTPM2.0 instance is registered, or system dose not= surpport registr DTPM2.0 instance + @retval EFI_SUCCESS DTPM2.0 instance is registered, or system does not= support register DTPM2.0 instance **/ EFI_STATUS EFIAPI diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c b/SecurityPkg/= Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c index 63cbafbb82..1052928519 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c @@ -327,7 +327,7 @@ PtpCrbTpmCommand ( =20 GoReady_Exit: // - // Goto Ready State if command is completed succesfully and TPM support = IdleBypass + // Goto Ready State if command is completed successfully and TPM support= IdleBypass // If not supported. flow down to GoIdle // if (PcdGet8(PcdCRBIdleByPass) =3D=3D 1) { @@ -347,7 +347,7 @@ GoIdle_Exit: MmioWrite32((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQU= EST_GO_IDLE); =20 // - // Only enforce Idle state transition if execution fails when CRBIndleBy= pass=3D=3D1 + // Only enforce Idle state transition if execution fails when CRBIdleByp= ass=3D=3D1 // Leave regular Idle delay at the beginning of next command execution // if (PcdGet8(PcdCRBIdleByPass) =3D=3D 1){ diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c b/SecurityPkg/= Library/Tpm2DeviceLibDTpm/Tpm2Tis.c index f7bd71541a..c9e70854ec 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c @@ -81,7 +81,7 @@ TisPcWaitRegisterBits ( in the time of default TIS_TIMEOUT_D. =20 @param[in] TisReg Pointer to TIS register. - @param[out] BurstCount Pointer to a buffer to store the got B= urstConut. + @param[out] BurstCount Pointer to a buffer to store the got B= urstCount. =20 @retval EFI_SUCCESS Get BurstCount. @retval EFI_INVALID_PARAMETER TisReg is NULL or BurstCount is NULL. @@ -303,7 +303,7 @@ Tpm2TisTpmCommand ( TIS_TIMEOUT_B ); // - // Do not clear CANCEL bit here bicoz Writes of 0 to this bit are igno= red + // Do not clear CANCEL bit here because Writes of 0 to this bit are ig= nored // if (EFI_ERROR (Status)) { // diff --git a/SecurityPkg/Library/TpmCommLib/CommonHeader.h b/SecurityPkg/Li= brary/TpmCommLib/CommonHeader.h index 386c9fab44..aa2e412a11 100644 --- a/SecurityPkg/Library/TpmCommLib/CommonHeader.h +++ b/SecurityPkg/Library/TpmCommLib/CommonHeader.h @@ -1,5 +1,5 @@ /** @file - The intenal header file for TpmCommLib. + The internal header file for TpmCommLib. =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent diff --git a/SecurityPkg/Library/TpmCommLib/TisPc.c b/SecurityPkg/Library/T= pmCommLib/TisPc.c index 162e883d21..4a14a2bf81 100644 --- a/SecurityPkg/Library/TpmCommLib/TisPc.c +++ b/SecurityPkg/Library/TpmCommLib/TisPc.c @@ -64,7 +64,7 @@ TisPcWaitRegisterBits ( in the time of default TIS_TIMEOUT_D. =20 @param[in] TisReg Pointer to TIS register. - @param[out] BurstCount Pointer to a buffer to store the got B= urstConut. + @param[out] BurstCount Pointer to a buffer to store the got B= urstCount. =20 @retval EFI_SUCCESS Get BurstCount. @retval EFI_INVALID_PARAMETER TisReg is NULL or BurstCount is NULL. diff --git a/SecurityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.c b/Secu= rityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.c index a113df3718..a96862f937 100644 --- a/SecurityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.c +++ b/SecurityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.c @@ -494,7 +494,7 @@ IsValidTimestamp ( TsaCertSize =3D SigList->SignatureSize - sizeof (EFI_GUID); =20 // - // Each TSA Certificate will normally be in a seperate EFI_SIGNATURE_L= IST + // Each TSA Certificate will normally be in a separate EFI_SIGNATURE_L= IST // Leverage ImageTimestampVerify interface for Timestamp counterSignat= ure Verification // if (ImageTimestampVerify (SignedData, SignedDataSize, TsaCert, TsaCert= Size, &SigningTime)) { @@ -514,7 +514,7 @@ IsValidTimestamp ( /** Check whether the PKCS7 signedData is revoked by verifying with the revo= ked certificates database, and if the signedData is timestamped, the embedde= d timestamp - couterSignature will be checked with the supplied timestamp database. + counterSignature will be checked with the supplied timestamp database. =20 @param[in] SignedData Pointer to buffer containing ASN.1 DER-encod= ed PKCS7 signature. @@ -657,8 +657,8 @@ P7CheckRevocationByHash ( Status =3D EFI_SUCCESS; if (IsValidTimestamp (SignedData, SignedDataSize, TimeStampDb, &Revo= cationTime)) { // - // Use EFI_NOT_READY to identify the P7Data is not reovked, becaus= e the timestamping - // occured prior to the time of certificate revocation. + // Use EFI_NOT_READY to identify the P7Data is not revoked, becaus= e the timestamping + // occurred prior to the time of certificate revocation. // Status =3D EFI_NOT_READY; } @@ -679,7 +679,7 @@ _Exit: /** Check whether the PKCS7 signedData is revoked by verifying with the revo= ked certificates database, and if the signedData is timestamped, the embedde= d timestamp - couterSignature will be checked with the supplied timestamp database. + counterSignature will be checked with the supplied timestamp database. =20 @param[in] SignedData Pointer to buffer containing ASN.1 DER-encod= ed PKCS7 signature. @@ -822,8 +822,8 @@ P7CheckRevocation ( Status =3D EFI_SUCCESS; if (IsValidTimestamp (SignedData, SignedDataSize, TimeStampDb, &Revo= cationTime)) { // - // Use EFI_NOT_READY to identify the P7Data is not reovked, becaus= e the timestamping - // occured prior to the time of certificate revocation. + // Use EFI_NOT_READY to identify the P7Data is not revoked, becaus= e the timestamping + // occurred prior to the time of certificate revocation. // Status =3D EFI_NOT_READY; } @@ -1261,7 +1261,7 @@ VerifyBuffer ( ); if (!EFI_ERROR (Status)) { // - // The PKCS7 SignedData is reovked + // The PKCS7 SignedData is revoked // Status =3D EFI_SECURITY_VIOLATION; goto _Exit; @@ -1413,7 +1413,7 @@ VerifySignature ( =20 if (!EFI_ERROR (Status)) { // - // The PKCS7 SignedData is reovked + // The PKCS7 SignedData is revoked // return EFI_SECURITY_VIOLATION; } diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RdRand.c b/SecurityPk= g/RandomNumberGenerator/RngDxe/RdRand.c index 59789533b0..e7dd5ab181 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/RdRand.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RdRand.c @@ -79,7 +79,7 @@ RdRandGetSeed128 ( UINT32 Index2; =20 // - // Chose an arbitary key and zero the feed_forward_value (FFV) + // Chose an arbitrary key and zero the feed_forward_value (FFV) // for (Index =3D 0; Index < 16; Index++) { Key[Index] =3D (UINT8) Index; diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec index 8249bf0220..cac36caf0a 100644 --- a/SecurityPkg/SecurityPkg.dec +++ b/SecurityPkg/SecurityPkg.dec @@ -68,11 +68,11 @@ [LibraryClasses] # Tcg2PhysicalPresenceLib|Include/Library/Tcg2PhysicalPresenceLib.h =20 - ## @libraryclass Provides interfaces about TCG storage generic commond. + ## @libraryclass Provides interfaces about TCG storage generic command. # TcgStorageCoreLib|Include/Library/TcgStorageCoreLib.h =20 - ## @libraryclass Provides interfaces about TCG storage Opal generic com= mond. + ## @libraryclass Provides interfaces about TCG storage Opal generic com= mand. # TcgStorageOpalLib|Include/Library/TcgStorageOpalLib.h =20 @@ -369,9 +369,9 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, = PcdsDynamicEx] # @Prompt TPM device address. gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0xFED40000|UINT64|0x0001= 0012 =20 - ## This PCR means the OEM configurated number of PCR banks. + ## This PCR means the OEM configured number of PCR banks. # 0 means dynamic get from supported HASH algorithm - # @Prompt OEM configurated number of PCR banks. + # @Prompt OEM configured number of PCR banks. gEfiSecurityPkgTokenSpaceGuid.PcdTcg2NumberOfPCRBanks|0x0|UINT32|0x00010= 015 =20 ## Provides one or more SHA 256 Hashes of the RSA 2048 public keys used = to verify Recovery and Capsule Update images @@ -469,7 +469,7 @@ [PcdsDynamic, PcdsDynamicEx] gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap|0xFFFFFFFF|UINT= 32|0x00010016 =20 ## This PCD indicates current active TPM interface type. - # Accodingt to TCG PTP spec 1.3, there are 3 types defined in TPM2_PTP_= INTERFACE_TYPE.
+ # According to TCG PTP spec 1.3, there are 3 types defined in TPM2_PTP_= INTERFACE_TYPE.
# 0x00 - FIFO interface as defined in TIS 1.3 is active.
# 0x01 - FIFO interface as defined in PTP for TPM 2.0 is active.
# 0x02 - CRB interface is active.
@@ -478,14 +478,14 @@ [PcdsDynamic, PcdsDynamicEx] # @Prompt current active TPM interface type. gEfiSecurityPkgTokenSpaceGuid.PcdActiveTpmInterfaceType|0xFF|UINT8|0x000= 1001E =20 - ## This PCD records IdleByass status supported by current active TPM int= erface. - # Accodingt to TCG PTP spec 1.3, TPM with CRB interface can skip idle s= tate and - # diretcly move to CmdReady state.
+ ## This PCD records IdleBypass status supported by current active TPM in= terface. + # According to TCG PTP spec 1.3, TPM with CRB interface can skip idle s= tate and + # directly move to CmdReady state.
# 0x00 - Do not support IdleByPass.
# 0x01 - Support IdleByPass.
# 0xFF - IdleByPass State is not synced with TPM hardware.
# - # @Prompt IdleByass status supported by current active TPM interface. + # @Prompt IdleBypass status supported by current active TPM interface. gEfiSecurityPkgTokenSpaceGuid.PcdCRBIdleByPass|0xFF|UINT8|0x0001001F =20 ## This PCD records LAML field in TPM2 ACPI table. diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index aef2ac3a20..9a254087a3 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -70,7 +70,7 @@ [LibraryClasses] [LibraryClasses.ARM] # # It is not possible to prevent the ARM compiler for generic intrinsic f= unctions. - # This library provides the instrinsic functions generate by a given com= piler. + # This library provides the intrinsic functions generate by a given comp= iler. # And NULL mean link this library into all ARM images. # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf diff --git a/SecurityPkg/SecurityPkg.uni b/SecurityPkg/SecurityPkg.uni index ee79b98f0d..68587304d7 100644 --- a/SecurityPkg/SecurityPkg.uni +++ b/SecurityPkg/SecurityPkg.uni @@ -80,7 +80,7 @@ =20 #string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTpmPhysicalPresence_PROMPT #= language en-US "Physical presence of the platform operator." =20 -#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTpmPhysicalPresence_HELP #la= nguage en-US "Indicates the presence or absence of the platform operator du= ring firmware booting. If platform operator is not physical presnece during= boot. TPM will be locked and the TPM commands that required operator physi= cal presence can not run.

\n" +#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTpmPhysicalPresence_HELP #la= nguage en-US "Indicates the presence or absence of the platform operator du= ring firmware booting. If platform operator is not physical presence during= boot. TPM will be locked and the TPM commands that required operator physi= cal presence can not run.

\n" = "TRUE - The platform operator is physically present.
\n" = "FALSE - The platform operator is not physically present.
" =20 @@ -176,9 +176,9 @@ #string STR_gEfiSecurityPkgTokenSpaceGuid_PcdRsa2048Sha256PublicKeyBuffer_= HELP #language en-US "Provides one or more SHA 256 Hashes of the RSA 2048 = public keys used to verify Recovery and Capsule Update images\n" = "WARNING: The default value is treated as test key. P= lease do not use default value in the production." =20 -#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTcg2NumberOfPCRBanks_PROMPT = #language en-US "OEM configurated number of PCR banks." +#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTcg2NumberOfPCRBanks_PROMPT = #language en-US "OEM configured number of PCR banks." =20 -#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTcg2NumberOfPCRBanks_HELP #l= anguage en-US "This PCR means the OEM configurated number of PCR banks.\n" +#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTcg2NumberOfPCRBanks_HELP #l= anguage en-US "This PCR means the OEM configured number of PCR banks.\n" = "0 means dynamic get from supported HASH algorithm" =20 #string STR_gEfiSecurityPkgTokenSpaceGuid_PcdTcg2HashAlgorithmBitmap_PROMP= T #language en-US "Hash Algorithm bitmap." @@ -256,10 +256,10 @@ = "0x02 - CRB interface is active.
\n" = "0xFF - Contains no current active TPM interface type
" =20 -#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdCRBIdleByPass_PROMPT #langua= ge en-US "IdleByass status supported by current active TPM interface." +#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdCRBIdleByPass_PROMPT #langua= ge en-US "IdleBypass status supported by current active TPM interface." =20 -#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdCRBIdleByPass_HELP #language= en-US "This PCD records IdleByass status supported by current active TPM i= nterface.\n" - = "Accodingt to TCG PTP spec 1.3, TPM with CRB interface can = skip idle state and diretcly move to CmdReady state.
" +#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdCRBIdleByPass_HELP #language= en-US "This PCD records IdleBypass status supported by current active TPM = interface.\n" + = "According to TCG PTP spec 1.3, TPM with CRB interface can = skip idle state and directly move to CmdReady state.
" = "0x01 - Do not support IdleByPass.
\n" = "0x02 - Support IdleByPass.
\n" = "0xFF - IdleByPass State is not synced with TPM hardware." diff --git a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c b/SecurityPkg/= Tcg/MemoryOverwriteControl/TcgMor.c index b359466a81..6aa025daab 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c +++ b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c @@ -1,7 +1,7 @@ /** @file TCG MOR (Memory Overwrite Request) Control Driver. =20 - This driver initilize MemoryOverwriteRequestControl variable. It + This driver initialize MemoryOverwriteRequestControl variable. It will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will also do TPer R= eset for those encrypted drives through EFI_STORAGE_SECURITY_COMMAND_PROTOCOL at = EndOfDxe. =20 @@ -298,7 +298,7 @@ TPerResetAtEndOfDxe ( @param[in] ImageHandle Image handle of this driver. @param[in] SystemTable A Pointer to the EFI System Table. =20 - @retval EFI_SUCEESS + @retval EFI_SUCCESS @return Others Some error occurs. **/ EFI_STATUS @@ -341,7 +341,7 @@ MorDriverEntryPoint ( // // Create a Ready To Boot Event and Clear the MorControl bit in the ca= ll back function. // - DEBUG ((EFI_D_INFO, "TcgMor: Create ReadyToBoot Event for MorControl B= it cleanning!\n")); + DEBUG ((DEBUG_INFO, "TcgMor: Create ReadyToBoot Event for MorControl B= it cleaning!\n")); Status =3D EfiCreateEventReadyToBootEx ( TPL_CALLBACK, OnReadyToBoot, diff --git a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf b/SecurityPk= g/Tcg/MemoryOverwriteControl/TcgMor.inf index de624423a6..906bafa04a 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf +++ b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf @@ -1,5 +1,5 @@ ## @file -# Initilizes MemoryOverwriteRequestControl variable +# initializes MemoryOverwriteRequestControl variable # # This module will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will a= lso do # TPer Reset for those encrypted drives through EFI_STORAGE_SECURITY_COMM= AND_PROTOCOL diff --git a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.uni b/SecurityPk= g/Tcg/MemoryOverwriteControl/TcgMor.uni index 0c499e7d1a..6a1df10394 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.uni +++ b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.uni @@ -1,5 +1,5 @@ // /** @file -// Initilizes MemoryOverwriteRequestControl variable +// initializes MemoryOverwriteRequestControl variable // // This module will clear MOR_CLEAR_MEMORY_BIT bit if it is set. // diff --git a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c= b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c index ef49fd928e..aa230eeefa 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c +++ b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c @@ -1,7 +1,7 @@ /** @file TCG MOR (Memory Overwrite Request) Lock Control Driver. =20 - This driver initilize MemoryOverwriteRequestControlLock variable. + This driver initializes MemoryOverwriteRequestControlLock variable. This module will add Variable Hook and allow MemoryOverwriteRequestContr= olLock variable set only once. =20 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
@@ -167,7 +167,7 @@ SetVariableCheckHandlerMor ( @param[in] ImageHandle Image handle of this driver. @param[in] SystemTable A Pointer to the EFI System Table. =20 - @retval EFI_SUCEESS + @retval EFI_SUCCESS @return Others Some error occurs. **/ EFI_STATUS diff --git a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h= b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h index 2ef194f92f..5a6658c158 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h +++ b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h @@ -119,7 +119,7 @@ SetVariableCheckHandlerMor ( @param[in] ImageHandle Image handle of this driver. @param[in] SystemTable A Pointer to the EFI System Table. =20 - @retval EFI_SUCEESS + @retval EFI_SUCCESS @return Others Some error occurs. **/ EFI_STATUS diff --git a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.u= ni b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni index 639a3edcba..711b37d866 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni +++ b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni @@ -1,5 +1,5 @@ // /** @file -// Initilizes MemoryOverwriteRequestControlLock variable +// Initializes MemoryOverwriteRequestControlLock variable // // This module will add Variable Hook and allow MemoryOverwriteRequestCont= rolLock variable set only once. // @@ -10,7 +10,7 @@ // **/ =20 =20 -#string STR_MODULE_ABSTRACT #language en-US "Initilizes Memory= OverwriteRequestControlLock variable" +#string STR_MODULE_ABSTRACT #language en-US "Initializes Memor= yOverwriteRequestControlLock variable" =20 #string STR_MODULE_DESCRIPTION #language en-US "This module will = add Variable Hook and allow MemoryOverwriteRequestControlLock variable set = only once." =20 diff --git a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSm= m.inf b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf index 67d6bda269..875c1e5f3a 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf +++ b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf @@ -1,5 +1,5 @@ ## @file -# Initilizes MemoryOverwriteRequestControlLock variable +# Initializes MemoryOverwriteRequestControlLock variable # # This module will add Variable Hook and allow MemoryOverwriteRequestCont= rolLock variable set only once. # diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/T= cg/Opal/OpalPassword/OpalDriver.c index e14fa32354..77905d2bf9 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -2583,7 +2583,7 @@ OpalDriverGetDriverDeviceName( @param ImageHandle Image Handle this driver. @param SystemTable Pointer to SystemTable. =20 - @retval EFI_SUCESS This function always complete successfully. + @retval EFI_SUCCESS This function always complete successfully. **/ EFI_STATUS EFIAPI @@ -2637,7 +2637,7 @@ EfiDriverEntryPoint( Tests to see if this driver supports a given controller. =20 This function checks to see if the controller contains an instance of the - EFI_STORAGE_SECURITY_COMMAND_PROTOCOL and the EFI_BLOCK_IO_PROTOCL + EFI_STORAGE_SECURITY_COMMAND_PROTOCOL and the EFI_BLOCK_IO_PROTOCOL and returns EFI_SUCCESS if it does. =20 @param[in] This A pointer to the EFI_DRIVER_BINDING_PR= OTOCOL instance. @@ -2741,7 +2741,7 @@ OpalEfiDriverBindingSupported( "controller", which is a child Handle, contains the EF_STORAGE_SECURITY_= COMMAND protocols. This function will complete the other necessary checks, such as verifyin= g the device supports the correct version of Opal. Upon verification, it will add the device = to the - Opal HII list in order to expose Opal managmeent options. + Opal HII list in order to expose Opal management options. =20 @param[in] This A pointer to the EFI_DRIVER_BINDING_PR= OTOCOL instance. @param[in] ControllerHandle The Handle of the controller to start.= This Handle diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h b/SecurityPkg/T= cg/Opal/OpalPassword/OpalDriver.h index beeabb1c0a..c19d78218e 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h @@ -61,7 +61,7 @@ extern EFI_DRIVER_BINDING_PROTOCOL gOpalDriverBinding; extern EFI_COMPONENT_NAME_PROTOCOL gOpalComponentName; extern EFI_COMPONENT_NAME2_PROTOCOL gOpalComponentName2; =20 -#define OPAL_MSID_LENGHT 128 +#define OPAL_MSID_LENGTH 128 =20 #define MAX_PASSWORD_TRY_COUNT 5 =20 @@ -131,7 +131,7 @@ typedef struct { // typedef struct { UINT32 MsidLength; = // Byte length of MSID Pin for device - UINT8 Msid[OPAL_MSID_LENGHT]; = // MSID Pin for device + UINT8 Msid[OPAL_MSID_LENGTH]; = // MSID Pin for device EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Sscp; UINT32 MediaId; = // MediaId is used by Ssc Protocol. EFI_DEVICE_PATH_PROTOCOL *OpalDevicePath; @@ -309,7 +309,7 @@ OpalEfiDriverBindingSupported( "controller", which is a child handle, contains the EF_STORAGE_SECURITY_= COMMAND protocols. This function will complete the other necessary checks, such as verifyin= g the device supports the correct version of Opal. Upon verification, it will add the device = to the - Opal HII list in order to expose Opal managmeent options. + Opal HII list in order to expose Opal management options. =20 @param[in] This A pointer to the EFI_DRIVER_BINDING_PR= OTOCOL instance. @param[in] ControllerHandle The handle of the controller to start.= This handle diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c b/SecurityPkg/Tcg/= Opal/OpalPassword/OpalHii.c index 18b65da756..ef117d3d03 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c @@ -1090,7 +1090,7 @@ OpalHiiSetBrowserData ( =20 /** =20 - Populate the hii_g_Configuraton with the browser Data. + Populate the hii_g_Configuration with the browser Data. =20 **/ VOID @@ -1164,7 +1164,7 @@ HiiSetFormString( =20 @param Dev The Opal device. =20 - @retval EFI_SUCESS Initialize the device success. + @retval EFI_SUCCESS Initialize the device success. @retval EFI_DEVICE_ERROR Get info from device failed. =20 **/ @@ -1193,7 +1193,7 @@ OpalDiskInitialize ( } Session.OpalBaseComId =3D Dev->OpalDisk.OpalBaseComId; =20 - TcgResult =3D OpalUtilGetMsid (&Session, Dev->OpalDisk.Msid, OPAL_MSID_L= ENGHT, &Dev->OpalDisk.MsidLength); + TcgResult =3D OpalUtilGetMsid (&Session, Dev->OpalDisk.Msid, OPAL_MSID_L= ENGTH, &Dev->OpalDisk.MsidLength); if (TcgResult !=3D TcgResultSuccess) { return EFI_DEVICE_ERROR; } @@ -1220,7 +1220,7 @@ OpalDiskInitialize ( =20 @param OpalDisk The Opal device. =20 - @retval EFI_SUCESS Get ownership success. + @retval EFI_SUCCESS Get ownership success. @retval EFI_ACCESS_DENIED Has send BlockSID command, can't change o= wnership. @retval EFI_INVALID_PARAMETER Not get Msid info before get ownership in= fo. =20 @@ -1254,7 +1254,7 @@ OpalDiskUpdateOwnerShip ( =20 @param OpalDisk The Opal device. =20 - @retval EFI_SUCESS Initialize the device success. + @retval EFI_SUCCESS Initialize the device success. @retval EFI_DEVICE_ERROR Get info from device failed. @retval EFI_INVALID_PARAMETER Not get Msid info before get ownership in= fo. @retval EFI_ACCESS_DENIED Has send BlockSID command, can't change o= wnership. diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h b/SecurityPkg/Tcg/= Opal/OpalPassword/OpalHii.h index 89c709df99..0543a2ce49 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h @@ -156,7 +156,7 @@ OpalHiiSetBrowserData ( =20 /** =20 - Populate the hii_g_Configuraton with the browser Data. + Populate the hii_g_Configuration with the browser Data. =20 **/ VOID @@ -247,7 +247,7 @@ GetDiskNameStringId( =20 @param OpalDisk The Opal device. =20 - @retval EFI_SUCESS Initialize the device success. + @retval EFI_SUCCESS Initialize the device success. @retval EFI_DEVICE_ERROR Get info from device failed. @retval EFI_INVALID_PARAMETER Not get Msid info before get ownership in= fo. =20 @@ -348,7 +348,7 @@ HiiUninstall( =20 @param Dev The Opal device. =20 - @retval EFI_SUCESS Initialize the device success. + @retval EFI_SUCCESS Initialize the device success. @retval EFI_DEVICE_ERROR Get info from device failed. =20 **/ @@ -362,7 +362,7 @@ OpalDiskInitialize ( =20 @param OpalDisk The Opal device. =20 - @retval EFI_SUCESS Get ownership success. + @retval EFI_SUCCESS Get ownership success. @retval EFI_ACCESS_DENIED Has send BlockSID command, can't change o= wnership. @retval EFI_INVALID_PARAMETER Not get Msid info before get ownership in= fo. =20 diff --git a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.c b/Se= curityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.c index f25481044f..83c3ad50d1 100644 --- a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.c +++ b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.c @@ -31,7 +31,7 @@ LockTpmPhysicalPresence ( ); =20 // -// Gobal defintions for lock physical presence PPI and its descriptor. +// Global defintions for lock physical presence PPI and its descriptor. // PEI_LOCK_PHYSICAL_PRESENCE_PPI mLockPhysicalPresencePpi =3D { LockTpmPhysicalPresence diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr b/SecurityPkg/Tcg/Tc= g2Config/Tcg2Config.vfr index 12d8adb7ea..91a463997c 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr @@ -16,19 +16,19 @@ formset =20 efivarstore TCG2_CONFIGURATION_INFO, varid =3D TCG2_CONFIGURATION_INFO_VARSTORE_ID, - attribute =3D 0x02, // EFI variable attribures EFI_VARIABLE_BOOTSERV= ICE_ACCESS + attribute =3D 0x02, // EFI variable attributes EFI_VARIABLE_BOOTSERV= ICE_ACCESS name =3D TCG2_CONFIGURATION_INFO, guid =3D TCG2_CONFIG_FORM_SET_GUID; =20 efivarstore TCG2_CONFIGURATION, varid =3D TCG2_CONFIGURATION_VARSTORE_ID, - attribute =3D 0x03, // EFI variable attribures EFI_VARIABLE_BOOTSERV= ICE_ACCESS | EFI_VARIABLE_NON_VOLATILE + attribute =3D 0x03, // EFI variable attributes EFI_VARIABLE_BOOTSERV= ICE_ACCESS | EFI_VARIABLE_NON_VOLATILE name =3D TCG2_CONFIGURATION, guid =3D TCG2_CONFIG_FORM_SET_GUID; =20 efivarstore TCG2_VERSION, varid =3D TCG2_VERSION_VARSTORE_ID, - attribute =3D 0x03, // EFI variable attribures EFI_VARIABLE_BOOTSERV= ICE_ACCESS | EFI_VARIABLE_NON_VOLATILE + attribute =3D 0x03, // EFI variable attributes EFI_VARIABLE_BOOTSERV= ICE_ACCESS | EFI_VARIABLE_NON_VOLATILE name =3D TCG2_VERSION, guid =3D TCG2_CONFIG_FORM_SET_GUID; =20 diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c b/SecurityPkg/Tc= g/Tcg2Config/Tcg2ConfigDriver.c index aa33ad1da9..fca5ae2645 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c @@ -240,7 +240,7 @@ InitializeTcg2VersionInfo ( =20 @retval EFI_ALREADY_STARTED The driver already exists in system. @retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack o= f resources. - @retval EFI_SUCCES All the related protocols are installed o= n the driver. + @retval EFI_SUCCESS All the related protocols are installed o= n the driver. @retval Others Fail to install protocols as indicated. =20 **/ diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/= Tcg2Config/Tcg2ConfigPeim.c index b79a4afe41..8c69da7503 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -57,7 +57,7 @@ DetectTpmDevice ( @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. =20 - @retval EFI_SUCCES Convert variable to PCD successfully. + @retval EFI_SUCCESS Convert variable to PCD successfully. @retval Others Fail to convert variable to PCD. **/ EFI_STATUS @@ -118,7 +118,7 @@ Tcg2ConfigPeimEntryPoint ( =20 // // Convert variable to PCD. - // This is work-around because there is no gurantee DynamicHiiPcd can re= turn correct value in DXE phase. + // This is work-around because there is no guarantee DynamicHiiPcd can r= eturn correct value in DXE phase. // Using DynamicPcd instead. // // NOTE: Tcg2Configuration variable contains the desired TpmDevice type, diff --git a/SecurityPkg/Tcg/Tcg2Dxe/MeasureBootPeCoff.c b/SecurityPkg/Tcg/= Tcg2Dxe/MeasureBootPeCoff.c index 4e67ac533f..347c6ab702 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/MeasureBootPeCoff.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/MeasureBootPeCoff.c @@ -86,7 +86,7 @@ Tcg2DxeImageRead ( @param[in] PCRIndex TPM PCR index @param[in] ImageAddress Start address of image buffer. @param[in] ImageSize Image size - @param[out] DigestList Digeest list of this image. + @param[out] DigestList Digest list of this image. =20 @retval EFI_SUCCESS Successfully measure image. @retval EFI_OUT_OF_RESOURCES No enough resource to measure image. diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tc= g2Dxe.c index a75d4dad56..3decc3450f 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -127,7 +127,7 @@ EFI_HANDLE mImageHandle; @param[in] PCRIndex TPM PCR index @param[in] ImageAddress Start address of image buffer. @param[in] ImageSize Image size - @param[out] DigestList Digeest list of this image. + @param[out] DigestList Digest list of this image. =20 @retval EFI_SUCCESS Successfully measure image. @retval EFI_OUT_OF_RESOURCES No enough resource to measure image. diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tc= g2Pei.c index 921adc48f2..f166e2c267 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -79,7 +79,7 @@ UINT32 mMeasuredMaxChildFvIndex =3D 0; UINT32 mMeasuredChildFvIndex =3D 0; =20 /** - Measure and record the Firmware Volum Information once FvInfoPPI install. + Measure and record the Firmware Volume Information once FvInfoPPI instal= l. =20 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES= table published by the PEI Foundation. @param[in] NotifyDescriptor Address of the notification descriptor data= structure. @@ -91,14 +91,14 @@ UINT32 mMeasuredChildFvIndex =3D 0; **/ EFI_STATUS EFIAPI -FirmwareVolmeInfoPpiNotifyCallback ( +FirmwareVolumeInfoPpiNotifyCallback ( IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi ); =20 /** - Record all measured Firmware Volum Information into a Guid Hob + Record all measured Firmware Volume Information into a Guid Hob =20 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES= table published by the PEI Foundation. @param[in] NotifyDescriptor Address of the notification descriptor data= structure. @@ -120,12 +120,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] =3D= { { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfoPpiGuid, - FirmwareVolmeInfoPpiNotifyCallback + FirmwareVolumeInfoPpiNotifyCallback }, { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfo2PpiGuid, - FirmwareVolmeInfoPpiNotifyCallback + FirmwareVolumeInfoPpiNotifyCallback }, { (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMI= NATE_LIST), @@ -136,7 +136,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] =3D { =20 =20 /** - Record all measured Firmware Volum Information into a Guid Hob + Record all measured Firmware Volume Information into a Guid Hob Guid Hob payload layout is =20 UINT32 *************************** FIRMWARE_BLOB number @@ -688,7 +688,7 @@ MeasureMainBios ( } =20 /** - Measure and record the Firmware Volum Information once FvInfoPPI install. + Measure and record the Firmware Volume Information once FvInfoPPI instal= l. =20 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES= table published by the PEI Foundation. @param[in] NotifyDescriptor Address of the notification descriptor data= structure. @@ -700,7 +700,7 @@ MeasureMainBios ( **/ EFI_STATUS EFIAPI -FirmwareVolmeInfoPpiNotifyCallback ( +FirmwareVolumeInfoPpiNotifyCallback ( IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tc= g2Smm.c index 8e5c05d456..f0b61bd966 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c @@ -269,7 +269,7 @@ UpdatePPVersion ( =20 /** Patch interrupt resources returned by TPM _PRS. ResourceTemplate to patc= h is determined by input - interrupt buffer size. BufferSize, PkgLength and interrupt descirptor in= ByteList need to be patched + interrupt buffer size. BufferSize, PkgLength and interrupt descriptor in= ByteList need to be patched =20 @param[in, out] Table The TPM item in ACPI table. @param[in] IrqBuffer Input new IRQ buffer. @@ -304,7 +304,7 @@ UpdatePossibleResource ( // to patch TPM ACPI object _PRS returned ResourceTemplate() containing = 2 resource descriptors and an auto appended End Tag // // AML data is organized by following rule. - // Code need to patch BufferSize and PkgLength and interrupt descirptor= in ByteList + // Code need to patch BufferSize and PkgLength and interrupt descriptor= in ByteList // // =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Buffer =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D // DefBuffer :=3D BufferOp PkgLength BufferSize ByteList @@ -321,8 +321,8 @@ UpdatePossibleResource ( // // //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DBufferSize=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - // BufferSize :=3D Integar - // Integar :=3D ByteConst|WordConst|DwordConst.... + // BufferSize :=3D Integer + // Integer :=3D ByteConst|WordConst|DwordConst.... // // ByteConst :=3D BytePrefix ByteData // @@ -371,7 +371,7 @@ UpdatePossibleResource ( } =20 // - // Include Memory32Fixed Descritor (12 Bytes) + Interrupt Descriptor= header(5 Bytes) + End Tag(2 Bytes) + // Include Memory32Fixed Descriptor (12 Bytes) + Interrupt Descripto= r header(5 Bytes) + End Tag(2 Bytes) // NewPkgLength +=3D 19 + IrqBuffserSize; if (NewPkgLength > 63) { @@ -389,7 +389,7 @@ UpdatePossibleResource ( *DataPtr =3D (UINT8)NewPkgLength; =20 // - // 1.2 Patch BufferSize =3D sizeof(Memory32Fixed Descritor + Interru= pt Descriptor + End Tag). + // 1.2 Patch BufferSize =3D sizeof(Memory32Fixed Descriptor + Interr= upt Descriptor + End Tag). // It is Little endian. So only patch lowest byte of BufferSize= due to current interrupt number limit. // *(DataPtr + 2) =3D (UINT8)(IrqBuffserSize + 19); @@ -445,7 +445,7 @@ UpdatePossibleResource ( } =20 // - // Include Memory32Fixed Descritor (12 Bytes) + Interrupt Descript= or header(5 Bytes) + End Tag(2 Bytes) + // Include Memory32Fixed Descriptor (12 Bytes) + Interrupt Descrip= tor header(5 Bytes) + End Tag(2 Bytes) // NewPkgLength +=3D 19 + IrqBuffserSize; =20 @@ -461,7 +461,7 @@ UpdatePossibleResource ( *(DataPtr + 1) =3D (UINT8)((NewPkgLength & 0xFF0) >> 4); =20 // - // 2.2 Patch BufferSize =3D sizeof(Memory32Fixed Descritor + Inter= rupt Descriptor + End Tag). + // 2.2 Patch BufferSize =3D sizeof(Memory32Fixed Descriptor + Inte= rrupt Descriptor + End Tag). // It is Little endian. Only patch lowest byte of BufferSize d= ue to current interrupt number limit. // *(DataPtr + 2 + ((*DataPtr & (BIT7|BIT6)) >> 6)) =3D (UINT8)(IrqBu= ffserSize + 19); @@ -485,7 +485,7 @@ UpdatePossibleResource ( // DataPtr +=3D NewPkgLength - (5 + IrqBuffserSize + 2); // - // 3.1 Patch Length bit[7:0] of Interrupt descirptor patch interrupt d= escriptor + // 3.1 Patch Length bit[7:0] of Interrupt descriptor patch interrupt d= escriptor // *(DataPtr + 1) =3D (UINT8)(2 + IrqBuffserSize); // @@ -498,7 +498,7 @@ UpdatePossibleResource ( CopyMem(DataPtr + 5, IrqBuffer, IrqBuffserSize); =20 // - // 4. Jump over Interrupt descirptor and Patch END Tag, set Checksum fie= ld to 0 + // 4. Jump over Interrupt descriptor and Patch END Tag, set Checksum fie= ld to 0 // DataPtr +=3D 5 + IrqBuffserSize; *DataPtr =3D ACPI_END_TAG_DESCRIPTOR; @@ -715,7 +715,7 @@ PublishAcpiTable ( mTcgNvs->IsShortFormPkgLength =3D IsShortFormPkgLength; =20 // - // Publish the TPM ACPI table. Table is re-checksumed. + // Publish the TPM ACPI table. Table is re-checksummed. // Status =3D gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID = **) &AcpiTable); ASSERT_EFI_ERROR (Status); diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm.= asl index 9c4b9afa46..7a91708a1a 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl +++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl @@ -76,17 +76,17 @@ DefinitionBlock ( Field (TNVS, AnyAcc, NoLock, Preserve) { PPIN, 8, // Software SMI for Physical Presence Interface - PPIP, 32, // Used for save physical presence paramter + PPIP, 32, // Used for save physical presence parameter PPRP, 32, // Physical Presence request operation response PPRQ, 32, // Physical Presence request operation PPRM, 32, // Physical Presence request operation parameter LPPR, 32, // Last Physical Presence request operation FRET, 32, // Physical Presence function return code MCIN, 8, // Software SMI for Memory Clear Interface - MCIP, 32, // Used for save the Mor paramter + MCIP, 32, // Used for save the Mor parameter MORD, 32, // Memory Overwrite Request Data MRET, 32, // Memory Overwrite function return code - UCRQ, 32, // Phyical Presence request operation to Get User Co= nfirmation Status + UCRQ, 32, // Physical Presence request operation to Get User C= onfirmation Status IRQN, 32, // IRQ Number for _CRS SFRB, 8 // Is shortformed Pkglength for resource buffer } diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c b/SecurityPkg/T= cg/TcgConfigDxe/TcgConfigDriver.c index 3416e8cf38..4bc6086454 100644 --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c @@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 @retval EFI_ALREADY_STARTED The driver already exists in system. @retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack o= f resources. - @retval EFI_SUCCES All the related protocols are installed o= n the driver. + @retval EFI_SUCCESS All the related protocols are installed o= n the driver. @retval Others Fail to install protocols as indicated. =20 **/ diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDx= e.c index a364cd07c5..7019c666b1 100644 --- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c +++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c @@ -79,7 +79,7 @@ EFI_TCG_CLIENT_ACPI_TABLE mTcgClientAcpiTemplat= e =3D { =20 // // The following EFI_TCG_SERVER_ACPI_TABLE default setting is just one exa= mple, -// the TPM device connectes to LPC, and also defined the ACPI _UID as 0xFF, +// the TPM device connects to LPC, and also defined the ACPI _UID as 0xFF, // this _UID can be changed and should match with the _UID setting of the = TPM // ACPI device object // @@ -1224,7 +1224,7 @@ InstallAcpiTable ( mTcgClientAcpiTemplate.Header.CreatorId =3D PcdGet32 (PcdAcpiDe= faultCreatorId); mTcgClientAcpiTemplate.Header.CreatorRevision =3D PcdGet32 (PcdAcpiDe= faultCreatorRevision); // - // The ACPI table must be checksumed before calling the InstallAcpiTab= le() + // The ACPI table must be checksummed before calling the InstallAcpiTa= ble() // service of the ACPI table protocol to install it. // Checksum =3D CalculateCheckSum8 ((UINT8 *)&mTcgClientAcpiTemplate, siz= eof (mTcgClientAcpiTemplate)); @@ -1244,7 +1244,7 @@ InstallAcpiTable ( mTcgServerAcpiTemplate.Header.CreatorId =3D PcdGet32 (PcdAcpiDe= faultCreatorId); mTcgServerAcpiTemplate.Header.CreatorRevision =3D PcdGet32 (PcdAcpiDe= faultCreatorRevision); // - // The ACPI table must be checksumed before calling the InstallAcpiTab= le() + // The ACPI table must be checksummed before calling the InstallAcpiTa= ble() // service of the ACPI table protocol to install it. // Checksum =3D CalculateCheckSum8 ((UINT8 *)&mTcgServerAcpiTemplate, siz= eof (mTcgServerAcpiTemplate)); diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPe= i.c index 203615d0ab..1abb572993 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.c +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c @@ -85,7 +85,7 @@ PhysicalPresencePpiNotifyCallback ( ); =20 /** - Measure and record the Firmware Volum Information once FvInfoPPI install. + Measure and record the Firmware Volume Information once FvInfoPPI instal= l. =20 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES= table published by the PEI Foundation. @param[in] NotifyDescriptor Address of the notification descriptor data= structure. @@ -97,14 +97,14 @@ PhysicalPresencePpiNotifyCallback ( **/ EFI_STATUS EFIAPI -FirmwareVolmeInfoPpiNotifyCallback ( +FirmwareVolumeInfoPpiNotifyCallback ( IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi ); =20 /** - Record all measured Firmware Volum Information into a Guid Hob + Record all measured Firmware Volume Information into a Guid Hob =20 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES= table published by the PEI Foundation. @param[in] NotifyDescriptor Address of the notification descriptor data= structure. @@ -131,12 +131,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] =3D= { { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfoPpiGuid, - FirmwareVolmeInfoPpiNotifyCallback + FirmwareVolumeInfoPpiNotifyCallback }, { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfo2PpiGuid, - FirmwareVolmeInfoPpiNotifyCallback + FirmwareVolumeInfoPpiNotifyCallback }, { (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMI= NATE_LIST), @@ -146,7 +146,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] =3D { }; =20 /** - Record all measured Firmware Volum Information into a Guid Hob + Record all measured Firmware Volume Information into a Guid Hob Guid Hob payload layout is =20 UINT32 *************************** FIRMWARE_BLOB number @@ -501,7 +501,7 @@ MeasureMainBios ( } =20 /** - Measure and record the Firmware Volum Information once FvInfoPPI install. + Measure and record the Firmware Volume Information once FvInfoPPI instal= l. =20 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES= table published by the PEI Foundation. @param[in] NotifyDescriptor Address of the notification descriptor data= structure. @@ -513,7 +513,7 @@ MeasureMainBios ( **/ EFI_STATUS EFIAPI -FirmwareVolmeInfoPpiNotifyCallback ( +FirmwareVolumeInfoPpiNotifyCallback ( IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi @@ -672,7 +672,7 @@ PhysicalPresencePpiNotifyCallback ( } =20 /** - Check if TPM chip is activeated or not. + Check if TPM chip is activated or not. =20 @param[in] PeiServices Describes the list of possible PEI Service= s. =20 diff --git a/SecurityPkg/Tcg/TcgSmm/Tpm.asl b/SecurityPkg/Tcg/TcgSmm/Tpm.asl index 6ddc47ae91..739067dbec 100644 --- a/SecurityPkg/Tcg/TcgSmm/Tpm.asl +++ b/SecurityPkg/Tcg/TcgSmm/Tpm.asl @@ -64,16 +64,16 @@ DefinitionBlock ( Field (TNVS, AnyAcc, NoLock, Preserve) { PPIN, 8, // Software SMI for Physical Presence Interface - PPIP, 32, // Used for save physical presence paramter + PPIP, 32, // Used for save physical presence parameter PPRP, 32, // Physical Presence request operation response PPRQ, 32, // Physical Presence request operation LPPR, 32, // Last Physical Presence request operation FRET, 32, // Physical Presence function return code MCIN, 8, // Software SMI for Memory Clear Interface - MCIP, 32, // Used for save the Mor paramter + MCIP, 32, // Used for save the Mor parameter MORD, 32, // Memory Overwrite Request Data MRET, 32, // Memory Overwrite function return code - UCRQ, 32 // Phyical Presence request operation to Get User Co= nfirmation Status + UCRQ, 32 // Physical Presence request operation to Get User C= onfirmation Status } =20 Method (PTS, 1, Serialized) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigDriver.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Se= cureBootConfigDriver.c index 6c0294151e..8936a0a634 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gDriver.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gDriver.c @@ -16,7 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 @retval EFI_ALREADY_STARTED The driver already exists in system. @retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack o= f resources. - @retval EFI_SUCCES All the related protocols are installed o= n the driver. + @retval EFI_SUCCESS All the related protocols are installed o= n the driver. @retval Others Fail to get the SecureBootEnable variable. =20 **/ diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigDxe.inf b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Sec= ureBootConfigDxe.inf index 55a4239252..573efa6379 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gDxe.inf +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gDxe.inf @@ -1,5 +1,5 @@ ## @file -# Provides the capbility to configure secure boot in a setup browser +# Provides the capability to configure secure boot in a setup browser # By this module, user may change the content of DB, DBX, PK and KEK. # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigDxe.uni b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Sec= ureBootConfigDxe.uni index 56097deee5..4e9c6f3ff7 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gDxe.uni +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gDxe.uni @@ -1,5 +1,5 @@ // /** @file -// Provides the capbility to configure secure boot in a setup browser +// Provides the capability to configure secure boot in a setup browser // // By this module, user may change the content of DB, DBX, PK and KEK. // diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.c index 7e018ce95d..6f8e87d869 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c @@ -234,7 +234,7 @@ SaveSecureBootVariable ( it's caller's responsibility to free th= e memory when finish using it. =20 @retval EFI_SUCCESS Create time based payload successfully. - @retval EFI_OUT_OF_RESOURCES There are not enough memory resourses t= o create time based payload. + @retval EFI_OUT_OF_RESOURCES There are not enough memory resources t= o create time based payload. @retval EFI_INVALID_PARAMETER The parameter is invalid. @retval Others Unexpected error happens. =20 @@ -390,7 +390,7 @@ SetSecureBootMode ( @param[out] PkCert Point to the data buffer to store the= signature list. =20 @return EFI_UNSUPPORTED Unsupported Key Length. - @return EFI_OUT_OF_RESOURCES There are not enough memory resourses= to form the signature list. + @return EFI_OUT_OF_RESOURCES There are not enough memory resources= to form the signature list. =20 **/ EFI_STATUS @@ -507,7 +507,7 @@ EnrollPlatformKey ( DEBUG ((DEBUG_INFO, "FilePostFix =3D %s\n", FilePostFix)); =20 // - // Prase the selected PK file and generature PK certificate list. + // Prase the selected PK file and generate PK certificate list. // Status =3D CreatePkX509SignatureList ( Private->FileContext->FHandle, @@ -1088,7 +1088,7 @@ IsSignatureFoundInDatabase ( } =20 // - // Enumerate all signature data in SigDB to check if executable's signat= ure exists. + // Enumerate all signature data in SigDB to check if signature exists fo= r executable. // CertList =3D (EFI_SIGNATURE_LIST *) Data; while ((DataSize > 0) && (DataSize >=3D CertList->SignatureListSize)) { @@ -1312,7 +1312,7 @@ Done: /** Check whether the signature list exists in given variable data. =20 - It searches the signature list for the ceritificate hash by CertType. + It searches the signature list for the certificate hash by CertType. If the signature list is found, get the offset of Database for the next hash of a certificate. =20 @@ -2107,7 +2107,7 @@ HashPeImageByType ( } =20 /** - Enroll a new executable's signature into Signature Database. + Enroll a new signature of executable into Signature Database. =20 @param[in] PrivateData The module's private data. @param[in] VariableName Variable name of signature database, must be @@ -2177,7 +2177,7 @@ EnrollAuthentication2Descriptor ( } =20 // - // Diretly set AUTHENTICATION_2 data to SetVariable + // Directly set AUTHENTICATION_2 data to SetVariable // Status =3D gRT->SetVariable( VariableName, @@ -2208,7 +2208,7 @@ ON_EXIT: =20 =20 /** - Enroll a new executable's signature into Signature Database. + Enroll a new signature of executable into Signature Database. =20 @param[in] PrivateData The module's private data. @param[in] VariableName Variable name of signature database, must be @@ -2247,7 +2247,7 @@ EnrollImageSignatureToSigDB ( // Form the SigDB certificate list. // Format the data item into EFI_SIGNATURE_LIST type. // - // We need to parse executable's signature data from specified signed ex= ecutable file. + // We need to parse signature data of executable from specified signed e= xecutable file. // In current implementation, we simply trust the pass-in signed executa= ble file. // In reality, it's OS's responsibility to verify the signed executable = file. // @@ -3269,7 +3269,7 @@ SecureBootExtractConfigFromVariable ( SecureBootMode =3D NULL; =20 // - // Initilize the Date and Time using system time. + // Initialize the Date and Time using system time. // ConfigData->CertificateFormat =3D HASHALG_RAW; ConfigData->AlwaysRevocation =3D TRUE; @@ -3306,7 +3306,7 @@ SecureBootExtractConfigFromVariable ( } =20 // - // Check SecureBootEnable & Pk status, fix the inconsistence. + // Check SecureBootEnable & Pk status, fix the inconsistency. // If the SecureBootEnable Variable doesn't exist, hide the SecureBoot E= nable/Disable // Checkbox. // @@ -3314,7 +3314,7 @@ SecureBootExtractConfigFromVariable ( GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableG= uid, (VOID**)&SecureBootEnable, NULL); =20 // - // Fix Pk, SecureBootEnable inconsistence + // Fix Pk and SecureBootEnable inconsistency // if ((SetupMode !=3D NULL) && (*SetupMode) =3D=3D USER_MODE) { ConfigData->HideSecureBoot =3D FALSE; diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.h index 32e9619e91..1fafae07ac 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.h +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.h @@ -172,7 +172,7 @@ typedef struct { CURRENT_VARIABLE_NAME VariableName; // The variable name= we are processing. UINT32 ListCount; // Record current va= riable has how many signature list. UINTN ListIndex; // Record which sign= ature list is processing. - BOOLEAN *CheckArray; // Record whcih siga= nture data checked. + BOOLEAN *CheckArray; // Record which sign= ature data checked. } SECUREBOOT_CONFIG_PRIVATE_DATA; =20 extern SECUREBOOT_CONFIG_PRIVATE_DATA mSecureBootConfigPrivateDateTem= plate; @@ -182,7 +182,7 @@ extern SECUREBOOT_CONFIG_PRIVATE_DATA *gSecureBoot= PrivateData; #define SECUREBOOT_CONFIG_PRIVATE_FROM_THIS(a) CR (a, SECUREBOOT_CONFIG_P= RIVATE_DATA, ConfigAccess, SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE) =20 // -// Cryptograhpic Key Information +// Cryptographic Key Information // #pragma pack(1) typedef struct _CPL_KEY_INFO { @@ -448,12 +448,12 @@ CleanUpPage ( =20 /** Read file content into BufferPtr, the size of the allocate buffer - is *FileSize plus AddtionAllocateSize. + is *FileSize plus AdditionAllocateSize. =20 @param[in] FileHandle The file to be read. @param[in, out] BufferPtr Pointers to the pointer of alloca= ted buffer. @param[out] FileSize Size of input file - @param[in] AddtionAllocateSize Addtion size the buffer need to b= e allocated. + @param[in] AdditionAllocateSize Addition size the buffer need to= be allocated. In case the buffer need to contai= n others besides the file content. =20 @retval EFI_SUCCESS The file was read into the buffer. @@ -467,7 +467,7 @@ ReadFileContent ( IN EFI_FILE_HANDLE FileHandle, IN OUT VOID **BufferPtr, OUT UINTN *FileSize, - IN UINTN AddtionAllocateSize + IN UINTN AdditionAllocateSize ); =20 =20 diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigMisc.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigMisc.c index f5ce94e06d..3730fbe646 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gMisc.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gMisc.c @@ -10,12 +10,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 /** Read file content into BufferPtr, the size of the allocate buffer - is *FileSize plus AddtionAllocateSize. + is *FileSize plus AdditionAllocateSize. =20 @param[in] FileHandle The file to be read. @param[in, out] BufferPtr Pointers to the pointer of alloca= ted buffer. @param[out] FileSize Size of input file - @param[in] AddtionAllocateSize Addtion size the buffer need to b= e allocated. + @param[in] AdditionAllocateSize Addition size the buffer need to= be allocated. In case the buffer need to contai= n others besides the file content. =20 @retval EFI_SUCCESS The file was read into the buffer. @@ -29,7 +29,7 @@ ReadFileContent ( IN EFI_FILE_HANDLE FileHandle, IN OUT VOID **BufferPtr, OUT UINTN *FileSize, - IN UINTN AddtionAllocateSize + IN UINTN AdditionAllocateSize ) =20 { @@ -62,7 +62,7 @@ ReadFileContent ( goto ON_EXIT; } =20 - BufferSize =3D (UINTN) SourceFileSize + AddtionAllocateSize; + BufferSize =3D (UINTN) SourceFileSize + AdditionAllocateSize; Buffer =3D AllocateZeroPool(BufferSize); if (Buffer =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigNvData.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Se= cureBootConfigNvData.h index 8ea551d88e..6e54a4b0f2 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gNvData.h +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gNvData.h @@ -122,7 +122,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // typedef struct { BOOLEAN AttemptSecureBoot; // Attempt to enable/disable Secure Boot - BOOLEAN HideSecureBoot; // Hiden Attempt Secure Boot + BOOLEAN HideSecureBoot; // Hidden Attempt Secure Boot CHAR16 SignatureGuid[SECURE_BOOT_GUID_STORAGE_SIZE]; BOOLEAN PhysicalPresent; // If a Physical Present User UINT8 SecureBootMode; // Secure Boot Mode: Standard Or Custom @@ -132,7 +132,7 @@ typedef struct { UINT8 CertificateFormat; // The type of the certificate EFI_HII_DATE RevocationDate; // The revocation date of the certificate EFI_HII_TIME RevocationTime; // The revocation time of the certificate - UINT8 FileEnrollType; // File type of sigunature enroll + UINT8 FileEnrollType; // File type of signature enroll UINT32 ListCount; // The count of signature list. UINT32 CheckedDataCount; // The count of checked signature data. } SECUREBOOT_CONFIGURATION; diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigStrings.uni b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe= /SecureBootConfigStrings.uni index a412d5bfe9..ac783453cc 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gStrings.uni +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gStrings.uni @@ -45,8 +45,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #string STR_DBX_PE_IMAGE_FORMAT_HELP #language en-US "PE image enrol= led. Use SHA256 hash to enroll it into DBX" #string STR_DBX_PE_FORMAT_SHA256 #language en-US "PE Image SHA25= 6" =20 -#string STR_DBX_AUTH_2_FORMAT_HELP #language en-US "VARIABLE_AUTHE= NICATION_2 binary enrolled. Use raw binary to enroll it into DBX" -#string STR_DBX_AUTH_2_FORMAT #language en-US "VARIABLE_AUTHE= NICATION_2" +#string STR_DBX_AUTH_2_FORMAT_HELP #language en-US "VARIABLE_AUTHE= NTICATION_2 binary enrolled. Use raw binary to enroll it into DBX" +#string STR_DBX_AUTH_2_FORMAT #language en-US "VARIABLE_AUTHE= NTICATION_2" =20 #string STR_CERTIFICATE_REVOCATION_TIME_PROMPT #language en-US " Revocati= on Time" #string STR_CERTIFICATE_REVOCATION_TIME_HELP #language en-US "Input the = revocation time of the certificate" --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49356): https://edk2.groups.io/g/devel/message/49356 Mute This Topic: https://groups.io/mt/36446733/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-