VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Include/IndustryStandard/IntelTdx.h

Last change on this file was 99404, checked in by vboxsync, 2 years ago

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

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/** @file
2 Defines the defitions used by TDX in OvmfPkg.
3
4 Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#ifndef OVMF_INTEL_TDX_H_
10#define OVMF_INTEL_TDX_H_
11
12#include <PiPei.h>
13#include <Library/BaseLib.h>
14#include <Uefi/UefiSpec.h>
15#include <Uefi/UefiBaseType.h>
16
17#define MP_CPU_PROTECTED_MODE_MAILBOX_APICID_INVALID 0xFFFFFFFF
18#define MP_CPU_PROTECTED_MODE_MAILBOX_APICID_BROADCAST 0xFFFFFFFE
19
20typedef enum {
21 MpProtectedModeWakeupCommandNoop = 0,
22 MpProtectedModeWakeupCommandWakeup = 1,
23 MpProtectedModeWakeupCommandSleep = 2,
24 MpProtectedModeWakeupCommandAcceptPages = 3,
25} MP_CPU_PROTECTED_MODE_WAKEUP_CMD;
26
27#pragma pack(1)
28
29//
30// Describes the CPU MAILBOX control structure use to
31// wakeup cpus spinning in long mode
32//
33typedef struct {
34 UINT16 Command;
35 UINT16 Resv;
36 UINT32 ApicId;
37 UINT64 WakeUpVector;
38 UINT8 ResvForOs[2032];
39 //
40 // Arguments available for wakeup code
41 //
42 UINT64 WakeUpArgs1;
43 UINT64 WakeUpArgs2;
44 UINT64 WakeUpArgs3;
45 UINT64 WakeUpArgs4;
46 UINT8 Pad1[0xe0];
47 UINT64 NumCpusArriving;
48 UINT8 Pad2[0xf8];
49 UINT64 NumCpusExiting;
50 UINT32 Tallies[256];
51 UINT8 Errors[256];
52 UINT8 Pad3[0xf8];
53} MP_WAKEUP_MAILBOX;
54
55//
56// AP relocation code information including code address and size,
57// this structure will be shared be C code and assembly code.
58// It is natural aligned by design.
59//
60typedef struct {
61 UINT8 *RelocateApLoopFuncAddress;
62 UINTN RelocateApLoopFuncSize;
63} MP_RELOCATION_MAP;
64
65#pragma pack()
66
67#endif
Note: See TracBrowser for help on using the repository browser.

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