GDTR Questions...
Posted: Mon Jun 07, 2004 2:51 pm
I'm sorry if this has already been asked, but the search result page won't load ::) and trawling through over 100 pages of forums on a 56k ain't my idea of fun.
Anyhow, I was following Tim Robinson's excellent memory management tutorial, with the Intel System Programming Guide at my side, and I came across his mention of changing the segment base address to map the kernel elsewhere, so I opened the Intel guide looking for information on this, but it seemed to have missed it out.
Well, what I am wondering is, what is the syntax for the LGDT and SGDT instructions, and what registers are suitable as they seem to return 48-bit numbers? Also, what happens when you change the segment base address in the middle of the code? (frankly, is it safe?).
I don't know if I am being obtuse or have missed something, but do segmented addressed work in a similar manner to paged addresses (segment selector | offset) or have I grabbed the wrong end of the stick entirely? (maybe the manual is perfectly clear but I just am not equiped to understand it ??? ).
P.S. Sorry for all the questions. They may be obvious, but my brain is still mush from exams.
P.P.S Thanks to Tim Robinson for the tutorials.
Anyhow, I was following Tim Robinson's excellent memory management tutorial, with the Intel System Programming Guide at my side, and I came across his mention of changing the segment base address to map the kernel elsewhere, so I opened the Intel guide looking for information on this, but it seemed to have missed it out.
Well, what I am wondering is, what is the syntax for the LGDT and SGDT instructions, and what registers are suitable as they seem to return 48-bit numbers? Also, what happens when you change the segment base address in the middle of the code? (frankly, is it safe?).
I don't know if I am being obtuse or have missed something, but do segmented addressed work in a similar manner to paged addresses (segment selector | offset) or have I grabbed the wrong end of the stick entirely? (maybe the manual is perfectly clear but I just am not equiped to understand it ??? ).
P.S. Sorry for all the questions. They may be obvious, but my brain is still mush from exams.
P.P.S Thanks to Tim Robinson for the tutorials.