Commit Graph

8 Commits

Author SHA1 Message Date
csd4ni3l
c81bed2a4e Add correct sleep which works now because interrupts are re-enabled
using sti in syscalls, remove a bunch of old imports and code, move
keyboard scancode handling to keyboard.rs, add a new KeyboardEvent based
layout where press/release and unicode is handled, add a kbd_read
syscall which writes kbd events to a userspace buffer, add a usercopy
file which provides safe copying functions to userspace
2026-04-10 12:48:00 +02:00
csd4ni3l
9e8090c736 Make Doom run by improving and fixing libc stubs, adding proper heap
allocation, adding a timer, a framebuffer swap, rectangle and buffer
draw syscall, moving the header files to the correct directory,
disabling stack protection, AVX and MMX, while enabling SSE, fix
interrupt handler popping in the wrong order, improve
load_segment_to_memory alignment, add load_from_ptr to framebuffer for
very quick drawing, serial_print as well as render font in
consolewriter, zero the memory in sbrk, add a fake file system and
methods to libxunil for DOOM, add correct printf, vsnprintf add _start
which calls the main function in libxunil, mark all registers as used
inside syscalls for no memory corruption, add build_helloworld.sh script
2026-04-07 18:06:52 +02:00
csd4ni3l
ae3915147a Add a usermode address space which can be switched to, make
FRAME_ALLOCATOR global, make XunilFrameAllocator not hold Limine entries
so it can be used without lifetimes, implement the process struct, add
user heap by giving back heap_start from ELF and adding sbrk syscall,
align ELF loading in userspace_stub, implement lots of libc functions in
libxunil, remove x86_64 dependency from libxunil, add malloc and all
required heap functions to libxunil and more syscall numbers, add a util
file to libxunil, add build scripts for libxunil and doomgeneric
2026-04-05 20:12:59 +02:00
csd4ni3l
1e899e2f97 Add a scheduler which just keeps of processes for now, and a
with_process to interact with them. User space now has it's own address
space and mapper which means we will be able to allocate memory for it.
I added a bunch of functions as stubs into libxunil which are required
for doomgeneric.
2026-04-03 11:28:31 +02:00
csd4ni3l
3ef95940a7 Remove micromath dependency, improve primitive drawing speed by 300x,
add mouse support and interrupts on x86_64 using a ps2 mouse which
needed pic unmasking, add span filling to framebuffer, add back
without_interrupts to serial console and framebuffer, add a mouse
rectangle which tracks the mouse position and test the performance of
the drawing.
2026-03-29 14:38:43 +02:00
csd4ni3l
aa5cd85b48 Add a kernel crash function, add a timer using the timer interrupt and
set PIT interval to 1000hz, use a vector inside Framebuffer, remove
without_interrupts from the framebuffer and serial console, move to
usize on primitives, add date at boot and turn on multithreading, add a
boot animation and add a test_performance function with the new timer
2026-03-28 21:03:13 +01:00
csd4ni3l
4a3c1c9ced Add a linked list allocator for heap that can now do 256 mib due to
frame allocator optimizations, make a basic init function in arch that
will initialize everything for a given arch. Add tests in kmain for
alloc, and add a Locked struct used for static mutables and the linked
list.
2026-03-28 15:06:16 +01:00
csd4ni3l
269d900d97 Add interrupts and IDT and react to double, page, general prot faults
and breakpoints, add keyboard support through the keyboar interrupt, add
paging memory management and a Frame Allocator, add a generic arch
module that initializes arch-specific things, fix framebuffer and
serialconsole being accessed from multiple places, move serial to driver
since its not actually a serial console.
2026-03-24 13:48:31 +01:00