Hello,
From Intel's manual about IA-32e mode:
On privilege level changes, stack segment selectors are not read from the TSS. Instead, they are set to NULL.
What does it mean to set a segment selector to null?
Does it mean that you set the segment selector in the segment register to point to the first descriptor in the GDT, the null descriptor?
Or, does it mean that you put some special value in the segment register?
If so, what is this special value?
Earlier in the manual, it says this about loading segment registers with selectors in protected mode:
Loading the CS or SS register with a null segment selector causes a general-protection exception (#GP) to be generated.
So, how can we do both?
How can we put a null segment selector in the SS register if doing so will throw an exception?
Is the above restriction lifted in IA-32e mode?
Thanks.
From Intel's manual about IA-32e mode:
On privilege level changes, stack segment selectors are not read from the TSS. Instead, they are set to NULL.
What does it mean to set a segment selector to null?
Does it mean that you set the segment selector in the segment register to point to the first descriptor in the GDT, the null descriptor?
Or, does it mean that you put some special value in the segment register?
If so, what is this special value?
Earlier in the manual, it says this about loading segment registers with selectors in protected mode:
Loading the CS or SS register with a null segment selector causes a general-protection exception (#GP) to be generated.
So, how can we do both?
How can we put a null segment selector in the SS register if doing so will throw an exception?
Is the above restriction lifted in IA-32e mode?
Thanks.