Small GDT problem
Small GDT problem
My bootloader sets up my descriptors and GDT for me, but I want access to those descriptors in my kernel. How do I access descriptors in one file that were declared in another?
Re:Small GDT problem
I realize this isn't anwering your question (directly), but are you planning to change the values in the descriptors??
Re:Small GDT problem
Hard code in the address of where the descriptors start. Then you can make a pointer in C to that place.
K.J.
K.J.
Re:Small GDT problem
Nope, I don't need to change the values. I also need it in ASMcrazybuddha wrote: I realize this isn't anwering your question (directly), but are you planning to change the values in the descriptors??
Re:Small GDT problem
You might consider just creating a new table. Often, the place in memory where the gdt is located for the switch to pmode is not where you want it to reside permanently (since it is an offset from 0x7c00), and you might want to overwrite that memory anyway.
There is something else to note (for what it's worth). When a segment register is given a value, the descriptor is put into the segment cache register. As long as you don't mess with the segment register, you don't use the table anymore.
There is something else to note (for what it's worth). When a segment register is given a value, the descriptor is put into the segment cache register. As long as you don't mess with the segment register, you don't use the table anymore.
Re:Small GDT problem
Ok, I'll try itcrazybuddha wrote: You might consider just creating a new table. Often, the place in memory where the gdt is located for the switch to pmode is not where you want it to reside permanently (since it is an offset from 0x7c00), and you might want to overwrite that memory anyway.
There is something else to note (for what it's worth). When a segment register is given a value, the descriptor is put into the segment cache register. As long as you don't mess with the segment register, you don't use the table anymore.
Re:Small GDT problem
Actually, now that I think about it, why did you need to do this??