summaryrefslogtreecommitdiff
path: root/Kernel/i8253.cpp
AgeCommit message (Collapse)Author
2019-03-25Kernel: Do timekeeping manually instead of asking the RTC all the time.Andreas Kling
This introduces a tiny amount of timer drift which I will have to fix somehow eventually, but it's a huge improvement in timing consistency as we no longer suddenly jump from e.g 10:45:49.123 to 10:45:50.000.
2019-02-06Clean up some uninteresting log spam.Andreas Kling
2019-02-01Implement event loop timers.Andreas Kling
GObjects can now register a timer with the GEventLoop. This will eventually cause GTimerEvents to be dispatched to the GObject. This needed a few supporting changes in the kernel: - The PIT now ticks 1000 times/sec. - select() now supports an arbitrary timeout. - gettimeofday() now returns something in the tv_usec field. With these changes, the clock window in guitest2 finally ticks on its own.
2019-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2018-12-03More coding style changes.Andreas Kling
2018-11-17Make bash-2.05b build with minimal changes.Andreas Kling
This is really neat. :^)
2018-11-08Move timer tick handling into Scheduler.Andreas Kling
2018-11-07Move the scheduler code to its own class.Andreas Kling
This is very mechanical.
2018-11-07Some refactor and style tweaks.Andreas Kling
2018-11-01Process now maps regions immediately when they are allocated.Andreas Kling
This avoids having to do a separate MM.mapRegionsForTask() pass. Also, more Task => Process renaming that I apparently hadn't saved yet.
2018-10-31Minor cleanup.Andreas Kling
2018-10-23Generalize the SpinLock and move it to AK.Andreas Kling
Add a separate lock to protect the VFS. I think this might be a good idea. I'm not sure it's a good approach though. I'll fiddle with it as I go along. It's really fun to figure out all these things on my own.
2018-10-23Lots of hacking:Andreas Kling
- Turn Keyboard into a CharacterDevice (85,1) at /dev/keyboard. - Implement MM::unmapRegionsForTask() and MM::unmapRegion() - Save SS correctly on interrupt. - Add a simple Spawn syscall for launching another process. - Move a bunch of IO syscall debug output behind DEBUG_IO. - Have ASSERT do a "cli" immediately when failing. This makes the output look proper every time. - Implement a bunch of syscalls in LibC. - Add a simple shell ("sh"). All it can do now is read a line of text from /dev/keyboard and then try launching the specified executable by calling spawn(). There are definitely bugs in here, but we're moving on forward.
2018-10-22A lot of hacking:Andreas Kling
- More work on funneling console output through Console. - init() now breaks off into a separate task ASAP. - ..this leaves the "colonel" task as a simple hlt idle loop. - Mask all IRQs on startup (except IRQ2 for slave passthru) - Fix underallocation bug in Task::allocateRegion(). - Remember how many times each Task has been scheduled. The panel and scheduling banner are disabled until I get things working nicely in the (brave) new Console world.
2018-10-19Turn the syscall interrupt into a trap (by switching the gate type.)Andreas Kling
This leaves interrupts enabled while we're in the kernel, which is precisely what we want. This uncovered a horrendous problem with kernel tasks silently overflowing their stacks. For now I've simply increased the stack size but I need a more MMU-y solution for this eventually.
2018-10-17A userspace process can now GPF and the OS goes on!Andreas Kling
This is really rickety, but it kinda sorta works for my test GPF!
2018-10-16These changes were lying around uncommitted in the old repo.Andreas Kling
I'm just gonna commit them without too much thinking and then take it from there.
2018-10-16Import the "gerbert" kernel I worked on earlier this year.Andreas Kling
It's a lot crappier than I remembered it. It's gonna need a lot of work.