Last change
on this file since 99404 was 99404, checked in by vboxsync, 23 months ago |
Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643
|
-
Property svn:eol-style
set to
native
|
File size:
934 bytes
|
Line | |
---|
1 | /** @file
|
---|
2 |
|
---|
3 | IoMmuDxe driver installs EDKII_IOMMU_PROTOCOL to provide the support for DMA
|
---|
4 | operations when SEV is enabled.
|
---|
5 |
|
---|
6 | Copyright (c) 2017, AMD Inc. All rights reserved.<BR>
|
---|
7 |
|
---|
8 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
9 |
|
---|
10 | **/
|
---|
11 |
|
---|
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 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.