hachem.wtf
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-10-17 22:10:47 +0200
committerhachem <im@hachem.wtf>2026-10-17 22:10:47 +0200
commit306e9cb38e3922093708dfbbaf12979edff2b788 (patch)
treeb5d8284416faed2634e05f3cc46ccc71e0cf3cb6
parent5882557058bf1dd72c95238a04b253b1a3122786 (diff)
fix: README layout
-rw-r--r--README.md15
1 files changed, 10 insertions, 5 deletions
diff --git a/README.md b/README.md
index e9af8b5..a445028 100644
--- a/README.md
+++ b/README.md
@@ -24,12 +24,14 @@ there is a lot of things the revo vm cannot do on it's own because there is a mi
### memory
limine already maps every physical page into the higher half (hhdm) so physical address `p` is just `p + hhdm_offset` and the kernel never has to map a page before it can read it. physical allocation is a frame bitmap, one bit per 4 kib page so it scans next fit from wherever the last alloc landed. there's a second pass that walks the bitmap for a contiguous run which is how the heap gets one flat buffer.
-> ⓘ Note
+> ⓘ **Note**
+>
> frame 0 is never handed out.
paging is just ordinary 4 level tables (pml4 > pdpt > pd > pt), present/write/user bits on every entry, a new address space copies the kernel's top half of the pml4 (entries 256..511) into a fresh table so the kernel is mapped in every process and a `cr3` switch costs nothing to survive. the bottom half is the process.
-> ⓘ Note
+> ⓘ **Note**
+>
> `cr3` and `invlpg` are the only ones implemented asm.
the heap is 64 mib pulled off the pmm at boot and a next fit free list with 16 byte headers that coalesces lazily and the vm allocates out of it. that's kinda it.
@@ -54,7 +56,8 @@ rsi -> argv
a context switch is barely anything because the timer irq already did the expensive part. entering the handler pushed the running task's registers onto the kernel stack as a frame so the scheduler just copies the next task's saved frame over it and swaps `cr3` and `rsp0`; the `iretq` that ends the handler restores into that task instead.
-> ⓘ Note
+> ⓘ **Note**
+>
> a task that has never run still has a frame, the one spawn built for it, so its first `iretq` is also how it enters ring 3.
### filesystem
@@ -101,10 +104,12 @@ contributing is both welcome and encouraged, via prs, issues, or suggestions. or
if you're adding a feature or fixing a bug, test that it actually works.
-> ⓘ Tip
+> ⓘ **Tip**
+>
> for a headless run add `-display none -serial file:serial.log` and `-qmp unix:...` then read the log or drive it over qmp.
-> ⓘ Note
+> ⓘ **Note**
+>
> `.rv` parse errors show up at boot on `serial0`, since every kernel module is parsed into one program.
## license