diff --git a/OvmfPkg/Include/WorkArea.h b/OvmfPkg/Include/WorkArea.h index b67edd14e7..bf56fc4a6f 100644 --- a/OvmfPkg/Include/WorkArea.h +++ b/OvmfPkg/Include/WorkArea.h @@ -10,14 +10,7 @@ #ifndef __OVMF_WORK_AREA_H__ #define __OVMF_WORK_AREA_H__ -// -// Guest type for the work area -// -typedef enum { - GUEST_TYPE_NON_ENCRYPTED, - GUEST_TYPE_AMD_SEV, - GUEST_TYPE_INTEL_TDX, -} GUEST_TYPE; +#include // // Confidential computing work area header definition. Any change diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c index 3f8f91a5da..41d1246a5b 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c @@ -36,7 +36,7 @@ GetSevEsWorkArea ( // // If its not SEV guest then SevEsWorkArea is not valid. // - if ((WorkArea == NULL) || (WorkArea->Header.GuestType != GUEST_TYPE_AMD_SEV)) { + if ((WorkArea == NULL) || (WorkArea->Header.GuestType != CcGuestTypeAmdSev)) { return NULL; } diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c index 80aceba01b..27148c7e33 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c @@ -36,7 +36,7 @@ GetSevEsWorkArea ( // // If its not SEV guest then SevEsWorkArea is not valid. // - if ((WorkArea == NULL) || (WorkArea->Header.GuestType != GUEST_TYPE_AMD_SEV)) { + if ((WorkArea == NULL) || (WorkArea->Header.GuestType != CcGuestTypeAmdSev)) { return NULL; } diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c index b8230613dc..7ab7027af1 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c @@ -35,7 +35,7 @@ QemuFwCfgIsTdxGuest ( CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER *CcWorkAreaHeader; CcWorkAreaHeader = (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER *)FixedPcdGet32 (PcdOvmfWorkAreaBase); - return (CcWorkAreaHeader != NULL && CcWorkAreaHeader->GuestType == GUEST_TYPE_INTEL_TDX); + return (CcWorkAreaHeader != NULL && CcWorkAreaHeader->GuestType == CcGuestTypeIntelTdx); } /** diff --git a/OvmfPkg/Sec/AmdSev.c b/OvmfPkg/Sec/AmdSev.c index d8fd35650d..6af38aaf46 100644 --- a/OvmfPkg/Sec/AmdSev.c +++ b/OvmfPkg/Sec/AmdSev.c @@ -251,7 +251,7 @@ IsSevGuest ( WorkArea = (OVMF_WORK_AREA *)FixedPcdGet32 (PcdOvmfWorkAreaBase); - return ((WorkArea != NULL) && (WorkArea->Header.GuestType == GUEST_TYPE_AMD_SEV)); + return ((WorkArea != NULL) && (WorkArea->Header.GuestType == CcGuestTypeAmdSev)); } /**