TianoCore EDK2 master
Loading...
Searching...
No Matches
Tdx.h File Reference

Go to the source code of this file.

Data Structures

struct  TDCALL_GENERIC_RETURN_DATA
 
struct  TDCALL_INFO_RETURN_DATA
 
union  VMX_EXIT_QUALIFICATION
 
struct  TDCALL_VEINFO_RETURN_DATA
 
union  TD_RETURN_DATA
 
struct  TD_REPORT_TYPE
 
struct  REPORTMACSTRUCT
 
struct  TEE_TCB_SVN
 
struct  TEE_TCB_INFO
 
struct  TDINFO
 
struct  TDREPORT_STRUCT
 

Macros

#define EXIT_REASON_EXTERNAL_INTERRUPT   1
 
#define EXIT_REASON_TRIPLE_FAULT   2
 
#define EXIT_REASON_PENDING_INTERRUPT   7
 
#define EXIT_REASON_NMI_WINDOW   8
 
#define EXIT_REASON_TASK_SWITCH   9
 
#define EXIT_REASON_CPUID   10
 
#define EXIT_REASON_HLT   12
 
#define EXIT_REASON_INVD   13
 
#define EXIT_REASON_INVLPG   14
 
#define EXIT_REASON_RDPMC   15
 
#define EXIT_REASON_RDTSC   16
 
#define EXIT_REASON_VMCALL   18
 
#define EXIT_REASON_VMCLEAR   19
 
#define EXIT_REASON_VMLAUNCH   20
 
#define EXIT_REASON_VMPTRLD   21
 
#define EXIT_REASON_VMPTRST   22
 
#define EXIT_REASON_VMREAD   23
 
#define EXIT_REASON_VMRESUME   24
 
#define EXIT_REASON_VMWRITE   25
 
#define EXIT_REASON_VMOFF   26
 
#define EXIT_REASON_VMON   27
 
#define EXIT_REASON_CR_ACCESS   28
 
#define EXIT_REASON_DR_ACCESS   29
 
#define EXIT_REASON_IO_INSTRUCTION   30
 
#define EXIT_REASON_MSR_READ   31
 
#define EXIT_REASON_MSR_WRITE   32
 
#define EXIT_REASON_INVALID_STATE   33
 
#define EXIT_REASON_MSR_LOAD_FAIL   34
 
#define EXIT_REASON_MWAIT_INSTRUCTION   36
 
#define EXIT_REASON_MONITOR_TRAP_FLAG   37
 
#define EXIT_REASON_MONITOR_INSTRUCTION   39
 
#define EXIT_REASON_PAUSE_INSTRUCTION   40
 
#define EXIT_REASON_MCE_DURING_VMENTRY   41
 
#define EXIT_REASON_TPR_BELOW_THRESHOLD   43
 
#define EXIT_REASON_APIC_ACCESS   44
 
#define EXIT_REASON_EOI_INDUCED   45
 
#define EXIT_REASON_GDTR_IDTR   46
 
#define EXIT_REASON_LDTR_TR   47
 
#define EXIT_REASON_EPT_VIOLATION   48
 
#define EXIT_REASON_EPT_MISCONFIG   49
 
#define EXIT_REASON_INVEPT   50
 
#define EXIT_REASON_RDTSCP   51
 
#define EXIT_REASON_PREEMPTION_TIMER   52
 
#define EXIT_REASON_INVVPID   53
 
#define EXIT_REASON_WBINVD   54
 
#define EXIT_REASON_XSETBV   55
 
#define EXIT_REASON_APIC_WRITE   56
 
#define EXIT_REASON_RDRAND   57
 
#define EXIT_REASON_INVPCID   58
 
#define EXIT_REASON_VMFUNC   59
 
#define EXIT_REASON_ENCLS   60
 
#define EXIT_REASON_RDSEED   61
 
#define EXIT_REASON_PML_FULL   62
 
#define EXIT_REASON_XSAVES   63
 
#define EXIT_REASON_XRSTORS   64
 
#define TDX_EXIT_REASON_SUCCESS   0x0000000000000000
 
#define TDX_EXIT_REASON_PAGE_ALREADY_ACCEPTED   0x00000B0A00000000
 
#define TDX_EXIT_REASON_PAGE_SIZE_MISMATCH   0xC0000B0B00000000
 
#define TDX_EXIT_REASON_OPERAND_INVALID   0xC000010000000000
 
#define TDX_EXIT_REASON_OPERAND_BUSY   0x8000020000000000
 
#define TDCALL_ACCEPT_PAGE_SIZE_4K   0
 
#define TDCALL_ACCEPT_PAGE_SIZE_2M   1
 
#define TDCALL_ACCEPT_PAGE_SIZE_1G   2
 
#define TDCALL_TDVMCALL   0
 
#define TDCALL_TDINFO   1
 
