“内存管理@初始化”的版本间的差异

来自个人维基
跳转至: 导航搜索
(以“特定于体系结构的设置 x86 <pre> start_kernel └ setup_arch └ setup_memory_map └ x86_init.resources.memory_setup └ default_ma...”为内容创建页面)

2015年5月6日 (三) 16:09的版本

特定于体系结构的设置

x86

start_kernel
└ setup_arch
    └ setup_memory_map
        └ x86_init.resources.memory_setup
           └ default_machine_specific_memory_setup //创建一个列表,包括系统占据的内存区和空闲内存区
           └ printk(KERN_INFO "BIOS-provided physical RAM map:\n");
           └ e820_print_map(who); //打印出结果,如图1
        └ paging_init
           └ pagetable_init
              └ permanent_kmaps_init
           └ __flush_tlb_all
           └ kmap_init
<图1>

$dmesg
... 
BIOS-provided physical RAM map: 
  BIOS-e820: 0000000000000000 -000000000009e800 (usable) 
  BIOS-e820: 000000000009e800 -00000000000a0000 (reserved) 
  BIOS-e820: 00000000000c0000 -00000000000cc000 (reserved) 
  BIOS-e820: 00000000000d8000 -0000000000100000 (reserved) 
  BIOS-e820: 0000000000100000 -0000000017cf0000 (usable) 
  BIOS-e820: 0000000017cf0000 -0000000017cff000 (ACPI data) 
  BIOS-e820: 0000000017cff000 -0000000017d00000 (ACPI NVS) 
  BIOS-e820: 0000000017d00000 -0000000017e80000 (usable) 
  BIOS-e820: 0000000017e80000 -0000000018000000 (reserved) 
  BIOS-e820: 00000000ff800000 -00000000ffc00000 (reserved) 
  BIOS-e820: 00000000fff00000 -0000000100000000 (reserved) 
...