segmentation not used after Paging is enable d?
Posted: Wed Aug 20, 2003 8:03 am
Hello evrybody !
I'm still reading tutorials, and there is something which isn't clean yet in my mind ! (if only it was the only thing confused ! )
Well, to be able to access the memory over 1MB, I'm to enter in Pmode. For that, I must define a GDT with code and data segment. But if I want to use paging ? I enable paging, and what ? I've access to the whole memory ? So what is the utility of segments in my GDT ???
Really, it's confused in my brain !!!
I understand that segment permit different kind of accesses to the memory (I believe). For exemple, a code segment to execute code, and a data to read in memory ?
Is there the same idea with paging ?
So, if segments in my GDT are not used any more, why somme OS have generaly 2 code segments and to data segements (one of each for a different dpl) ?
Because of that, I asked myself if I had to "cut" my code segement, and my data segment into pages ??
In addition to that, I have another question (not really related to the same topic...)
If I have some code at a certain address of a code segment, Would I be able to see the code frome a data segment (using the same address, or rather offset) ?
Thanks for your help !
I'm still reading tutorials, and there is something which isn't clean yet in my mind ! (if only it was the only thing confused ! )
Well, to be able to access the memory over 1MB, I'm to enter in Pmode. For that, I must define a GDT with code and data segment. But if I want to use paging ? I enable paging, and what ? I've access to the whole memory ? So what is the utility of segments in my GDT ???
Really, it's confused in my brain !!!
I understand that segment permit different kind of accesses to the memory (I believe). For exemple, a code segment to execute code, and a data to read in memory ?
Is there the same idea with paging ?
So, if segments in my GDT are not used any more, why somme OS have generaly 2 code segments and to data segements (one of each for a different dpl) ?
Because of that, I asked myself if I had to "cut" my code segement, and my data segment into pages ??
In addition to that, I have another question (not really related to the same topic...)
If I have some code at a certain address of a code segment, Would I be able to see the code frome a data segment (using the same address, or rather offset) ?
Thanks for your help !