Page 2 of 2

Re: long mode GDT reload

Posted: Wed May 05, 2010 2:20 pm
by gerryg400
Found a couple of vague references to this on various websites. Seems that Intel supports the 16:64 indirect jump and AMD does not.

- gerryg400

Re: long mode GDT reload

Posted: Wed May 05, 2010 2:34 pm
by gerryg400
I never reload the GDT following that. At no point do I need to reload CS except for when I do my initial entry to long mode.
Owen, don't you need to reload cs to get to ring 3 to run user mode code ?

Btw, I agree with StephanVanSchaik and use iret for this.

- gerryg400

Re: long mode GDT reload

Posted: Wed May 05, 2010 2:36 pm
by Owen
gerryg400 wrote:
I never reload the GDT following that. At no point do I need to reload CS except for when I do my initial entry to long mode.
Owen, don't you need to reload cs to get to ring 3 to run user mode code ?

Btw, I agree with StephanVanSchaik and use iret for this.

- gerryg400
Sure, but thats done implicitly in the iret or sysret, rather than by a direct jump. I mean the kernel CS.