Skip to content

Commit

Permalink
MdePkg/BaseLib: Add NULL version Tdx functions for other architectures
Browse files Browse the repository at this point in the history
Currently, the NULL version Tdx functions are only built for Ia32.
In BaseLib, the others architectures also need such NULL version
Tdx functions.

Cc: Liming Gao <[email protected]>
Cc: Michael D Kinney <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Min Xu <[email protected]>
Signed-off-by: Ceping Sun <[email protected]>
  • Loading branch information
sunceping authored and mergify[bot] committed Sep 9, 2024
1 parent b437b5c commit 043615a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions MdePkg/Include/Library/BaseLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -5259,8 +5259,6 @@ SpeculationBarrier (
VOID
);

#if defined (MDE_CPU_X64) || defined (MDE_CPU_IA32)

/**
The TDCALL instruction causes a VM exit to the Intel TDX module. It is
used to call guest-side Intel TDX functions, either local or a TD exit
Expand Down Expand Up @@ -5323,8 +5321,6 @@ TdIsEnabled (
VOID
);

#endif

#if defined (MDE_CPU_X64)
//
// The page size for the PVALIDATE instruction
Expand Down
5 changes: 5 additions & 0 deletions MdePkg/Library/BaseLib/BaseLib.inf
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
Ebc/SpeculationBarrier.c
Unaligned.c
Math64.c
IntelTdxNull.c

[Sources.ARM]
Arm/InternalSwitchStack.c
Expand All @@ -364,6 +365,7 @@
Arm/CpuBreakpoint.S | GCC
Arm/MemoryFence.S | GCC
Arm/SpeculationBarrier.S | GCC
IntelTdxNull.c

[Sources.AARCH64]
Arm/InternalSwitchStack.c
Expand Down Expand Up @@ -391,6 +393,7 @@
AArch64/SpeculationBarrier.asm | MSFT
AArch64/ArmReadCntPctReg.asm | MSFT
AArch64/ArmReadIdAA64Isar0Reg.asm | MSFT
IntelTdxNull.c

[Sources.RISCV64]
Math64.c
Expand All @@ -412,6 +415,7 @@
RiscV64/ReadTimer.S | GCC
RiscV64/RiscVMmu.S | GCC
RiscV64/SpeculationBarrier.S | GCC
IntelTdxNull.c

[Sources.LOONGARCH64]
Math64.c
Expand All @@ -432,6 +436,7 @@
LoongArch64/ExceptionBase.S | GCC
LoongArch64/Cpucfg.S | GCC
LoongArch64/ReadStableCounter.S | GCC
IntelTdxNull.c

[Packages]
MdePkg/MdePkg.dec
Expand Down

0 comments on commit 043615a

Please sign in to comment.