diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-08 13:11:25 -0500 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-08 13:12:30 -0500 |
commit | 973a7e37feba88f7e0a94372d6e54d9243b32d21 (patch) | |
tree | 56afa9b4eb4eca0c8263a208c40fafac94a11917 /kernel/include/mm/physical_mm.h | |
parent | c755557d0f85bd98200da263d50f9b2f552efe4b (diff) |
kernel: mm: physical_mm: Initialize free memory regions
Diffstat (limited to 'kernel/include/mm/physical_mm.h')
-rw-r--r-- | kernel/include/mm/physical_mm.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/kernel/include/mm/physical_mm.h b/kernel/include/mm/physical_mm.h index 7bda283..8438286 100644 --- a/kernel/include/mm/physical_mm.h +++ b/kernel/include/mm/physical_mm.h @@ -23,20 +23,15 @@ #include <common.h> -/* - * A byte has 8 bits, hence we can store information for up to 8 blocks at a - * time - */ -#define BLOCKS_PER_BYTE 8 - /* TODO: Update this to 2MiB when PAE is enabled */ -#define BLOCK_SIZE 4 * KiB - -#define BLOCK_ALIGN BLOCK_SIZE +#define BLOCK_SIZE (4 * KiB) #define BITMAP_ENTRY_SIZE 32 +/* TODO: This is the maximum number of blocks for a 4GiB system. */ +#define MAX_BLOCKS 1048576 + void physical_mm_init(void); -uint32_t mmap_find_first_free(void); +uint32_t physical_mm_find_first_free_block(void); #endif |