36 ASSERT (ByteIndex < VIRT_HSTI_SECURITY_FEATURE_SIZE);
37 VirtHsti->SecurityFeaturesRequired[ByteIndex] |= BitMask;
38 VirtHsti->SecurityFeaturesImplemented[ByteIndex] |= BitMask;
48 ASSERT (ByteIndex < VIRT_HSTI_SECURITY_FEATURE_SIZE);
49 return VirtHsti->SecurityFeaturesImplemented[ByteIndex] & BitMask;
61 ASSERT (ByteIndex < VIRT_HSTI_SECURITY_FEATURE_SIZE);
64 DEBUG ((DEBUG_ERROR,
"VirtHsti: Test failed: %s\n", ErrorMsg));
66 PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE,
73 PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE,
84VirtHstiGetHostBridgeDevId (
94 return PlatformInfo->HostBridgeDevId;
100VirtHstiOnReadyToBoot (
105 switch (VirtHstiGetHostBridgeDevId ()) {
106 case INTEL_82441_DEVICE_ID:
107 VirtHstiQemuPCVerify ();
108 VirtHstiQemuCommonVerify ();
110 case INTEL_Q35_MCH_DEVICE_ID:
111 VirtHstiQemuQ35Verify ();
112 VirtHstiQemuCommonVerify ();
119 gBS->CloseEvent (Event);
144 if (
PcdGet64 (PcdConfidentialComputingGuestAttr)) {
145 DEBUG ((DEBUG_INFO,
"%a: confidential guest\n", __func__));
146 return EFI_UNSUPPORTED;
149 DevId = VirtHstiGetHostBridgeDevId ();
151 case INTEL_82441_DEVICE_ID:
152 VirtHsti = VirtHstiQemuPCInit ();
153 VirtHstiQemuCommonInit (VirtHsti);
155 case INTEL_Q35_MCH_DEVICE_ID:
156 VirtHsti = VirtHstiQemuQ35Init ();
157 VirtHstiQemuCommonInit (VirtHsti);
160 DEBUG ((DEBUG_INFO,
"%a: unknown platform (0x%x)\n", __func__, DevId));
161 return EFI_UNSUPPORTED;
165 if (EFI_ERROR (Status)) {
166 if (Status != EFI_ALREADY_STARTED) {
173 VirtHstiOnReadyToBoot,
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
EFI_STATUS EFIAPI HstiLibAppendErrorString(IN UINT32 Role, IN CHAR16 *ImplementationID OPTIONAL, IN CHAR16 *ErrorString)
EFI_STATUS EFIAPI HstiLibSetFeaturesVerified(IN UINT32 Role, IN CHAR16 *ImplementationID OPTIONAL, IN UINT32 ByteIndex, IN UINT8 BitMask)
EFI_STATUS EFIAPI HstiLibSetTable(IN VOID *Hsti, IN UINTN HstiSize)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdGet64(TokenName)
EFI_STATUS EFIAPI EfiCreateEventReadyToBootEx(IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN VOID *NotifyContext OPTIONAL, OUT EFI_EVENT *ReadyToBootEvent)
EFI_STATUS EFIAPI VirtHstiDxeEntrypoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)