Paging

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
PlayOS

Paging

Post by PlayOS »

I am trying to implement paging, but for some reason if I have my System Timer and Keyboard IRQ's unmasked the system crashes.

If I have these masked then the system runs ok, but if I try to reference any non present pages, it crashes, without sending any Page Fault exceptions.

Does a memory address have to be mapped before it can be used, like do I have to have a page pointing to that address, before it will send me a page fault, when the page is marked not present.
drizzt

Re:Paging

Post by drizzt »

Are you sure that your IDT is correctly set up?
PlayOS

Re:Paging

Post by PlayOS »

Hi,

If I create four tables and map all of the memory, I dont get the problem!

I know that this isn't right. Any ideas?
PlayOS

Re:Paging

Post by PlayOS »

OK, I worked the first problem, I was starting my stack at 16MB and I was only mapping 8MB. Now, I get the error from bochs saying 'iret: cs selector null' does anyone know what this means, the only place I use IRET is in my interrupts, so does this mean there is a problem with the interrupts?
PlayOS

Re:Paging

Post by PlayOS »

OK, The problem above still applies except also if I disable IRQ's everything goes well, until I try to access memory that is not mapped, then I get an error about a TSS, do I need the TSS once paging is enabled?

Remember, the problem above is still happening when IRQ's are enabled.
Post Reply