基于msm-5.4
一、C代码部分
1. 调用路径
_head //head.S stext //head.S __primary_switch //head.S __primary_switched //head.S kaslr_early_init //kaslr.c 最先调用,可配置会否生效与不生效,默认生效 early_fixmap_init start_kernel setup_arch //setup.c 主要路径 early_fixmap_init early_ioremap_init setup_machine_fdt early_init_dt_scan(params) //fdt.c early_init_dt_scan_nodes //fdt.c early_init_dt_scan_memory //fdt.c 解析memory内存节点,填充memory内存区 arm64_memblock_init early_init_fdt_scan_reserved_mem //fdt.c 解析reserved内存,填充reserved内存区 paging_init bootmem_init memblocks_present //sparse.c sparse_init //sparse.c zone_sizes_init //init.c memblock_dump_all //memblock.h dump所有memory区域和reserved区域 early_ioremap_reset //标记内存已经初始化好了 build_all_zonelists //page_alloc.c page_alloc_init //page_alloc.c mm_init //main.c mem_init //init.c kmem_cache_init //slab.c kmemleak_init //kmemleak.c pgtable_init //mm.h vmalloc_init //vmalloc.c
标签:25,head,reserved,初始化,early,init,fdt,内存 From: https://www.cnblogs.com/hellokitty2/p/18340117