Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jzck/kernel-zig
:floppy_disk: hobby x86 kernel zig
https://github.com/jzck/kernel-zig
kernel x86 zig
Last synced: 6 days ago
JSON representation
:floppy_disk: hobby x86 kernel zig
- Host: GitHub
- URL: https://github.com/jzck/kernel-zig
- Owner: jzck
- Created: 2019-05-10T23:12:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-21T22:29:23.000Z (over 1 year ago)
- Last Synced: 2024-12-29T22:29:39.696Z (13 days ago)
- Topics: kernel, x86, zig
- Language: Zig
- Homepage:
- Size: 171 KB
- Stars: 429
- Watchers: 11
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zig - jzck/kernel-zig
- awesome-zig - kernel-zig🗒️hobby x86 kernel zig
README
# hobby kernel in zig
# WARNING: this project was written for zig 0.5, it doesn't compile for future versions
![screenshot](screenshot.png)
### features
- 80x25 frame buffer
- ps2 keyboard driver
- terminal console
- lspci
- x86
- MMU
- interrupts
- pit timer
- scheduler
- time slice preemption with round robin
- sleep()
- block()/unblock()
- Storage
- IDE ATA driver (in progress)### dependencies
- [ziglang](https://github.com/ziglang/zig) 0.5.0
### compiling
`zig build` compiles and links the multiboot kernel (without a bootloader)
### running
- `./qemu.sh start`
- `./qemu.sh monitor`
- `./qemu.sh quit`
- `gdb` (see provided `.gdbinit`)# Notes
## interrupt call chain
`interrupt` -> `idt[n]` -> `isrN` -> `isrDispatch` -> `handlers[n]` (default `unhandled()`)
## References
- zig microkernel: https://github.com/AndreaOrru/zen
- scheduling tutorial: https://wiki.osdev.org/Brendan%27s_Multi-tasking_Tutorial
- booting/paging/interrupts: https://os.phil-opp.com/