]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - OvmfPkg/IoMmuDxe/IoMmuDxe.c
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / IoMmuDxe / IoMmuDxe.c
... / ...
CommitLineData
1/** @file\r
2\r
3 IoMmuDxe driver installs EDKII_IOMMU_PROTOCOL to provide the support for DMA\r
4 operations when SEV is enabled.\r
5\r
6 Copyright (c) 2017, AMD Inc. All rights reserved.<BR>\r
7\r
8 SPDX-License-Identifier: BSD-2-Clause-Patent\r
9\r
10**/\r
11\r
12#include "AmdSevIoMmu.h"\r
13\r
14EFI_STATUS\r
15EFIAPI\r
16IoMmuDxeEntryPoint (\r
17 IN EFI_HANDLE ImageHandle,\r
18 IN EFI_SYSTEM_TABLE *SystemTable\r
19 )\r
20{\r
21 EFI_STATUS Status;\r
22 EFI_HANDLE Handle;\r
23\r
24 //\r
25 // When SEV is enabled, install IoMmu protocol otherwise install the\r
26 // placeholder protocol so that other dependent module can run.\r
27 //\r
28 if (MemEncryptSevIsEnabled ()) {\r
29 Status = AmdSevInstallIoMmuProtocol ();\r
30 } else {\r
31 Handle = NULL;\r
32\r
33 Status = gBS->InstallMultipleProtocolInterfaces (\r
34 &Handle,\r
35 &gIoMmuAbsentProtocolGuid,\r
36 NULL,\r
37 NULL\r
38 );\r
39 }\r
40\r
41 return Status;\r
42}\r