From d764fe46663e302e6e63c26917bf7c56fe62f379 Mon Sep 17 00:00:00 2001 From: d0p1 Date: Sun, 7 Jul 2024 11:44:51 +0200 Subject: [PATCH] chore: update website menu --- docs/config/Menu.txt | 20 +++++++++++++++++--- kernel/mm/mm.inc | 15 +++++++++++++++ kernel/mm/pmm.inc | 14 ++++++++++---- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/docs/config/Menu.txt b/docs/config/Menu.txt index 77daedd..d10d636 100644 --- a/docs/config/Menu.txt +++ b/docs/config/Menu.txt @@ -20,7 +20,7 @@ Timestamp: Updated yyyy/mm/dd # These are indexes you deleted, so Natural Docs will not add them again # unless you remove them from this line. -Don't Index: Variables, Classes, Macros +Don't Index: Classes, Macros, Variables # -------------------------------------------------------------------------- @@ -62,15 +62,19 @@ Group: BootLoader { Group: Loader { + File: a20.inc (boot/loader/a20.inc) File: loader.asm (boot/loader/loader.asm) File: logger.inc (boot/loader/logger.inc) File: memory.inc (boot/loader/memory.inc) + File: video_setup (boot/loader/video.inc) } # Group: Loader Group: Common { File: bios.inc (boot/common/bios.inc) + File: bootinfo.inc (boot/common/bootinfo.inc) File: fat12.inc (boot/common/fat12.inc) + File: macro.inc (boot/common/macro.inc) File: mbr.inc (boot/common/mbr.inc) } # Group: Common @@ -84,8 +88,18 @@ Group: BootLoader { Group: Kernel { - File: kernel memory map (kernel/intro.txt) + File: bootinfo.inc (kernel/bootinfo.inc) + File: Introduction (kernel/intro.txt) File: kernel.asm (kernel/kernel.asm) + File: klog (kernel/klog.inc) + File: vga_console_clear (kernel/dev/vga_console.inc) + + Group: Memory Manager { + + File: mm.inc (kernel/mm/mm.inc) + File: pmm.inc (kernel/mm/pmm.inc) + } # Group: Memory Manager + } # Group: Kernel Group: Lib { @@ -116,7 +130,7 @@ Group: Lib { } # Group: Crypto - File: ctype (lib/c/ctype.asm) + File: ctype (no auto-title, lib/c/ctype.asm) } # Group: Lib Group: Index { diff --git a/kernel/mm/mm.inc b/kernel/mm/mm.inc index 1e5d3eb..d4a2bd3 100644 --- a/kernel/mm/mm.inc +++ b/kernel/mm/mm.inc @@ -1,4 +1,5 @@ + ;; File: mm.inc include "pmm.inc" mm_init: @@ -12,6 +13,20 @@ mm_init: mov esi, szMsgMmKernelPgDir call klog + ;; Map kernel + + ;; Map video + + ;; Map low memory at ???? + + ;; Map free memory + + ; mov eax, [pKernelPgDir] + ; mov cr3, eax + + ret + +mm_wallk_pagedir: ret szMsgMmInit db "MM: initialize", 0 diff --git a/kernel/mm/pmm.inc b/kernel/mm/pmm.inc index f942f01..99fd30a 100644 --- a/kernel/mm/pmm.inc +++ b/kernel/mm/pmm.inc @@ -1,9 +1,5 @@ ;; File: pmm.inc -struc FreeItem { - .next dd ? -} - ;; Function: pmm_init ;; ;; In: @@ -18,6 +14,10 @@ pmm_init: call pmm_free_range ret + ;; Function: pmm_alloc_page + ;; + ;; Out: + ;; EAX - page address (return zero on error) pmm_alloc_page: cmp [pFreeList], 0 je .error @@ -31,6 +31,11 @@ pmm_alloc_page: xor eax, eax ret + ;; Function: pmm_free_page + ;; push page back to free list + ;; + ;; In: + ;; EAX - page to be freed pmm_free_page: or eax, eax jz @f @@ -42,6 +47,7 @@ pmm_free_page: ;; Function: pmm_free_range ;; TODO: allignment + ;; ;; In: ;; EAX - Start ;; EBX - End