-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
56 lines (38 loc) · 1.69 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
What is PastaOS?
================
PastaOS is a simple open-source kernel written from scratch for didactic
purposes.
The main goal of this project is to help people that want to approach to kernel
development to understand the basic concepts of a kernel.
For this reason the code and functionalities are kept simple and minimal, so
that people can easily understand how the kernel works and use it to implement
their own project, as a kernel-dev sandbox.
How do I run it?
================
Build the kernel:
$ make
Create a bootable ISO (requires grub-mkrescue, xorriso and mtools):
$ make iso
Start the kernel in VM (requires the above packages + qemu-system-x86_64):
$ make run
NOTE: press `Alt+2` to enter the qemu monitor and type `quit` to exit.
Design
======
These are the features implemented so far:
- Intel x86 (32-bit) support
- Multi-threading (the kernel implements a simple round-robin scheduler,
preemption model is voluntary: threads need to voluntarily release the CPU
to schedule the next thread; the kernel provide a simple stack-switch
mechanism to perform a context switch between kernel threads)
- Paging is enabled, but there's no memory allocator at the moment (first 4MB
are identically mapped in the virtual address space and there's not memory
protection: all the memory is shared among the kernel threads)
- No user-space support yet, everything runs in kernel space as ring-0
privileges
- Simple 80x25 16-colors console driver
- Interrupt management (PIC 8259), only the periodic clock interrupt is
enabled for now
- GRUB integration (kernel can be booted using GRUB)
Memory layout
=============
See linker.ld for information about kernel memory layout.