Can't you create something in MdePkg/Library/Baselib and then use it everywhere it's needed?
Do you mean put the basic Tdx functions in MdePkg/Library/BaseLib? If that is the case, then I would add below basic Tdx functions in BaseLib: - TdIsEnabled () - TdCall () - TdVmCall ()
That is the cpuid-based check and the asm code for td calls, correct?