VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/PlatformPei/IntelTdx.c@ 107675

最後變更 在這個檔案從107675是 99404,由 vboxsync 提交於 2 年 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.2 KB
 
1/** @file
2 Initialize Intel TDX support.
3
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#include <PiPei.h>
11#include <Library/BaseLib.h>
12#include <Library/DebugLib.h>
13#include <Library/HobLib.h>
14#include <Library/BaseMemoryLib.h>
15#include <Library/MemoryAllocationLib.h>
16#include <IndustryStandard/Tdx.h>
17#include <IndustryStandard/QemuFwCfg.h>
18#include <Library/QemuFwCfgLib.h>
19#include <Library/PeiServicesLib.h>
20#include <Library/TdxLib.h>
21#include <Library/TdxHelperLib.h>
22#include <Library/PlatformInitLib.h>
23#include <WorkArea.h>
24#include <ConfidentialComputingGuestAttr.h>
25#include "Platform.h"
26
27/**
28 This Function checks if TDX is available, if present then it sets
29 the dynamic PCDs for Tdx guest.
30 **/
31VOID
32IntelTdxInitialize (
33 VOID
34 )
35{
36 #ifdef MDE_CPU_X64
37 RETURN_STATUS PcdStatus;
38
39 if (!TdIsEnabled ()) {
40 return;
41 }
42
43 TdxHelperBuildGuidHobForTdxMeasurement ();
44
45 PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrIntelTdx);
46 ASSERT_RETURN_ERROR (PcdStatus);
47
48 PcdStatus = PcdSet64S (PcdTdxSharedBitMask, TdSharedPageMask ());
49 ASSERT_RETURN_ERROR (PcdStatus);
50
51 PcdStatus = PcdSetBoolS (PcdSetNxForStack, TRUE);
52 ASSERT_RETURN_ERROR (PcdStatus);
53 #endif
54}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette