4 #include <kern/types.h>
5 #include <arch/paging.h>
6 #include <kernel/region.h>
15 // First and last+1 pages of memory, as page numbers. Small holes are
16 // ignored; large holes will require discontiguous memory support.
18 static const size_t mem_start = 0;
21 extern uintptr_t next_free_bootmem;
24 // Highzone and DMA32Zone aren't currently used, but will be once high
25 // memory support is added (PAE support will also be required for
26 // Highzone). KZone only goes up to 1.5GiB, to allow 512 MiB for
27 // kernel virtual mappings.
29 static const int num_zones = 2;
31 static const System::Mem::Region mem_zone_regions[num_zones] = {
32 { 0, 16*1024*1024 - 1 }, // ISA DMA zone
33 { 16*1024*1024, 1536*1024*1024 - 1 }, // Kernel direct mappable (KZone)
35 { 1536*1024*1024, 4ULL*1024*1024*1024 - 1 }, // DMA32Zone
36 { 4ULL*1024*1024*1024, 36ULL*1024*1024*1024 - 1} // HighZone
40 extern Mem::PageAllocZone pagezones[num_zones];
43 extern Mem::PageAllocZone **pagezonelists[Priv::num_zones];
62 void early_adjust_mappings();
64 // Call after mem_end is set.
69 extern Arch::Priv::Descriptor x86_gdt[1024];