Last change
on this file was 101291, checked in by vboxsync, 16 months ago |
EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Line | |
---|
1 | /** @file
|
---|
2 | OVMF ACPI Platform Driver
|
---|
3 |
|
---|
4 | Copyright (C) 2015, Red Hat, Inc.
|
---|
5 | Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
---|
6 |
|
---|
7 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
|
---|
11 | #include <ConfidentialComputingGuestAttr.h>
|
---|
12 |
|
---|
13 | #include <Library/AcpiPlatformLib.h>
|
---|
14 |
|
---|
15 | #include "AcpiPlatform.h"
|
---|
16 |
|
---|
17 | /**
|
---|
18 | Effective entrypoint of Acpi Platform driver.
|
---|
19 |
|
---|
20 | @param ImageHandle
|
---|
21 | @param SystemTable
|
---|
22 |
|
---|
23 | @return EFI_SUCCESS
|
---|
24 | @return EFI_LOAD_ERROR
|
---|
25 | @return EFI_OUT_OF_RESOURCES
|
---|
26 |
|
---|
27 | **/
|
---|
28 | EFI_STATUS
|
---|
29 | EFIAPI
|
---|
30 | InstallAcpiTables (
|
---|
31 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
|
---|
32 | )
|
---|
33 | {
|
---|
34 | EFI_STATUS Status;
|
---|
35 | UINT16 HostBridgeDevId;
|
---|
36 |
|
---|
37 | HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
|
---|
38 | if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
|
---|
39 | if (CC_GUEST_IS_TDX (PcdGet64 (PcdConfidentialComputingGuestAttr))) {
|
---|
40 | Status = InstallCloudHvTablesTdx (AcpiTable);
|
---|
41 | } else {
|
---|
42 | Status = InstallCloudHvTables (AcpiTable);
|
---|
43 | }
|
---|
44 | } else {
|
---|
45 | Status = InstallQemuFwCfgTables (AcpiTable);
|
---|
46 | }
|
---|
47 |
|
---|
48 | return Status;
|
---|
49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.