On Thu, Aug 12, 2021 at 2:57 PM Min Xu <min.m...@intel.com> wrote: > > +; > +; Check if it is Intel Tdx > +; > +; Modified: EAX, EBX, ECX, EDX > +; > +; If it is Intel Tdx, EAX is zero > +; If it is not Intel Tdx, EAX is non-zero > +; > +IsTdx: IsTdx returns 0 when TDX is enabled in CPUID but IsTdxEnabled return 1 when TDX is enabled. Is this intentional?
here is how IsTdxEnabled defined. ; If TDX is enabled then EAX will be 1 ; If TDX is disabled then EAX will be 0. ; IsTdxEnabled: > +TdxApWait: > + cmp byte[TDX_WORK_AREA_PGTBL_READY], 0 > + je TdxApWait Don't we need memory fence before je TdxApWait. I did not check what the compiler generates for this loop. -Erdem -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#80521): https://edk2.groups.io/g/devel/message/80521 Mute This Topic: https://groups.io/mt/84837891/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-