据我所知,我们可以通过检查以下命令结果来查看系统内存布局:
cat /proc/iomem
它将显示系统设备的物理内存范围:
00000000-0000ffff : reserved
00010000-0009f3ff : System RAM
0009f400-0009ffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000c7fff : Video ROM
000ca000-000cbfff : reserved
000ca000-000cafff : Adapter ROM
000cb000-000cbfff : Adapter ROM
000cc000-000cffff : PCI Bus 0000:00
000d0000-000d3fff : PCI Bus 0000:00
000d4000-000d7fff : PCI Bus 0000:00
000d8000-000dbfff : PCI Bus 0000:00
000dc000-000fffff : reserved
000f0000-000fffff : System ROM
00100000-7fedffff : System RAM
01000000-01520fa4 : Kernel code
01520fa5-01c0e44f : Kernel data
01d56000-0201d963 : Kernel bss
03000000-0b0fffff : Crash kernel
7fee0000-7fefefff : ACPI Tables
7feff000-7fefffff : ACPI Non-volatile Storage
7ff00000-7fffffff : System RAM
c0000000-febfffff : PCI Bus 0000:00
fec00000-fec0ffff : reserved
fec00000-fec003ff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed00000-fed003ff : pnp 00:08
fee00000-fee00fff : Local APIC
fee00000-fee00fff : reserved
fffe0000-ffffffff : reserved
但是我想知道内核源代码中的哪些代码会将这些信息提取并公开给/ proc / iomem? 谁能告诉我?
谢谢〜