#define TDCALL_TDEXTENDRTMR   2
 
#define TDCALL_TDGETVEINFO   3
 
#define TDCALL_TDREPORT   4
 
#define TDCALL_TDSETCPUIDVE   5
 
#define TDCALL_TDACCEPTPAGE   6
 
#define TDVMCALL_CPUID   0x0000a
 
#define TDVMCALL_HALT   0x0000c
 
#define TDVMCALL_IO   0x0001e
 
#define TDVMCALL_RDMSR   0x0001f
 
#define TDVMCALL_WRMSR   0x00020
 
#define TDVMCALL_MMIO   0x00030
 
#define TDVMCALL_PCONFIG   0x00041
 
#define TDVMCALL_GET_TDVMCALL_INFO   0x10000
 
#define TDVMCALL_MAPGPA   0x10001
 
#define TDVMCALL_GET_QUOTE   0x10002
 
#define TDVMCALL_REPORT_FATAL_ERR   0x10003
 
#define TDVMCALL_SETUP_EVENT_NOTIFY   0x10004
 
#define TDVMCALL_STATUS_RETRY   0x1
 

Detailed Description

Intel Trust Domain Extension definitions Detailed information is in below document: https://software.intel.com/content/dam/develop/external/us/en/documents /tdx-module-1eas-v0.85.039.pdf

Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Tdx.h.

Macro Definition Documentation

◆ EXIT_REASON_APIC_ACCESS

#define EXIT_REASON_APIC_ACCESS   44

Definition at line 50 of file Tdx.h.

◆ EXIT_REASON_APIC_WRITE

#define EXIT_REASON_APIC_WRITE   56

Definition at line 62 of file Tdx.h.

◆ EXIT_REASON_CPUID

#define EXIT_REASON_CPUID   10

Definition at line 21 of file Tdx.h.

◆ EXIT_REASON_CR_ACCESS

#define EXIT_REASON_CR_ACCESS   28

Definition at line 37 of file Tdx.h.

◆ EXIT_REASON_DR_ACCESS

#define EXIT_REASON_DR_ACCESS   29

Definition at line 38 of file Tdx.h.

◆ EXIT_REASON_ENCLS

#define EXIT_REASON_ENCLS   60

Definition at line 66 of file Tdx.h.

◆ EXIT_REASON_EOI_INDUCED

#define EXIT_REASON_EOI_INDUCED   45

Definition at line 51 of file Tdx.h.

◆ EXIT_REASON_EPT_MISCONFIG

#define EXIT_REASON_EPT_MISCONFIG   49

Definition at line 55 of file Tdx.h.

◆ EXIT_REASON_EPT_VIOLATION

#define EXIT_REASON_EPT_VIOLATION   48

Definition at line 54 of file Tdx.h.

◆ EXIT_REASON_EXTERNAL_INTERRUPT

#define EXIT_REASON_EXTERNAL_INTERRUPT   1

Definition at line 15 of file Tdx.h.

◆ EXIT_REASON_GDTR_IDTR

#define EXIT_REASON_GDTR_IDTR   46

Definition at line 52 of file Tdx.h.

◆ EXIT_REASON_HLT

#define EXIT_REASON_HLT   12

Definition at line 22 of file Tdx.h.

◆ EXIT_REASON_INVALID_STATE

#define EXIT_REASON_INVALID_STATE   33

Definition at line 42 of file Tdx.h.

◆ EXIT_REASON_INVD

#define EXIT_REASON_INVD   13

Definition at line 23 of file Tdx.h.

◆ EXIT_REASON_INVEPT

#define EXIT_REASON_INVEPT   50

Definition at line 56 of file Tdx.h.

◆ EXIT_REASON_INVLPG

#define EXIT_REASON_INVLPG   14

Definition at line 24 of file Tdx.h.

◆ EXIT_REASON_INVPCID

#define EXIT_REASON_INVPCID   58

Definition at line 64 of file Tdx.h.

◆ EXIT_REASON_INVVPID

#define EXIT_REASON_INVVPID   53

Definition at line 59 of file Tdx.h.

◆ EXIT_REASON_IO_INSTRUCTION

#define EXIT_REASON_IO_INSTRUCTION   30

Definition at line 39 of file Tdx.h.

◆ EXIT_REASON_LDTR_TR

#define EXIT_REASON_LDTR_TR   47

Definition at line 53 of file Tdx.h.

◆ EXIT_REASON_MCE_DURING_VMENTRY

#define EXIT_REASON_MCE_DURING_VMENTRY   41

Definition at line 48 of file Tdx.h.

◆ EXIT_REASON_MONITOR_INSTRUCTION

#define EXIT_REASON_MONITOR_INSTRUCTION   39

Definition at line 46 of file Tdx.h.

◆ EXIT_REASON_MONITOR_TRAP_FLAG

