From 5e03409586efc37931f07b40ee0c71a9a9e109f7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 31 Jul 2026 15:51:28 +0200 Subject: rsnix: memory management — free-list heap, bitmap pages, paging adoption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - uefi.rs: full EfiMemoryType constants (0-14) + memory_type_name(); fix MEMORY_TYPE_LOADER_DATA from 6 to 2 per the UEFI spec - memory.rs: replace the bump allocator with a first-fit free-list heap (splitting, coalescing, 8-byte back-pointer for alignment-safe free); add a bitmap physical page allocator (heap region reserved, page-0 guard, aligned runs); grow the heap from the page allocator on demand - paging.rs: identity page-table helpers — adopt_tables() rebuilds the firmware map into our own tables (OVMF maps its tables read-only, so the firmware tree can't be modified in place) and switches CR3; map_page/unmap_page/is_mapped with 2 MB/1 GB large-page splitting - main.rs: boot self-tests for heap, pages, and paging --- rsnix/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'rsnix/src/lib.rs') diff --git a/rsnix/src/lib.rs b/rsnix/src/lib.rs index 0bc0cb9..d2dacf0 100644 --- a/rsnix/src/lib.rs +++ b/rsnix/src/lib.rs @@ -6,6 +6,7 @@ pub mod font; pub mod gop; pub mod interrupts; pub mod memory; +pub mod paging; pub mod ps2; pub mod serial; pub mod uefi; -- cgit v1.2.3