void __init setup_arch(char **cmdline_p)
max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
=>unsigned long __init_refok init_memory_mapping(unsigned long start, unsigned long end)
for (i = 0; i < nr_range; i++)
ret = kernel_physical_mapping_init(mr[i].start, mr[i].end, mr[i].page_size_mask);
=>unsigned long __init kernel_physical_mapping_init(
unsigned long start,
unsigned long end,
unsigned long page_size_mask)
pgd_t *pgd_base = swapper_pg_dir;
for (; pgd_idx < PTRS_PER_PGD; pgd++, pgd_idx++)
pmd = one_md_table_init(pgd);
for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn; pmd++, pmd_idx++)
pte = one_page_table_init(pmd);
load_cr3(swapper_pg_dir);
第一次分页
/*
* Enable paging
*/
movl $pa(swapper_pg_dir),%eax
movl %eax,%cr3 /* set the page table pointer.. */
movl %cr0,%eax
orl $X86_CR0_PG,%eax
movl %eax,%cr0 /* ..and set paging (PG) bit */
ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */
追溯swapper_pg_dir
linux的swapper_pg_dir的初始化
https://blog.csdn.net/dog250/article/details/5303446
内核启动之启动内核——startup_32
https://blog.csdn.net/yu616568/article/details/7581919
第一次启动分页管理
https://blog.csdn.net/yunsongice/article/details/6110676
Linux内存管理 (3)内核内存的布局图
https://www.cnblogs.com/arnoldlu/p/8068286.html
STOSL指令
https://blog.csdn.net/linpeng12358/article/details/41011209
x86汇编之十(使用字符串)
https://www.cnblogs.com/nikosoft/p/4139069.html
Linux 内存管理框架
https://blog.csdn.net/chenying126/article/details/78311230
Linux Kernel 2.6.37 启动过程:startup_32
http://blog.chinaunix.net/uid-1701789-id-148056.html
linux内核学习(13)我们开始慢慢地往上爬...
https://blog.csdn.net/cug_fish_2009/article/details/6123942
linux内存管理原理深入理解段式页式
https://blog.csdn.net/h674174380/article/details/75453750
tolimit
https://www.cnblogs.com/tolimit/p/4585803.html
进程切换分析(2):TLB处理
http://www.wowotech.net/process_management/context-switch-tlb.html
关于存储管理,缺页中断以及页表,TLB以及倒序页表的知识整理
https://blog.csdn.net/challeng_everything/article/details/79569066
TLB flush操作
http://www.wowotech.net/memory_management/tlb-flush.html
常见架构TLB miss处理方法
http://blog.sina.com.cn/s/blog_633f462901018reb.html
LINUX KERNEL的内存管理(全景图)
https://zhuanlan.zhihu.com/p/38598444