Re: long mode GDT reload
Posted: Wed May 05, 2010 2:20 pm
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
- gerryg400
The Place to Start for Operating System Developers
http://f.osdev.org/
Owen, don't you need to reload cs to get to ring 3 to run user mode code ?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.
Sure, but thats done implicitly in the iret or sysret, rather than by a direct jump. I mean the kernel CS.gerryg400 wrote:Owen, don't you need to reload cs to get to ring 3 to run user mode code ?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.
Btw, I agree with StephanVanSchaik and use iret for this.
- gerryg400