17 Commits

Author SHA1 Message Date
a243dd6dec
core: Reserve kernel physical pages + provide our own stack
This solves a very weird bug that occurred when we allocated a page that was already used for the stack.
2025-02-24 19:16:35 +01:00
6e97a89f22
core: Reserve multiboot tags and module memory + load all modules as independent threads instead of just init
Only init is started though, other modules are left in a dormant state so init can do whatever it wants and adjust them according to its needs before running them.
2025-02-22 23:00:53 +01:00
2c5152ecc3
core: Add "tokens" to determine what processes can call which syscalls 2025-02-22 20:11:07 +01:00
c80c7bbc6e
core+init: Instead of exporting an "arch" symbol for platform-specific code, use "usingnamespace".
This makes imports of  platform-specific files way cleaner.
2025-02-22 15:49:14 +01:00
c1956748f3
core: Add a struct named "platform.Registers" to cover different architectures
This replaces the architecture-independent usage of InterruptStackFrame, which is an x86_64 implementation thing.
2025-02-21 19:40:46 +01:00
7665e4cbb6
core: Add documentation to all scheduler functions + global thread list 2025-02-21 19:37:13 +01:00
9acbc45a80
core: Make thread.enterTask() automatically set the thread state to Running 2025-02-21 18:40:29 +01:00
c722341d3f
core: Change naming for virtual memory structures to reflect x86_64 terms 2025-02-21 18:33:36 +01:00
8ea5df2e4e
core: Give init a pointer to its own page tables 2025-02-20 17:57:50 +01:00
0ee587a142
core: Add sleep support to the scheduler 2025-02-18 20:06:40 +01:00
f0d5b60b83
core: Add priority-based scheduling 2025-02-17 20:15:30 +01:00
0edcae7aae
core: Store the physical page directory alongside the virtual pointer to it 2025-02-16 13:20:02 +01:00
6a2323c16b
core: Add thread states 2025-02-16 11:57:04 +01:00
77cee5aeb0
core: Add global FrameAllocator with locking 2025-02-16 11:56:14 +01:00
614ed80980
core: Add a simple ELF loader
We only need the ELF loader for init, and possibly a few other modules. The bulk of loading executables is going to be done by userspace, so we only need the basics here.
2025-02-15 22:46:28 +01:00
18ec598394
core: Enable interrupts in platformEndInit()
This way, each architecture can re-enable interrupts whenever necessary
2025-02-15 15:18:24 +01:00
fce8a58cf6
Ready. Set. Go!
Microkernel development in Zig, should be fun! =]
2025-02-13 22:39:48 +01:00