Hi Having got my gui up and running to a certain extent I now see the need for paged memory, and am starting to experiment with it. I have a few questions.
1. When I set up my IDT do I use Physical memory addresses for handlers
2. I assume i need only 1 data selector & 1 code Selector is this correct
3. How to call Ring 0 from Ring 1-3 (maybe need more selectors)
4. From what Ive read so far I am trying to do the following.
Have One Page Directory for each App/Task
Set the bottom 16Megs of All Page Tables For the Kernel
Set the Next 48Megs for Shared Functions
and the remaining entries for the App itself (-Video Memory)
5. I want only Kernel to be able to write to Video Memory, How do I go about This.
Thanks for listening, Ill probably work some of it out as i go but any help will be appriciated.
pkd
Paging Questions
RE:Paging Questions
1. the idtr has to contain the physical address of the IDT
2. you're right. code-selector and a data/stack-selector. usually you have to for ring0 and two for ring3 in a paged environment.
3. you can do it via call gates or by switching the ring (it's really possible).
you have to use the instructions "sysenter" and "sysexit", dig into the manuals, they are like made for a paged ring3/ring0-system.
4. ya, looks good so far.
5. well, "only the kernel" is difficult; whats possible is "only in ring0" (should be the same, anyway). there is a bit in the page-table-entries. the "supervisor/user"-bit. it specifies what privilege level is needed to access the page. (supervisor=ring0)
greets, hartyl
2. you're right. code-selector and a data/stack-selector. usually you have to for ring0 and two for ring3 in a paged environment.
3. you can do it via call gates or by switching the ring (it's really possible).
you have to use the instructions "sysenter" and "sysexit", dig into the manuals, they are like made for a paged ring3/ring0-system.
4. ya, looks good so far.
5. well, "only the kernel" is difficult; whats possible is "only in ring0" (should be the same, anyway). there is a bit in the page-table-entries. the "supervisor/user"-bit. it specifies what privilege level is needed to access the page. (supervisor=ring0)
greets, hartyl
RE:Paging Questions
Thanks for the answer have got the paging setup
and sysenter working, still havent got sysexit going yet,
but ill keep trying
pkd
and sysenter working, still havent got sysexit going yet,
but ill keep trying
pkd