Now SpinLock is actually just a spin lock and I added a Mutex that
does the same as the old "SpinLock". This is in preparation for
starting to support smp and making the kernel smp safe. This commit
also removes obsolete PageTableScope and CriticalScope which should
now be used by alternative APIs.
Keycodes are easier to handle as you need only one keyboard layout
for keycodes. Otherwise you would need to implement keyboard layout
for every keyboard driver in every language.
Command sending+response reading is now synchronized. This allows
bochs to properly initialize both mouse and keyboard simultaneously.
Also status register is checked EVERY time read/write to other IO
ports is performed.
This code has very ugly file parsing code. I have to create API
for reading files line by line in kernel space...
This allows users to open framebuffer/input files without root.
Mounting has to be moved to userspace soon. It makes no sense to
hard code permissions for every (device) file.
Serial monitors can now be used as a output. This requires editing
init code for the stdio opening. Serial input is not supported, so qemu
still needs graphical window for ps/2 keyboard.
We now have DevFileSystem which is derived from RamFileSystem. All
devices are RamInodes. We don't have separate DeviceManager anymore.
To iterate over devices, you can loop througn every inode in devfs.
We don't store the error message anymore in BAN::Error.
Instead we store a error code that can be mapped into a string.
This allows BAN::Error to only take 4 bytes instead of 128.
We should also make some kernel initialization just panic instead
of returning errors since they are required for succesfull boot
anyway.
We now use Device abstraction that will allow us to provide devices
to userspace through /dev. Currently Shell reads from first and only
device (it being PS/2 Keyboard).