On Mon, Aug 30, 2021 at 5:35 AM 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: > + ; > + ; In Td guest, BSP/AP shares the same entry point > + ; BSP builds up the page table, while APs shouldn't do the same task. > + ; Instead, APs just leverage the page table which is built by BSP. > + ; APs will wait until the page table is ready. > + ; > +TdxApWait: > + cmp byte[TDX_WORK_AREA_PGTBL_READY], 0 > + je TdxApWait > + jmp ExitInitTdxWorkarea Don't we need memory fence before je TdxApWait > +; Check TDX features, Non-TDX or TDX-BSP or TDX-APs? > +; > +; By design TDX BSP is reponsible for inintializing the PageTables. s/reponsible/responsible s/inintializing/initializing -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#80525): https://edk2.groups.io/g/devel/message/80525 Mute This Topic: https://groups.io/mt/85242569/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-