#define EXIT_REASON_MONITOR_TRAP_FLAG   37

Definition at line 45 of file Tdx.h.

◆ EXIT_REASON_MSR_LOAD_FAIL

#define EXIT_REASON_MSR_LOAD_FAIL   34

Definition at line 43 of file Tdx.h.

◆ EXIT_REASON_MSR_READ

#define EXIT_REASON_MSR_READ   31

Definition at line 40 of file Tdx.h.

◆ EXIT_REASON_MSR_WRITE

#define EXIT_REASON_MSR_WRITE   32

Definition at line 41 of file Tdx.h.

◆ EXIT_REASON_MWAIT_INSTRUCTION

#define EXIT_REASON_MWAIT_INSTRUCTION   36

Definition at line 44 of file Tdx.h.

◆ EXIT_REASON_NMI_WINDOW

#define EXIT_REASON_NMI_WINDOW   8

Definition at line 19 of file Tdx.h.

◆ EXIT_REASON_PAUSE_INSTRUCTION

#define EXIT_REASON_PAUSE_INSTRUCTION   40

Definition at line 47 of file Tdx.h.

◆ EXIT_REASON_PENDING_INTERRUPT

#define EXIT_REASON_PENDING_INTERRUPT   7

Definition at line 18 of file Tdx.h.

◆ EXIT_REASON_PML_FULL

#define EXIT_REASON_PML_FULL   62

Definition at line 68 of file Tdx.h.

◆ EXIT_REASON_PREEMPTION_TIMER

#define EXIT_REASON_PREEMPTION_TIMER   52

Definition at line 58 of file Tdx.h.

◆ EXIT_REASON_RDPMC

#define EXIT_REASON_RDPMC   15

Definition at line 25 of file Tdx.h.

◆ EXIT_REASON_RDRAND

#define EXIT_REASON_RDRAND   57

Definition at line 63 of file Tdx.h.

◆ EXIT_REASON_RDSEED

#define EXIT_REASON_RDSEED   61

Definition at line 67 of file Tdx.h.

◆ EXIT_REASON_RDTSC

#define EXIT_REASON_RDTSC   16

Definition at line 26 of file Tdx.h.

◆ EXIT_REASON_RDTSCP

#define EXIT_REASON_RDTSCP   51

Definition at line 57 of file Tdx.h.

◆ EXIT_REASON_TASK_SWITCH

#define EXIT_REASON_TASK_SWITCH   9

Definition at line 20 of file Tdx.h.

◆ EXIT_REASON_TPR_BELOW_THRESHOLD

#define EXIT_REASON_TPR_BELOW_THRESHOLD   43

Definition at line 49 of file Tdx.h.

◆ EXIT_REASON_TRIPLE_FAULT

#define EXIT_REASON_TRIPLE_FAULT   2

Definition at line 16 of file Tdx.h.

◆ EXIT_REASON_VMCALL

#define EXIT_REASON_VMCALL   18

Definition at line 27 of file Tdx.h.

◆ EXIT_REASON_VMCLEAR

#define EXIT_REASON_VMCLEAR   19

Definition at line 28 of file Tdx.h.

◆ EXIT_REASON_VMFUNC

#define EXIT_REASON_VMFUNC   59

Definition at line 65 of file Tdx.h.

◆ EXIT_REASON_VMLAUNCH

#define EXIT_REASON_VMLAUNCH   20

Definition at line 29 of file Tdx.h.

◆ EXIT_REASON_VMOFF

#define EXIT_REASON_VMOFF   26

Definition at line 35 of file Tdx.h.

◆ EXIT_REASON_VMON

#define EXIT_REASON_VMON   27

Definition at line 36 of file Tdx.h.

◆ EXIT_REASON_VMPTRLD

#define EXIT_REASON_VMPTRLD   21

Definition at line 30 of file Tdx.h.

◆ EXIT_REASON_VMPTRST

#define EXIT_REASON_VMPTRST   22

Definition at line 31 of file Tdx.h.

◆ EXIT_REASON_VMREAD

#define EXIT_REASON_VMREAD   23

Definition at line 32 of file Tdx.h.

◆ EXIT_REASON_VMRESUME

#define EXIT_REASON_VMRESUME   24

Definition at line 33 of file Tdx.h.

◆ EXIT_REASON_VMWRITE

#define EXIT_REASON_VMWRITE   25

Definition at line 34 of file Tdx.h.

◆ EXIT_REASON_WBINVD

#define EXIT_REASON_WBINVD   54

Definition at line 60 of file Tdx.h.

◆ EXIT_REASON_XRSTORS

#define EXIT_REASON_XRSTORS   64

Definition at line 70 of file Tdx.h.

◆ EXIT_REASON_XSAVES

#define EXIT_REASON_XSAVES   63

