Paging and Multitasking...
Posted: Mon Aug 05, 2002 11:00 pm
I'm having issues with my kernel
I've had TSS-based multitasking implemented for some time now, and I just recently incorporated paging (with a simple, linear = physical mapping for the first 4MB), and the two simply don't get along.
It _seems_ that the paging mechanism is working perfectly until a task switch attempts to occur. I can successfully load and link-in all my run-time modules with paging enabled, but as soon as I set-up the timer (and therefore the scheduler), it hangs. No GPF, exception, or anything... just does nothing, eventually clearing the screen, which eventually led me to believe that it was a corrupted page table, and the kernel was jumping to an incorrectly mapped page and running random code... but then my other kernel functions wouldn't work either, but they do.
Perhaps I'm missing something...
I have PL0 and PL3 tasks
Each task has CR3 defined to the same page directory
The page dir/table defines the U/S bit, so pages are accessable by PL3 tasks
All pages are read/write
My TSS's _might_ be spanning a 4KB boundary... but each page is mapped, so that shouldn't be an issue, should it?
Any help would be greatly appreciated... I used to think paging was easy Implemented it in about 20 minutes in my last kernel...
Jeff
I've had TSS-based multitasking implemented for some time now, and I just recently incorporated paging (with a simple, linear = physical mapping for the first 4MB), and the two simply don't get along.
It _seems_ that the paging mechanism is working perfectly until a task switch attempts to occur. I can successfully load and link-in all my run-time modules with paging enabled, but as soon as I set-up the timer (and therefore the scheduler), it hangs. No GPF, exception, or anything... just does nothing, eventually clearing the screen, which eventually led me to believe that it was a corrupted page table, and the kernel was jumping to an incorrectly mapped page and running random code... but then my other kernel functions wouldn't work either, but they do.
Perhaps I'm missing something...
I have PL0 and PL3 tasks
Each task has CR3 defined to the same page directory
The page dir/table defines the U/S bit, so pages are accessable by PL3 tasks
All pages are read/write
My TSS's _might_ be spanning a 4KB boundary... but each page is mapped, so that shouldn't be an issue, should it?
Any help would be greatly appreciated... I used to think paging was easy Implemented it in about 20 minutes in my last kernel...
Jeff