Thanks. I am ok with DB instructions for tdcall. -----Original Message----- From: Xu, Min M <[email protected]> Sent: Wednesday, March 16, 2022 9:19 AM To: Ni, Ray <[email protected]>; [email protected] Cc: Kinney, Michael D <[email protected]>; Gao, Liming <[email protected]>; Liu, Zhiguang <[email protected]>; Brijesh Singh <[email protected]>; Aktas, Erdem <[email protected]>; James Bottomley <[email protected]>; Yao, Jiewen <[email protected]>; Tom Lendacky <[email protected]>; Gerd Hoffmann <[email protected]> Subject: RE: [edk2-devel] [PATCH V8 02/47] MdePkg: Introduce basic Tdx functions in BaseLib
On March 15, 2022 3:42 PM, Ni Ray wrote: > + > +%macro tdcall 0 > + db 0x66,0x0f,0x01,0xcc > +%endmacro > > 1. can you please check whether the tdcall instruction is supported by > latest NASM compiler? I checked the NASM (2.15.05) doc https://www.nasm.us/xdoc/2.15.05/html/nasmdocb.html#section-B.1 but not find the tdcall instruction. > > > + AsmCpuid (CPUID_VERSION_INFO, NULL, NULL, &Ecx, NULL); > + if ((Ecx & BIT31) == 0) { > > 2. Can you please update CPUID_VERSION_INFO_ECX in > MdePkg/Include/Regiter/Intel/Cpuid.h for the BIT31? Sure. It will be updated in the next version. > > + break; > + } > + > + if (LargestEax < 0x21) { > + break; > + } > + > + AsmCpuidEx (0x21, 0, &Eax, &Ebx, &Ecx, &Edx); > + if ( (Ebx != SIGNATURE_32 ('I', 'n', 't', 'e')) > + || (Edx != SIGNATURE_32 ('l', 'T', 'D', 'X')) > + || (Ecx != SIGNATURE_32 (' ', ' ', ' ', ' '))) > + { > + break; > + } > + > > 3. Similar comment as #2. Sure. It will be updated in the next version. > > > +%macro tdcall 0 > + db 0x66,0x0f,0x01,0xcc > +%endmacro > > 4. similar comment as #1. See my answer to comment #1. Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87611): https://edk2.groups.io/g/devel/message/87611 Mute This Topic: https://groups.io/mt/89725391/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
