X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FLibrary%2FBaseMemEncryptSevLib%2FSecMemEncryptSevLibInternal.c;h=b5b365641499bba7b872acfe5c8190de2d464f30;hb=ac0a286f4d74;hp=56d8f3f3183f95236e34c3cfdc41febc6e50af10;hpb=d1050b9dff1cace252aff86630bfdb59dff5f507;p=mirror_edk2.git diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c index 56d8f3f318..b5b3656414 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c @@ -35,8 +35,8 @@ InternalMemEncryptSevStatus ( ReadSevMsr = FALSE; - SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); - if (SevEsWorkArea != NULL && SevEsWorkArea->EncryptionMask != 0) { + SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *)FixedPcdGet32 (PcdSevEsWorkAreaBase); + if ((SevEsWorkArea != NULL) && (SevEsWorkArea->EncryptionMask != 0)) { // // The MSR has been read before, so it is safe to read it again and avoid // having to validate the CPUID information. @@ -74,7 +74,7 @@ MemEncryptSevEsIsEnabled ( VOID ) { - MSR_SEV_STATUS_REGISTER Msr; + MSR_SEV_STATUS_REGISTER Msr; Msr.Uint32 = InternalMemEncryptSevStatus (); @@ -93,7 +93,7 @@ MemEncryptSevIsEnabled ( VOID ) { - MSR_SEV_STATUS_REGISTER Msr; + MSR_SEV_STATUS_REGISTER Msr; Msr.Uint32 = InternalMemEncryptSevStatus (); @@ -115,7 +115,7 @@ MemEncryptSevGetEncryptionMask ( SEC_SEV_ES_WORK_AREA *SevEsWorkArea; UINT64 EncryptionMask; - SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); + SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *)FixedPcdGet32 (PcdSevEsWorkAreaBase); if (SevEsWorkArea != NULL) { EncryptionMask = SevEsWorkArea->EncryptionMask; } else { @@ -147,8 +147,8 @@ MemEncryptSevGetEncryptionMask ( RETURN_STATUS EFIAPI MemEncryptSevLocateInitialSmramSaveStateMapPages ( - OUT UINTN *BaseAddress, - OUT UINTN *NumberOfPages + OUT UINTN *BaseAddress, + OUT UINTN *NumberOfPages ) { return RETURN_UNSUPPORTED;