/* * arch/xtensa/mm/init.c * * Derived from MIPS, PPC. * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2001 - 2005 Tensilica Inc. * Copyright (C) 2014 - 2016 Cadence Design Systems Inc. * * Chris Zankel <chris@zankel.net> * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> * Marc Gauthier * Kevin Chea
*/
/* * Initialize the bootmem system and give it all low memory we have available.
*/
void __init bootmem_init(void)
{ /* Reserve all memory below PHYS_OFFSET, as memory * accounting doesn't work for pages below that address. * * If PHYS_OFFSET is zero reserve page at address 0: * successfull allocations should never return NULL.
*/
memblock_reserve(0, PHYS_OFFSET ? PHYS_OFFSET : 1);
early_init_fdt_scan_reserved_mem();
if (!memblock_phys_mem_size())
panic("No memory found!\n");
void __init zones_init(void)
{ /* All pages are DMA-able, so we put them all in the DMA zone. */ unsignedlong max_zone_pfn[MAX_NR_ZONES] = {
[ZONE_NORMAL] = max_low_pfn, #ifdef CONFIG_HIGHMEM
[ZONE_HIGHMEM] = max_pfn, #endif
};
free_area_init(max_zone_pfn);
print_vm_layout();
}
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.