This only adds a pointer worth of overhead per cpu core in the
PerCpuBlock struct.
Also fix a bunch of unsafe_op_in_unsafe_fn warnings in the profiling
code.
This way we can choose our own size for the stack and don't have to
identity map it manually. Also this way the bootloader doesn't have to
change the stack pointer right before calling into the kernel (which it
currently does in an unsound way)
Inspired by how Haiku does printing for its kernel debugger, this commit
gets rid of the scrolling when the bootlog reaches the end of the screen
and instead wraps around to the start of the screen. Between the last
written line and the first visible written line there is always a blank
line to provide visual separation.
Getting rid of the scrolling significantly simplifies the implementation
of graphical debug and removes the need for double buffering for
performance as we no longer need to read back the framebuffer when
scrolling which is very expensive on write-combining memory like the
framebuffer.
This significantly reduces the amount of boot logs produced by the
kernel by default on x86. With this the full kernel boot logs now fit on
a single screen on my system.
This allows them to be immediately installed by kstart/kstart_ap without
having to wait for the page tables to be set up correctly. This removes
the initial IDT.
This allows them to be immediately installed by kstart_ap without having
to wait for the page tables to be set up correctly. This removes the
initial GDT.
This avoids the need to explicitly set a logger early during boot, which
reduces the amount of moving parts that could go wrong slightly. And it
cuts the kernel image size by 13kb.
According to the comments this previously wasn't done due to hashbrown
not having a const constructor. While it is true that HashMap::new() is
not const, HashMap::with_hasher() is const. HashMap::new() becoming
const is likely blocked on const traits.
This shrinks the kernel image by about 35kb.