Hi,
I have a CS/DS/SS segment defined through LDT.I hav loaded the LDTR with GDT index of the LDT descriptor.Loaded the DS,SS values with TI = 1.Then I am pushing the Code segment selector with TI =1 into stack and ip and try to do retf..it says 'invalid opcode' .
Can any one help in this regard ?
Thanks & Regards,
Sampath S
Jumping to CS defined thro LDT
Hi,
Every time I have had this problem, it has been either a misaligned stack, or overrunning the stack.
* Are you mixing privilege levels? If so, have you included your ss3 and esp3 on the return stack?
* Is the same LDT present in the process you are jumping from and to?
* If you are using Bochs, does it look like all the segment registers, EIP and ESP are in a sensible place when the crash happens?
Cheers,
Adam
Every time I have had this problem, it has been either a misaligned stack, or overrunning the stack.
* Are you mixing privilege levels? If so, have you included your ss3 and esp3 on the return stack?
* Is the same LDT present in the process you are jumping from and to?
* If you are using Bochs, does it look like all the segment registers, EIP and ESP are in a sensible place when the crash happens?
Cheers,
Adam