Hi, > +; Load the GDT and set the CR0. > +; > +; Modified: EAX, EBX, CR0, CR4, DS, ES, FS, GS, SS, CS > +; > +ReloadFlat32: > + > + cli > + mov ebx, ADDR_OF(gdtr) > + lgdt [ebx]
No need to modify ebx here, eax should do fine. > + mov eax, SEC_DEFAULT_CR0 > + mov cr0, eax > + > + jmp LINEAR_CODE_SEL:dword ADDR_OF(jumpToFlat32BitAndLandHere) > + > +jumpToFlat32BitAndLandHere: Strictly speaking this is not correct, you are already in Flat32 mode, so this only loads cs. > +InitTdx: > + ; > + ; Save EBX in EBP because EBX will be changed in ReloadFlat32 > + ; > + mov ebp, ebx See above, there is no need to modify ebx in ReloadFlat32. Also: seems ebx is never restored ... take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81805): https://edk2.groups.io/g/devel/message/81805 Mute This Topic: https://groups.io/mt/86253728/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-