I've spent most of today - well OK this evening - writing a driver for the OPIC timers to use in pre-emptive scheduling of the Kernel. I've got it counting down and generating an Interrupt but that isn't getting into the OPIC controller yet, no doubt some configuration bit on a register I've forgotten about.
Either way, once timer based interrupts can be generated and handled with an ISR the Scheduler can dump the register state into the Processes memory and chose another process to run - i.e. pre-emptive scheduling.
Of course at the moment I don't have any Processes except the Idle processes but I guess two programs that print "Hi" and "Bye" could run and should switch between them if they're set at the same priority.
Once I have pre-emptive scheduling in I can start to look at getting newlib setup correctly with CRT0 so I can write some proper test apps. It'd also be nice to abstract the PowerPC page tables in RAM so I can make best use of the MMU for proper process memory protection.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment