Chapter3:MemoryManagement
which callssetup_bootmem_allocatorto initialize the bootmem allocator, whereas AMD64 uses
contig_initmem_init.
The code flow diagram in Figure 3-20 illustrates the individual steps involved in the initialization of the
bootmem allocator on IA-32 systems, and the corresponding diagram for AMD64 is shown in Figure 3-21.
Determine usable low memory page frames
Call reserve_bootmem to reserve special regions
setup_memory
reserve_bootmem(bootmap,bootmap_size)
register_bootmem_low_pages
init_bootmem
setup_bootmem_allocator
Figure 3-20: Initialization of the bootmem allocator on IA-32 machines.
Find suitable memory area
contig_initmem
bootmem_bootmap_pages
init_bootmem
register_bootmem_with_active_regions
reserve_bootmem (bootmap,bootmap_size)
Figure 3-21: Initialization of the bootmem allocator on
AMD64 machines.
Initialization for IA-32
setup_memoryanalyzes the detected memory regions to find the maximal page frame number in the low
memory region; high memory is of no use for the bootmem allocator because it is too complicated to
handle. The global variablemax_low_pfnholds the number of the highest mappable page. The kernel
reports the amount of memory found in its boot logs.
wolfgang@meitner>dmesg
...
0MB HIGHMEM available.
511MB LOWMEM available.
...