mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr
PcdConfidentialComputingGuestAttr can be used to check the cc guest type, including td-guest or sev-guest. CcProbe() can do the same thing but CcProbeLib should be included in the dsc which uses AcpiPlatformDxe. The difference between PcdConfidentialComputingGuestAttr and CcProbe() is that PcdConfidentialComputingGuestAttr cannot be used in multi-processor scenario but CcProbe() can. But there is no such issue in AcpiPlatformDxe. So we use PcdConfidentialComputingGuestAttr instead of CcProbeLib so that it is simpler. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
This commit is contained in:
parent
ec87305f90
commit
8cb4b429a2
@ -8,9 +8,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
|
#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
|
||||||
|
#include <ConfidentialComputingGuestAttr.h>
|
||||||
#include <Library/CcProbeLib.h> // CcProbe(), CcGuestTypeIntelTdx
|
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +33,7 @@ InstallAcpiTables (
|
|||||||
|
|
||||||
HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
|
HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
|
||||||
if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
|
if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
|
||||||
if (CcProbe () == CcGuestTypeIntelTdx) {
|
if (CC_GUEST_IS_TDX (PcdGet64 (PcdConfidentialComputingGuestAttr))) {
|
||||||
Status = InstallCloudHvTablesTdx (AcpiTable);
|
Status = InstallCloudHvTablesTdx (AcpiTable);
|
||||||
} else {
|
} else {
|
||||||
Status = InstallCloudHvTables (AcpiTable);
|
Status = InstallCloudHvTables (AcpiTable);
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
HobLib
|
HobLib
|
||||||
CcProbeLib
|
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
@ -62,6 +61,7 @@
|
|||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiAcpiTableProtocolGuid
|
gEfiAcpiTableProtocolGuid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user