Commit Graph
100 Commits
Author SHA1 Message Date
harraiken 92986e1386 Set PTE frame for non-paged pool allocations 2026-03-24 20:03:23 +01:00
harraiken 9a34a5f735 Precommit page map to allocate memory 2026-03-24 16:54:17 +01:00
harraiken 398db4bde1 Fix memory map size tracking and memory leak 2026-03-24 16:12:33 +01:00
harraiken 719564ba74 Fix memory corruption caused by UEFI memory map size changes during allocation 2026-03-24 16:04:53 +01:00
harraiken b95613787a Strip MM_POOL_PROTECTED flag to maintain NT compatibility and ensure correct pool tracking hash lookups 2026-03-24 08:39:47 +01:00
harraiken 4292d89185 Add expansion table and overflow handling for pool tag tracking 2026-03-24 08:13:05 +01:00
harraiken 214051e873 Update pool tracking statistics when resizing big allocations table 2026-03-23 20:36:24 +01:00
harraiken 3c52b88802 Unify naming convention for pool tracking structures 2026-03-23 20:12:18 +01:00
harraiken 944d5b5c0a Implement pool allocations and frees tracking 2026-03-23 18:54:18 +01:00
harraiken 597628a644 Refactor big allocation tracker to use Tag 2026-03-23 12:38:31 +01:00
harraiken b97babb2bf Remove temporary hack and allocate processor structures from non-paged pool 2026-03-22 23:40:15 +01:00
harraiken caacd9e275 Separate synchronization guards from spinlock implementation 2026-03-21 22:46:56 +01:00
harraiken d85e313c15 Implement core pool allocation and deallocation logic 2026-03-21 20:35:02 +01:00
harraiken b83eaaa820 Add definitions for pool management structures 2026-03-21 19:10:58 +01:00
harraiken 233440c8be Merge branch 'master' into memmgr 2026-03-21 18:30:45 +01:00
harraiken 140af4278e Fix uninitialized member in SpinLockGuard 2026-03-21 18:29:19 +01:00
harraiken c67372d747 Revert e2eff2b836 2026-03-19 20:13:07 +01:00
harraiken e2eff2b836 Fix DebugPrint definition 2026-03-19 20:07:30 +01:00
harraiken 930c9d3193 Replace NULL with NULLPTR 2026-03-19 20:03:26 +01:00
harraiken f862871a1f Implement RAII guard for memory pool synchronization 2026-03-19 19:59:40 +01:00
harraiken afb20a1796 Decouple pool initialization and validation from allocation logic 2026-03-18 20:31:06 +01:00
harraiken 876923e107 Track valid physical memory pages using a PFN bitmap 2026-03-17 00:05:33 +01:00
harraiken 3d7fe25471 Update panic invocations with detailed error context 2026-03-16 16:00:21 +01:00
harraiken 184ce5735e Add runlevel verification to memory pool allocations 2026-03-16 15:33:36 +01:00
harraiken 76d99dc9db Introduce pool allocation and free routines 2026-03-16 13:54:42 +01:00
harraiken d401ac4540 Remove redundant comments from panic calls 2026-03-16 09:55:26 +01:00
harraiken 22f9525e92 Fix critical memory corruption bug caused by overwriting active page tables marked as free memory 2026-03-15 22:34:58 +01:00
harraiken 80092a299e Ensure correct PTE value assignment via accessors 2026-03-15 20:31:33 +01:00
harraiken 42525e5993 Unify PTE type definitions across architectures 2026-03-15 20:23:44 +01:00
harraiken 0fed593147 Ensure SS and RSP are saved in trap frame 2026-03-15 17:32:01 +01:00
harraiken 6cdb66cbb3 Ensure SS and ESP are saved in trap frame 2026-03-15 00:33:09 +01:00
harraiken d263f17831 Refactor panic calls in memory manager 2026-03-13 19:44:29 +01:00
harraiken 6175413db2 Merge branch 'master' into memmgr 2026-03-13 19:43:01 +01:00
harraiken 428928c7e1 Simplify panic interface by using C++ overloading 2026-03-13 19:42:03 +01:00
harraiken 7d2b41a044 Calculate virtual address per page when initializing PFN entries 2026-03-13 19:35:29 +01:00
harraiken 5fe0740c2e Initialize system PTE pool for non-paged expansion pool 2026-03-10 23:09:40 +01:00
harraiken 35eac9d34c Make MM::Pte::InitializeSystemPtePool public 2026-03-10 23:01:50 +01:00
harraiken 5a78512561 Correct PTE mapping logic during multiple page allocation 2026-03-05 17:47:03 +01:00
harraiken b7a92ccce4 Implement memory deallocation and coalescing for non-paged pool 2026-03-05 10:08:54 +01:00
harraiken 8d2dfa6f62 Set up owner pointers for all pages during pool initialization 2026-03-04 22:44:45 +01:00
harraiken 5a9b7c0258 Implement canonical address validation routine 2026-03-04 14:15:33 +01:00
harraiken 5368fe2e8d Remove redundant static initialization of LowestPhysicalPage 2026-03-03 22:42:55 +01:00
harraiken 3e1f57f67c Improve type safety of physical page boundaries initialization 2026-03-03 08:51:22 +01:00
harraiken 44f27fad28 Correct physical memory range detection 2026-03-03 08:22:31 +01:00
harraiken ae8ac1eacb Fix uninitialized PTE pages causing memory corruption 2026-03-03 06:44:40 +01:00
harraiken a72bfd3902 Add MIN and MAX helper macros 2026-02-26 20:12:28 +01:00
harraiken 7bdd0dfe2c Implement basic non-paged pool allocator 2026-02-26 20:10:03 +01:00
harraiken 5778a761b5 Initialize paged pool after PFN database setup 2026-02-26 16:42:18 +01:00
harraiken d7d125dd50 Initialize paged pool alongside non-paged pool 2026-02-26 13:54:10 +01:00
harraiken 511dd15c0c Implement page allocation interface 2026-02-26 13:42:58 +01:00
harraiken 278def3081 Correct comment phrasing 2026-02-26 10:57:19 +01:00
harraiken 0658e98436 Expose the number of available physical pages 2026-02-25 20:25:50 +01:00
harraiken bfdb7bc476 Refactor PFN linking logic 2026-02-25 19:27:53 +01:00
harraiken 44fa2ca13a Merge branch 'master' into memmgr 2026-02-25 13:08:48 +01:00
harraiken 7a44901064 Add definition for guarded PTE flag and remove hardcoded value 2026-02-25 12:14:26 +01:00
harraiken a136f21f4b Merge branch 'master' into memmgr 2026-02-23 09:31:53 +01:00
harraiken f7b7b61ea4 Add interface to retrieve page map level (PML) 2026-02-11 20:23:24 +01:00
harraiken e2da6220f2 Fix PFN calculation truncation for memory above 4GB to prevent memory descriptor aliasing on PAE systems 2026-02-09 23:17:58 +01:00
harraiken 53f7945771 Reorder initialization sequence and flush TLB 2026-02-07 20:37:23 +01:00
harraiken 9a5ef6fc00 Map PDE and PTE ranges for i686 non-paged pool 2026-02-07 20:01:17 +01:00
harraiken fa64507350 Refactor EFI memory mapping to support distinct mapping strategies 2026-02-07 00:42:03 +01:00
harraiken 80ea0b49d0 Fix boot image size alignment calculation 2026-02-07 00:30:41 +01:00
harraiken 2e0e085acb Minor style fixes 2026-02-06 20:52:59 +01:00
harraiken 0ce2741e18 Deduplicate PFN descriptor processing logic across architectures 2026-02-06 09:08:59 +01:00
harraiken a46f30045a Fix stale comment 2026-02-06 08:51:23 +01:00
harraiken 0763a9522b Ensure paging hierarchy exists before processing memory descriptors 2026-02-06 08:40:24 +01:00
harraiken b51f21f55c Introduce page directory initialization helper 2026-02-06 00:20:01 +01:00
harraiken 0590ad3bcd Remove explicit identity mapping for internal page tables 2026-02-04 19:21:23 +01:00
harraiken 9b8417565b Fix coding style 2026-02-04 19:19:06 +01:00
harraiken bc391d6e1e Map and zero entire PFN database upfront 2026-02-03 22:32:10 +01:00
harraiken 7b6e284d39 Refactor PFN database initialization loop on i686 2026-02-03 22:28:17 +01:00
harraiken fae72f5326 Fix missing assignment of PointerPte 2026-02-03 20:17:28 +01:00
harraiken eb0957dbd4 Refactor PFN initialization to ensure proper page table setup 2026-02-02 19:06:14 +01:00
harraiken 3d7f512377 Use 64-bit format specifiers for memory mapping logs 2026-02-01 16:02:27 +01:00
harraiken 7f0341bb83 Fix physical address limit checks 2026-02-01 11:11:59 +01:00
harraiken ba4ac6cec8 Fix PFN truncation on i686 with PAE enabled 2026-02-01 10:18:13 +01:00
harraiken b16dbb19f8 Centralize memory layout dumping 2026-01-30 18:47:46 +01:00
harraiken 19f5307be6 Handle non-paged pool overflow 2026-01-30 18:38:54 +01:00
harraiken 825de8b471 Remove redundant PFN database alignment 2026-01-30 17:46:20 +01:00
harraiken 6a7bc64ac7 Overhaul kernel memory layout initialization and pool sizing 2026-01-30 14:47:13 +01:00
harraiken 726fd84241 Enable non-paged pool setup 2026-01-29 22:34:44 +01:00
harraiken 54e75c9345 Fix PFN database size calculation call sites 2026-01-29 22:29:02 +01:00
harraiken 5e3fb7a5a3 Move PFN database size tracking to memory layout 2026-01-29 22:26:31 +01:00
harraiken 58669d3074 Refactor memory layout structure 2026-01-29 22:10:26 +01:00
harraiken 72f34c8286 Add private helper declaration 2026-01-29 20:10:48 +01:00
harraiken a7820ff568 Calculate aligned boot image size from loader parameters 2026-01-29 20:08:27 +01:00
harraiken 7f6114f8e5 Add skeleton for memory pool allocator 2026-01-29 20:00:09 +01:00
harraiken fd29cf55ef Fix incorrect header guard comment 2026-01-29 19:49:54 +01:00
harraiken 446ce920ec Limit system PTE space mapping to calculated pool size 2026-01-27 16:56:40 +01:00
harraiken a4b9f495e5 Calculate total boot image size and pass it to kernel 2026-01-27 16:50:11 +01:00
harraiken 2c8eb6d692 Remove unused kernel base address definition 2026-01-23 20:59:10 +01:00
harraiken 31b0e4f441 Ensure contiguous virtual memory mapping 2026-01-23 20:55:56 +01:00
harraiken b5f220a2ae Correctly advance virtual address after mapping non-free regions 2026-01-23 20:52:45 +01:00
harraiken 0b1b76e9df Rollback bootloader memory management changes 2026-01-20 16:04:07 +01:00
harraiken d3edfef53b Fix broken PPE check on i686 2026-01-19 11:16:59 +01:00
harraiken 46c24e653e Add routine to retrieve installed memory size 2026-01-15 19:09:10 +01:00
harraiken c3607ea943 Add missing annotations 2026-01-14 22:48:25 +01:00
harraiken 7da6bcc75e Standardize ValidPte setup across architectures 2026-01-14 22:42:14 +01:00
harraiken 0f38d39705 Correctly initialize PFN entries for pre-mapped KSEG0 based memory 2026-01-14 17:44:50 +01:00
harraiken 587b85d0a4 Annotate input parameters 2026-01-13 15:39:16 +01:00