/* * First memory setup routine called from setup_arch() * 1. setup swapper's mm @init_mm * 2. Count the pages we have and setup bootmem allocator * 3. zone setup
*/ void __init setup_arch_memory(void)
{ unsignedlong max_zone_pfn[MAX_NR_ZONES] = { 0 };
/* * seed the bootmem allocator after any DT memory node parsing or * "mem=xxx" cmdline overrides have potentially updated @arc_mem_sz * * Only low mem is added, otherwise we have crashes when allocating * mem_map[] itself. NO_BOOTMEM allocates mem_map[] at the end of * avail memory, ending in highmem with a > 32-bit address. However * it then tries to memset it with a truncaed 32-bit handle, causing * the crash
*/
#ifdef CONFIG_HIGHMEM /* * On ARC (w/o PAE) HIGHMEM addresses are actually smaller (0 based) * than addresses in normal aka low memory (0x8000_0000 based). * Even with PAE, the huge peripheral space hole would waste a lot of * mem with single contiguous mem_map[]. * Thus when HIGHMEM on ARC is enabled the memory map corresponding * to the hole is freed and ARC specific version of pfn_valid() * handles the hole in the memory map.
*/
/* * max_high_pfn should be ok here for both HIGHMEM and HIGHMEM+PAE. * For HIGHMEM without PAE max_high_pfn should be less than * min_low_pfn to guarantee that these two regions don't overlap. * For PAE case highmem is greater than lowmem, so it is natural * to use max_high_pfn. * * In both cases, holes should be handled by pfn_valid().
*/
max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.