TianoCore EDK2
master
Loading...
Searching...
No Matches
IoMmuDxe.c
Go to the documentation of this file.
1
12
#include "
CcIoMmu.h
"
13
14
EFI_STATUS
15
EFIAPI
16
IoMmuDxeEntryPoint (
17
IN
EFI_HANDLE
ImageHandle,
18
IN
EFI_SYSTEM_TABLE
*SystemTable
19
)
20
{
21
EFI_STATUS
Status;
22
EFI_HANDLE
Handle;
23
24
//
25
// When SEV or TDX is enabled, install IoMmu protocol otherwise install the
26
// placeholder protocol so that other dependent module can run.
27
//
28
if
(
MemEncryptSevIsEnabled
() ||
MemEncryptTdxIsEnabled
()) {
29
Status =
InstallIoMmuProtocol
();
30
}
else
{
31
Handle =
NULL
;
32
33
Status =
gBS
->InstallMultipleProtocolInterfaces (
34
&Handle,
35
&gIoMmuAbsentProtocolGuid,
36
NULL
,
37
NULL
38
);
39
}
40
41
return
Status;
42
}
InstallIoMmuProtocol
EFI_STATUS EFIAPI InstallIoMmuProtocol(VOID)
Definition:
CcIoMmu.c:929
CcIoMmu.h
NULL
#define NULL
Definition:
Base.h:319
IN
#define IN
Definition:
Base.h:279
MemEncryptSevIsEnabled
BOOLEAN EFIAPI MemEncryptSevIsEnabled(VOID)
Definition:
DxeMemEncryptSevLibInternal.c:143
MemEncryptTdxIsEnabled
BOOLEAN EFIAPI MemEncryptTdxIsEnabled(VOID)
Definition:
BaseMemoryEncryptionNull.c:29
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
gBS
EFI_BOOT_SERVICES * gBS
Definition:
UefiBootServicesTableLib.c:17
EFI_SYSTEM_TABLE
Definition:
UefiSpec.h:2028
OvmfPkg
IoMmuDxe
IoMmuDxe.c
Generated on Fri Nov 15 2024 18:01:20 for TianoCore EDK2 by
1.9.6