FLAT_DS_SELECTOR question - Minix
This is a discussion on FLAT_DS_SELECTOR question - Minix ; FLAT_DS_SELECTOR is defined in src/kernel/protect.h as 0x21, one bigger
than ES_SELECTOR. It is then used in the phys_copy function defined in
klib386.s (quoted below).
> mov eax, FLAT_DS_SELECTOR
> mox es, ax
I do not understand the difference between using ...
-
FLAT_DS_SELECTOR question
FLAT_DS_SELECTOR is defined in src/kernel/protect.h as 0x21, one bigger
than ES_SELECTOR. It is then used in the phys_copy function defined in
klib386.s (quoted below).
> mov eax, FLAT_DS_SELECTOR
> mox es, ax
I do not understand the difference between using FLAT_DS_SELECTOR and
using ES_SELECTOR. They seem to point to the same descriptor, except
that FLAT_DS_SELECTOR appears misaligned in the gdt table, isn't it?
-
Re: FLAT_DS_SELECTOR question
FLAT_DS_SELECTOR is for flat space memory model
ES_SELECTOR is for sememted memory model
But the values should be different.
Yunzhong wrote:
> FLAT_DS_SELECTOR is defined in src/kernel/protect.h as 0x21, one bigger
> than ES_SELECTOR. It is then used in the phys_copy function defined in
> klib386.s (quoted below).
> > mov eax, FLAT_DS_SELECTOR
> > mox es, ax
> I do not understand the difference between using FLAT_DS_SELECTOR and
> using ES_SELECTOR. They seem to point to the same descriptor, except
> that FLAT_DS_SELECTOR appears misaligned in the gdt table, isn't it?
-
Re: FLAT_DS_SELECTOR question
Thank you tmK.
Can I assume that FLAT_DS_SELECTOR points to the same region of memory
that ES_SELECTOR points to, but just with a lower RPL? Or is there any
other difference with the flat space memory model?
-
Re: FLAT_DS_SELECTOR question
I think this reference might help you out
http://groups.google.com/group/comp....58ae1d24a0b016
tmK
Yunzhong wrote:
> Thank you tmK.
> Can I assume that FLAT_DS_SELECTOR points to the same region of memory
> that ES_SELECTOR points to, but just with a lower RPL? Or is there any
> other difference with the flat space memory model?
-
Re: FLAT_DS_SELECTOR question
I think so
Both ES_SELECTOR and FLAT_DS_SELECTOR point to the 4th entry in GDT
with different privilege levels if they are used in protected mode.
Actually ES_SELECTOR is never used except in boot process.
I think this reference might help you out
http://groups.google.com/group/comp..../thread/2f5f66...
tmK
Yunzhong wrote:
> Thank you tmK.
> Can I assume that FLAT_DS_SELECTOR points to the same region of memory
> that ES_SELECTOR points to, but just with a lower RPL? Or is there any
> other difference with the flat space memory model?
-
Re: FLAT_DS_SELECTOR question