Apparently I'm not supposted to calculate device/function from the
offset, but parse them from the acpi namespace :)
This allows PCI PIN interrupt routing actually work
There is a very hacky no-inline hack that I am not proud of but it drops
the stack usage of few functions A LOT.
Previously Virtual Box could not boot with our 8 page stack, but these
changes allow it to boot on 5!
We did not correctly wait until controller is ready to receive data on
write command. Also remove possible kernel panic if controller sends
unexpected interrupts
Kernel can just use raw threads, pretty muchs the only thing that
process provides is syscalls which kernel threads of course don't
need.
Also this makes init process have pid 1 :D
PS/2 seems to hit command timeout sometimes on slow emulation so
increase the timeouts.
Also move PS/2 device initialization to a different thread because
device indentification waits for timeouts.
This gets rid of a very old bug where kernel panics when thread is being
woken up and unblocked at the same time on different cores. This
required adding a new lock to SchedulerQueue::Node and adding a cap to
how many threads a threadblocker can simultaneously block. I don't think
I ever block more than five threads on the same ThreadBlocker so this
should be fine.
This allows banan-os to boot on hardware where we don't have working
storage driver or the storage driver fails (pretty common with my usb
mass storage drivers...)
This makes creating files and appending to then A LOT faster. Some code
I tested took 40 seconds in the previous implementation and less than a
second on the new one!
This code is really sketcy, I hope I'll never have to touch it again :)
Userspace can freely set terminal size, kernel just updates it when for
example new font is loaded. Also SIGWINCH is now sent by kernel instead
of userspace.
Only block until some data was sent. This allows select + send to be
actually non blocking if used correctly.
Also fixes a bug with non blocking sockets that could not send the full
message is one try.