Definition at line 69 of file Tdx.h.

◆ EXIT_REASON_XSETBV

#define EXIT_REASON_XSETBV   55

Definition at line 61 of file Tdx.h.

◆ TDCALL_ACCEPT_PAGE_SIZE_1G

#define TDCALL_ACCEPT_PAGE_SIZE_1G   2

Definition at line 82 of file Tdx.h.

◆ TDCALL_ACCEPT_PAGE_SIZE_2M

#define TDCALL_ACCEPT_PAGE_SIZE_2M   1

Definition at line 81 of file Tdx.h.

◆ TDCALL_ACCEPT_PAGE_SIZE_4K

#define TDCALL_ACCEPT_PAGE_SIZE_4K   0

Definition at line 80 of file Tdx.h.

◆ TDCALL_TDACCEPTPAGE

#define TDCALL_TDACCEPTPAGE   6

Definition at line 90 of file Tdx.h.

◆ TDCALL_TDEXTENDRTMR

#define TDCALL_TDEXTENDRTMR   2

Definition at line 86 of file Tdx.h.

◆ TDCALL_TDGETVEINFO

#define TDCALL_TDGETVEINFO   3

Definition at line 87 of file Tdx.h.

◆ TDCALL_TDINFO

#define TDCALL_TDINFO   1

Definition at line 85 of file Tdx.h.

◆ TDCALL_TDREPORT

#define TDCALL_TDREPORT   4

Definition at line 88 of file Tdx.h.

◆ TDCALL_TDSETCPUIDVE

#define TDCALL_TDSETCPUIDVE   5

Definition at line 89 of file Tdx.h.

◆ TDCALL_TDVMCALL

#define TDCALL_TDVMCALL   0

Definition at line 84 of file Tdx.h.

◆ TDVMCALL_CPUID

#define TDVMCALL_CPUID   0x0000a

Definition at line 92 of file Tdx.h.

◆ TDVMCALL_GET_QUOTE

#define TDVMCALL_GET_QUOTE   0x10002

Definition at line 102 of file Tdx.h.

◆ TDVMCALL_GET_TDVMCALL_INFO

#define TDVMCALL_GET_TDVMCALL_INFO   0x10000

Definition at line 100 of file Tdx.h.

◆ TDVMCALL_HALT

#define TDVMCALL_HALT   0x0000c

Definition at line 93 of file Tdx.h.

◆ TDVMCALL_IO

#define TDVMCALL_IO   0x0001e

Definition at line 94 of file Tdx.h.

◆ TDVMCALL_MAPGPA

#define TDVMCALL_MAPGPA   0x10001

Definition at line 101 of file Tdx.h.

◆ TDVMCALL_MMIO

#define TDVMCALL_MMIO   0x00030

Definition at line 97 of file Tdx.h.

◆ TDVMCALL_PCONFIG

#define TDVMCALL_PCONFIG   0x00041

Definition at line 98 of file Tdx.h.

◆ TDVMCALL_RDMSR

#define TDVMCALL_RDMSR   0x0001f

Definition at line 95 of file Tdx.h.

◆ TDVMCALL_REPORT_FATAL_ERR

#define TDVMCALL_REPORT_FATAL_ERR   0x10003

Definition at line 103 of file Tdx.h.

◆ TDVMCALL_SETUP_EVENT_NOTIFY

#define TDVMCALL_SETUP_EVENT_NOTIFY   0x10004

Definition at line 104 of file Tdx.h.

◆ TDVMCALL_STATUS_RETRY

#define TDVMCALL_STATUS_RETRY   0x1

Definition at line 106 of file Tdx.h.

◆ TDVMCALL_WRMSR

#define TDVMCALL_WRMSR   0x00020

Definition at line 96 of file Tdx.h.

◆ TDX_EXIT_REASON_OPERAND_BUSY

#define TDX_EXIT_REASON_OPERAND_BUSY   0x8000020000000000

Definition at line 77 of file Tdx.h.

◆ TDX_EXIT_REASON_OPERAND_INVALID

#define TDX_EXIT_REASON_OPERAND_INVALID   0xC000010000000000

Definition at line 76 of file Tdx.h.

◆ TDX_EXIT_REASON_PAGE_ALREADY_ACCEPTED

#define TDX_EXIT_REASON_PAGE_ALREADY_ACCEPTED   0x00000B0A00000000

Definition at line 74 of file Tdx.h.

◆ TDX_EXIT_REASON_PAGE_SIZE_MISMATCH

#define TDX_EXIT_REASON_PAGE_SIZE_MISMATCH   0xC0000B0B00000000

Definition at line 75 of file Tdx.h.

◆ TDX_EXIT_REASON_SUCCESS

#define TDX_EXIT_REASON_SUCCESS   0x0000000000000000

Definition at line 73 of file Tdx.h.