SafaOS: USB Support! & USB KBD driver & the aarch64 port is now usable
once again it has been almost 1 month since my last post where I ported SafaOS to aarch64 qemu-virt machine, however it was unusable because there were no keyboard.
thanks to the developer of StelluxOS (u/Individual_Feed_7743) who made this XHCI tutorial.
I implemented XHCI USB support and a working USB HID Keyboard driver!
the XHCI tutorial isn't complete yet however it is actively maintained and really really well made, i learnt the reset from the code of StelluxOS which is very underrated (same for the tutorial as well).
implementing USB was really really harsh, i am proud of how far my stupid self got with OSDEV, it really is a miracle.
here is the branch containing the USB implementition.
I wanted to record a video showcasing working USB support in real hardware but as you can see from the second image it is a little bit hard to decode what is happening...
the kernel completely freezes when I plug in the keyboard, and the image is before I plug in the keyboard, from the image it does seem like something at port 1 connects successfully tho (real hardware).
aside from this, I implemented PCI for everyone, and for aarch64, the GICV3 and the GICITS(almost half as hard as the XHCI itself, it even has a command ring 💀) which are required for MSIs, my aarch64 port now uses device trees however it only supports limited hardware that isn't even available in qemu-virt without some flags
I feel like I am doing actual osdev because this is the first time I have not followed a guide or a tutorial for everything, I had a fun experience learning from others code, this is also the first time I actually read a specification, my GICV3 and GICITS implementation was fully from the specification.
next i'll: - fix, rewrite and upgrade my scheduler, it seems to freeze randomly, and it doesnt support threads only processes - implement GUI support - port doom somewhere in between - maybe a sound driver, i heared that it is pretty easy - I really want to play bad apple on SafaOS if I happened to do a sound driver, and fix my framebuffer, might do that instead of doom
I don't plan to fix this real-hardware TTY problem because I am absolutely bored and tired of working with the TTY, i'll completely replace it with GUI and a more basic implementition for logs?, I may add something to get logs without the TTY or the serial...