繼續上一篇文章《debian內核代碼執行流程(一)》未完成部分。php
acpi_bus_init調用acpi_initialize_objects,通過一系列複雜調用後輸出下面信息:html
[ 0.147393] ACPI: SSDT 7f5e7cc0 0030F (v01 PmRef Cpu0Ist 00003000 INTL 20060912) [ 0.147566] ACPI: Dynamic OEM Table Load: [ 0.147569] ACPI: SSDT (null) 0030F (v01 PmRef Cpu0Ist 00003000 INTL 20060912) [ 0.148012] ACPI: SSDT 7f5e81e0 001B3 (v01 PmRef Cpu1Ist 00003000 INTL 20060912) [ 0.148176] ACPI: Dynamic OEM Table Load: [ 0.148178] ACPI: SSDT (null) 001B3 (v01 PmRef Cpu1Ist 00003000 INTL 20060912)
acpi_bus_init接着調用acpi_sysfs_init,建立/sys/firmware/acpi/tables/以及/sys/firmware/acpi/tables/dynamicnode
acpi_bus_init接着輸出下面信息:linux
[ 0.148366] ACPI: Interpreter enabled
acpi_bus_init接着調用acpi_sleep_init,輸出下面信息:ios
[ 0.148372] ACPI: (supports S0 S1 S4 S5)
acpi_bus_init接着調用acpi_bus_init_irq,輸出下面信息:windows
[ 0.148389] ACPI: Using IOAPIC for interrupt routing
drivers/acpi/dock.c中有下面代碼:app
subsys_initcall(dock_init);
此時執行dock_init函數,輸出下面信息:dom
[ 0.152327] ACPI: No dock devices found.
drivers/acpi/pci_root.c中有下面代碼:socket
subsys_initcall(acpi_pci_root_init);
此時執行acpi_pci_root_init函數,acpi_pci_root_init調用acpi_hest_init,輸出下面信息:tcp
[ 0.152329] HEST: Table not found.
acpi_pci_root_init調用pci_acpi_crs_quirks函數,輸出下面信息:
[ 0.152333] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
acpi_pci_root_init執行acpi_bus_register_driver(&acpi_pci_root_driver) ,以後通過複雜的過程後調用acpi_pci_root_add,輸出下面信息:
[ 0.152382] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
acpi_pci_root_add調用pci_acpi_scan_root,pci_acpi_scan_root調用pci_scan_child_bus,pci_scan_child_bus調用 pcibios_fixup_bus,
pcibios_fixup_bus調用pci_read_bridge_bases,pci_read_bridge_bases分別調用pci_read_bridge_io和pci_read_bridge_mmio,輸出下面信息:
[ 0.152491] pci_root PNP0A08:00: host bridge window [io 0x0000-0x0cf7] [ 0.152494] pci_root PNP0A08:00: host bridge window [io 0x0d00-0xffff] [ 0.152496] pci_root PNP0A08:00: host bridge window [mem 0x000a0000-0x000bffff] [ 0.152498] pci_root PNP0A08:00: host bridge window [mem 0x000c0000-0x000dffff] [ 0.152501] pci_root PNP0A08:00: host bridge window [mem 0x7f600000-0xfebfffff]
lib/vsprintf.c中有下面的說明:
* - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref]
這個對應於輸出信息中使用%pR的狀況。
pci_scan_child_bus調用pci_scan_slot,pci_scan_slot調用pci_scan_single_device,
pci_scan_single_device調用pci_scan_device,pci_scan_device調用pci_setup_device,輸出下面信息:
[ 0.152514] pci 0000:00:00.0: [8086:29c0] type 0 class 0x000600
相似地,輸出下面信息:
[ 0.152556] pci 0000:00:02.0: [8086:29c2] type 0 class 0x000300
pci_setup_device調用pci_read_bases,pci_read_bases循環調用__pci_read_base,輸出下面信息:
[ 0.152565] pci 0000:00:02.0: reg 10: [mem 0xfdf00000-0xfdf7ffff] [ 0.152571] pci 0000:00:02.0: reg 14: [io 0xff00-0xff07] [ 0.152576] pci 0000:00:02.0: reg 18: [mem 0xd0000000-0xdfffffff pref] [ 0.152582] pci 0000:00:02.0: reg 1c: [mem 0xfd600000-0xfd6fffff]
相似地,輸出下面信息:
[ 0.152645] pci 0000:00:1b.0: [8086:27d8] type 0 class 0x000403 [ 0.152660] pci 0000:00:1b.0: reg 10: [mem 0xfdff8000-0xfdffbfff 64bit]
pci_scan_single_devcie調用pci_device_add, pci_device_add調用pci_init_capabilities,輸出下面信息:
[ 0.152723] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
後續還有不少輸出也與前面相似:
[ 0.152744] pci 0000:00:1c.0: [8086:27d0] type 1 class 0x000604 [ 0.152808] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold [ 0.152830] pci 0000:00:1c.1: [8086:27d2] type 1 class 0x000604 [ 0.152894] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold [ 0.152916] pci 0000:00:1c.2: [8086:27d4] type 1 class 0x000604 [ 0.152979] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold [ 0.153001] pci 0000:00:1c.3: [8086:27d6] type 1 class 0x000604 [ 0.153065] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold [ 0.153087] pci 0000:00:1d.0: [8086:27c8] type 0 class 0x000c03 [ 0.153124] pci 0000:00:1d.0: reg 20: [io 0xfe00-0xfe1f] [ 0.153154] pci 0000:00:1d.1: [8086:27c9] type 0 class 0x000c03 [ 0.153192] pci 0000:00:1d.1: reg 20: [io 0xfd00-0xfd1f] [ 0.153221] pci 0000:00:1d.2: [8086:27ca] type 0 class 0x000c03 [ 0.153258] pci 0000:00:1d.2: reg 20: [io 0xfc00-0xfc1f] [ 0.153287] pci 0000:00:1d.3: [8086:27cb] type 0 class 0x000c03 [ 0.153324] pci 0000:00:1d.3: reg 20: [io 0xfb00-0xfb1f] [ 0.153362] pci 0000:00:1d.7: [8086:27cc] type 0 class 0x000c03 [ 0.153379] pci 0000:00:1d.7: reg 10: [mem 0xfdfff000-0xfdfff3ff] [ 0.153455] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold [ 0.153474] pci 0000:00:1e.0: [8086:244e] type 1 class 0x000604 [ 0.153532] pci 0000:00:1f.0: [8086:27b8] type 0 class 0x000601 [ 0.153609] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0800 (mask 003f) [ 0.153652] pci 0000:00:1f.1: [8086:27df] type 0 class 0x000101 [ 0.153664] pci 0000:00:1f.1: reg 10: [io 0x0000-0x0007] [ 0.153673] pci 0000:00:1f.1: reg 14: [io 0x0000-0x0003] [ 0.153681] pci 0000:00:1f.1: reg 18: [io 0x0000-0x0007] [ 0.153690] pci 0000:00:1f.1: reg 1c: [io 0x0000-0x0003] [ 0.153698] pci 0000:00:1f.1: reg 20: [io 0xfa00-0xfa0f] [ 0.153731] pci 0000:00:1f.2: [8086:27c0] type 0 class 0x000101 [ 0.153744] pci 0000:00:1f.2: reg 10: [io 0xf900-0xf907] [ 0.153751] pci 0000:00:1f.2: reg 14: [io 0xf800-0xf803] [ 0.153759] pci 0000:00:1f.2: reg 18: [io 0xf700-0xf707] [ 0.153767] pci 0000:00:1f.2: reg 1c: [io 0xf600-0xf603] [ 0.153774] pci 0000:00:1f.2: reg 20: [io 0xf500-0xf50f] [ 0.153806] pci 0000:00:1f.2: PME# supported from D3hot [ 0.153820] pci 0000:00:1f.3: [8086:27da] type 0 class 0x000c05 [ 0.153868] pci 0000:00:1f.3: reg 20: [io 0x0500-0x051f] [ 0.153935] pci 0000:00:1c.0: PCI bridge to [bus 01-01] [ 0.153939] pci 0000:00:1c.0: bridge window [io 0xb000-0xbfff] [ 0.153943] pci 0000:00:1c.0: bridge window [mem 0xfde00000-0xfdefffff] [ 0.153949] pci 0000:00:1c.0: bridge window [mem 0xfdd00000-0xfddfffff 64bit pref] [ 0.153985] pci 0000:00:1c.1: PCI bridge to [bus 02-02] [ 0.153988] pci 0000:00:1c.1: bridge window [io 0xa000-0xafff] [ 0.153992] pci 0000:00:1c.1: bridge window [mem 0xfdc00000-0xfdcfffff] [ 0.153998] pci 0000:00:1c.1: bridge window [mem 0xfdb00000-0xfdbfffff 64bit pref] [ 0.154034] pci 0000:00:1c.2: PCI bridge to [bus 03-03] [ 0.154037] pci 0000:00:1c.2: bridge window [io 0xe000-0xefff] [ 0.154041] pci 0000:00:1c.2: bridge window [mem 0xfda00000-0xfdafffff] [ 0.154047] pci 0000:00:1c.2: bridge window [mem 0xfd900000-0xfd9fffff 64bit pref] [ 0.154099] pci 0000:04:00.0: [10ec:8136] type 0 class 0x000200 [ 0.154115] pci 0000:04:00.0: reg 10: [io 0xde00-0xdeff] [ 0.154143] pci 0000:04:00.0: reg 18: [mem 0xfd7ff000-0xfd7fffff 64bit pref] [ 0.154160] pci 0000:04:00.0: reg 20: [mem 0xfd7e0000-0xfd7effff 64bit pref] [ 0.154172] pci 0000:04:00.0: reg 30: [mem 0x00000000-0x0001ffff pref] [ 0.154233] pci 0000:04:00.0: supports D1 D2 [ 0.154235] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold [ 0.160032] pci 0000:00:1c.3: PCI bridge to [bus 04-04] [ 0.160039] pci 0000:00:1c.3: bridge window [io 0xd000-0xdfff] [ 0.160046] pci 0000:00:1c.3: bridge window [mem 0xfd800000-0xfd8fffff] [ 0.160056] pci 0000:00:1c.3: bridge window [mem 0xfd700000-0xfd7fffff 64bit pref] [ 0.160134] pci 0000:00:1e.0: PCI bridge to [bus 05-05] (subtractive decode) [ 0.160141] pci 0000:00:1e.0: bridge window [io 0xc000-0xcfff] [ 0.160148] pci 0000:00:1e.0: bridge window [mem 0xfd500000-0xfd5fffff] [ 0.160157] pci 0000:00:1e.0: bridge window [mem 0xfd400000-0xfd4fffff 64bit pref] [ 0.160162] pci 0000:00:1e.0: bridge window [io 0x0000-0x0cf7] (subtractive decode) [ 0.160167] pci 0000:00:1e.0: bridge window [io 0x0d00-0xffff] (subtractive decode) [ 0.160173] pci 0000:00:1e.0: bridge window [mem 0x000a0000-0x000bffff] (subtractive decode) [ 0.160178] pci 0000:00:1e.0: bridge window [mem 0x000c0000-0x000dffff] (subtractive decode) [ 0.160183] pci 0000:00:1e.0: bridge window [mem 0x7f600000-0xfebfffff] (subtractive decode
其中[ 0.160134] pci 0000:00:1e.0: PCI bridge to [bus 05-05] (subtractive decode)相似的輸出也是在pci_read_bridge_bases中產生的。
查看本機pci設備信息:
$ lspci -nn 00:00.0 Host bridge [0600]: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller [8086:29c0] (rev 10) 00:02.0 VGA compatible controller [0300]: Intel Corporation 82G33/G31 Express Integrated Graphics Controller [8086:29c2] (rev 10) 00:1b.0 Audio device [0403]: Intel Corporation NM10/ICH7 Family High Definition Audio Controller [8086:27d8] (rev 01) 00:1c.0 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 1 [8086:27d0] (rev 01) 00:1c.1 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 2 [8086:27d2] (rev 01) 00:1c.2 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 3 [8086:27d4] (rev 01) 00:1c.3 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 4 [8086:27d6] (rev 01) 00:1d.0 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 [8086:27c8] (rev 01) 00:1d.1 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 [8086:27c9] (rev 01) 00:1d.2 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 [8086:27ca] (rev 01) 00:1d.3 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 [8086:27cb] (rev 01) 00:1d.7 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller [8086:27cc] (rev 01) 00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev e1) 00:1f.0 ISA bridge [0601]: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge [8086:27b8] (rev 01) 00:1f.1 IDE interface [0101]: Intel Corporation 82801G (ICH7 Family) IDE Controller [8086:27df] (rev 01) 00:1f.2 IDE interface [0101]: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] [8086:27c0] (rev 01) 00:1f.3 SMBus [0c05]: Intel Corporation NM10/ICH7 Family SMBus Controller [8086:27da] (rev 01) 04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 02)
上面的系統輸出信息中與pci相關部分就是對pci上的各類設備執行掃描和相應初始化工做。
acpi_pci_root_add還調用pci_acpi_scan_root,輸出下面信息:
[ 0.160216] pci_bus 0000:00: on NUMA node 0
acpi_pci_root_add屢次調用acpi_pci_bridge_scan,acpi_pci_bridge_scan調用device->parent->ops.bind,即acpi_pci_bind。
acpi_pci_bind調用acpi_pci_irq_add_prt,由於被調用屢次,輸出下面信息:
[ 0.160219] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] [ 0.160338] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEX0._PRT] [ 0.160373] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEX1._PRT] [ 0.160406] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEX2._PRT] [ 0.160438] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEX3._PRT] [ 0.160475] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
acpi_pci_root_add接着輸出下面信息:
[ 0.160616] pci0000:00: Requesting ACPI _OSC control (0x1d)
[ 0.160619] pci0000:00: ACPI _OSC request failed (AE_NOT_FOUND), returned control mask: 0x1d [ 0.160621] ACPI _OSC control for PCIe not granted, disabling ASPM
在drivers/acpi/pci_link.c中有下面代碼:
subsys_initcall(acpi_pci_link_init);
此時調用acpi_pci_link_init函數,acpi_pci_link_init調用acpi_bus_register_driver(&acpi_pci_link_driver),
以後會調用acpi_pci_link_driver.ops.add函數,即acpi_pci_link_add函數,輸出下面信息(不知爲什麼會產生屢次輸出):
[ 0.167979] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 9 10 *11 12 14 15) [ 0.168037] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled. [ 0.168081] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 7 9 10 11 12 14 15) [ 0.168124] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 9 10 11 12 14 *15) [ 0.168167] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled. [ 0.168210] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled. [ 0.168253] ACPI: PCI Interrupt Link [LNK0] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled. [ 0.168297] ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 7 9 *10 11 12 14 15)
drivers/gpu/vga/vgaarb.c中有下面代碼:
subsys_initcall(vga_arb_device_init);
此時執行vga_arb_device_init函數,vga_arb_device_init調用vga_arbiter_add_pci_device,輸出下面信息:
[ 0.168380] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
vga_arb_device_init中接着輸出下面信息:
[ 0.168380] vgaarb: loaded [ 0.168380] vgaarb: bridge control possible 0000:00:02.0
下面這行輸出信息不知道是如何產生的:
[ 0.168380] PCI: Using ACPI for IRQ routing
arch/x86/pci/legacy.c中有下面定義:
subsys_initcall(pci_subsys_init);
此時執行pci_subsys_init函數。pci_subsys_init調用pcibios_init,pcibios_init調用pcibios_set_cache_line_size,輸出下面信息:
[ 0.174067] PCI: pci_cache_line_size set to 64 bytes
pcibios_init調用pcibios_resource_survey,pcibios_resource_survey調用e820_reserve_resource_late,輸出下面信息:
[ 0.174129] reserve RAM buffer: 000000000009f800 - 000000000009ffff [ 0.174132] reserve RAM buffer: 000000007f590000 - 000000007fffffff
arch/x86/kernel/hpet.c中有下面代碼:
fs_initcall(hpet_late_init);
此時會調用hpet_late_init,hpet_late_init調用hpet_msi_capability_lookup,輸出下面信息:
[ 0.174232] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
hpet_late_init調用hpet_reserve_platform_timers,hpet_reserve_platform_timers調用hpet_alloc,輸出下面信息:
[ 0.174237] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0 [ 0.174241] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
hpet_alloc中調用clocksource_register_hz,clocksource_register_hz調用__clocksource_register_scale,
__clocksource_register_scale調用clocksource_select,輸出下面信息:
[ 0.180130] Switching to clocksource hpet
drivers/pnp/pnpacpi/core.c中有下面代碼:
fs_initcall(pnpacpi_init);
此時執行pnpacpi_init函數,輸出下面信息:
[ 0.181748] pnp: PnP ACPI init
pnpacpi_init調用register_acpi_bus_type(&acpi_bus_type),輸出下面信息:
[ 0.181760] ACPI: bus type pnp registere
pnpacpi_init接着調用acpi_get_devices,輸出下面信息:
[ 0.181827] pnp 00:00: [bus 00-ff] [ 0.181830] pnp 00:00: [io 0x0cf8-0x0cff] [ 0.181832] pnp 00:00: [io 0x0000-0x0cf7 window] [ 0.181835] pnp 00:00: [io 0x0d00-0xffff window] [ 0.181837] pnp 00:00: [mem 0x000a0000-0x000bffff window] [ 0.181839] pnp 00:00: [mem 0x000c0000-0x000dffff window] [ 0.181841] pnp 00:00: [mem 0x7f600000-0xfebfffff window] [ 0.181885] pnp 00:00: Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active) [ 0.181940] pnp 00:01: [io 0x0010-0x001f] [ 0.181942] pnp 00:01: [io 0x0022-0x003f] [ 0.181944] pnp 00:01: [io 0x0044-0x005f] [ 0.181945] pnp 00:01: [io 0x0062-0x0063] [ 0.181947] pnp 00:01: [io 0x0065-0x006f] [ 0.181949] pnp 00:01: [io 0x0074-0x007f] [ 0.181951] pnp 00:01: [io 0x0091-0x0093] [ 0.181953] pnp 00:01: [io 0x00a2-0x00bf] [ 0.181954] pnp 00:01: [io 0x00e0-0x00ef] [ 0.181956] pnp 00:01: [io 0x04d0-0x04d1] [ 0.181958] pnp 00:01: [io 0x0800-0x087f] [ 0.181960] pnp 00:01: [io 0x0880-0x088f] [ 0.182013] system 00:01: [io 0x04d0-0x04d1] has been reserved [ 0.182016] system 00:01: [io 0x0800-0x087f] has been reserved [ 0.182018] system 00:01: [io 0x0880-0x088f] has been reserved [ 0.182021] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.182032] pnp 00:02: [dma 4] [ 0.182034] pnp 00:02: [io 0x0000-0x000f] [ 0.182036] pnp 00:02: [io 0x0080-0x0090] [ 0.182037] pnp 00:02: [io 0x0094-0x009f] [ 0.182039] pnp 00:02: [io 0x00c0-0x00df] [ 0.182067] pnp 00:02: Plug and Play ACPI device, IDs PNP0200 (active) [ 0.182110] pnp 00:03: [irq 0 disabled] [ 0.182121] pnp 00:03: [irq 8] [ 0.182123] pnp 00:03: [mem 0xfed00000-0xfed003ff] [ 0.182152] pnp 00:03: Plug and Play ACPI device, IDs PNP0103 (active) [ 0.182177] pnp 00:04: [io 0x0070-0x0073] [ 0.182205] pnp 00:04: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.182214] pnp 00:05: [io 0x0061] [ 0.182240] pnp 00:05: Plug and Play ACPI device, IDs PNP0800 (active) [ 0.182249] pnp 00:06: [io 0x00f0-0x00ff] [ 0.182254] pnp 00:06: [irq 13] [ 0.182283] pnp 00:06: Plug and Play ACPI device, IDs PNP0c04 (active) [ 0.182409] pnp 00:07: [io 0x03f0-0x03f5] [ 0.182412] pnp 00:07: [io 0x03f7] [ 0.182416] pnp 00:07: [irq 6] [ 0.182418] pnp 00:07: [dma 2] [ 0.182457] pnp 00:07: Plug and Play ACPI device, IDs PNP0700 (active) [ 0.182627] pnp 00:08: [io 0x03f8-0x03ff] [ 0.182632] pnp 00:08: [irq 4] [ 0.182689] pnp 00:08: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.182872] pnp 00:09: [io 0x02f8-0x02ff] [ 0.182876] pnp 00:09: [irq 3] [ 0.182933] pnp 00:09: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.183180] pnp 00:0a: [io 0x0378-0x037f] [ 0.183185] pnp 00:0a: [irq 7] [ 0.183233] pnp 00:0a: Plug and Play ACPI device, IDs PNP0400 (active) [ 0.183348] pnp 00:0b: [io 0x0400-0x04bf] [ 0.183394] system 00:0b: [io 0x0400-0x04bf] has been reserved [ 0.183397] system 00:0b: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.183415] pnp 00:0c: [mem 0xffb80000-0xffbfffff] [ 0.183445] pnp 00:0c: Plug and Play ACPI device, IDs INT0800 (active) [ 0.183612] pnp 00:0d: [mem 0xe0000000-0xefffffff] [ 0.183666] system 00:0d: [mem 0xe0000000-0xefffffff] has been reserved [ 0.183669] system 00:0d: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.183732] pnp 00:0e: [mem 0x000f0000-0x000fffff] [ 0.183734] pnp 00:0e: [mem 0x7f600000-0x7f6fffff] [ 0.183736] pnp 00:0e: [mem 0xfed00000-0xfed000ff] [ 0.183739] pnp 00:0e: [mem 0x7f590000-0x7f5fffff] [ 0.183740] pnp 00:0e: [mem 0x00000000-0x0009ffff] [ 0.183742] pnp 00:0e: [mem 0x00100000-0x7f58ffff] [ 0.183744] pnp 00:0e: [mem 0xfec00000-0xfec00fff] [ 0.183746] pnp 00:0e: [mem 0xfed13000-0xfed1dfff] [ 0.183748] pnp 00:0e: [mem 0xfed20000-0xfed8ffff] [ 0.183750] pnp 00:0e: [mem 0xfee00000-0xfee00fff] [ 0.183752] pnp 00:0e: [mem 0xffb00000-0xffb7ffff] [ 0.183754] pnp 00:0e: [mem 0xfff00000-0xffffffff] [ 0.183756] pnp 00:0e: [mem 0x000e0000-0x000effff] [ 0.183817] system 00:0e: [mem 0x000f0000-0x000fffff] could not be reserved [ 0.183820] system 00:0e: [mem 0x7f600000-0x7f6fffff] has been reserved [ 0.183823] system 00:0e: [mem 0xfed00000-0xfed000ff] has been reserved [ 0.183825] system 00:0e: [mem 0x7f590000-0x7f5fffff] could not be reserved [ 0.183828] system 00:0e: [mem 0x00000000-0x0009ffff] could not be reserved [ 0.183831] system 00:0e: [mem 0x00100000-0x7f58ffff] could not be reserved [ 0.183834] system 00:0e: [mem 0xfec00000-0xfec00fff] could not be reserved [ 0.183836] system 00:0e: [mem 0xfed13000-0xfed1dfff] has been reserved [ 0.183839] system 00:0e: [mem 0xfed20000-0xfed8ffff] has been reserved [ 0.183842] system 00:0e: [mem 0xfee00000-0xfee00fff] has been reserved [ 0.183844] system 00:0e: [mem 0xffb00000-0xffb7ffff] has been reserved [ 0.183847] system 00:0e: [mem 0xfff00000-0xffffffff] has been reserved [ 0.183847] system 00:0e: [mem 0x000e0000-0x000effff] has been reserved [ 0.183847] system 00:0e: Plug and Play ACPI device, IDs PNP0c01 (active)
pnpacpi_init接着輸出下面信息:
[ 0.183847] pnp: PnP ACPI: found 15 devices
pnpacpi_init接着調用unregister_acpi_bus_type,輸出下面信息:
[ 0.183848] ACPI: ACPI bus type pnp unregistered
drivers/pnp/pnpacpi/core.c中有下面代碼:
fs_initcall(pnpbios_init);
此時調用pnpbios_init,輸出下面信息:
[ 0.183851] PnPBIOS: Disabled by ACPI PNP
arch/x86/pci/i386.c中有下面代碼:
fs_initcall(pcibios_assign_resources);
此時調用pcibios_assign_resources,pci_assign_resources調用pci_assign_unassigned_resources,輸出下面信息:
PCI: max bus depth: 1 pci_try_num: 2
pci_assign_unassigned_resources對pci_root_buses列表中的全部總線調用__pci_bus_assign_resources,
__pci_bus_assign_resources中對於總線上全部PCI_CLASS_BRIDGE_PCI設備調用pci_setup_bridge,
pci_setup_bridge調用__pci_setup_bridge,輸出下面信息:
[ 0.220656] pci 0000:00:1c.0: PCI bridge to [bus 01-01] [ 0.220659] pci 0000:00:1c.0: bridge window [io 0xb000-0xbfff] [ 0.220664] pci 0000:00:1c.0: bridge window [mem 0xfde00000-0xfdefffff] [ 0.220668] pci 0000:00:1c.0: bridge window [mem 0xfdd00000-0xfddfffff 64bit pref]
相似地,輸出下面信息:
[ 0.220674] pci 0000:00:1c.1: PCI bridge to [bus 02-02] [ 0.220677] pci 0000:00:1c.1: bridge window [io 0xa000-0xafff] [ 0.220682] pci 0000:00:1c.1: bridge window [mem 0xfdc00000-0xfdcfffff] [ 0.220686] pci 0000:00:1c.1: bridge window [mem 0xfdb00000-0xfdbfffff 64bit pref] [ 0.220691] pci 0000:00:1c.2: PCI bridge to [bus 03-03] [ 0.220694] pci 0000:00:1c.2: bridge window [io 0xe000-0xefff] [ 0.220699] pci 0000:00:1c.2: bridge window [mem 0xfda00000-0xfdafffff] [ 0.220703] pci 0000:00:1c.2: bridge window [mem 0xfd900000-0xfd9fffff 64bit pref] [ 0.220711] pci 0000:04:00.0: BAR 6: assigned [mem 0xfd700000-0xfd71ffff pref] [ 0.220713] pci 0000:00:1c.3: PCI bridge to [bus 04-04] [ 0.220716] pci 0000:00:1c.3: bridge window [io 0xd000-0xdfff] [ 0.220721] pci 0000:00:1c.3: bridge window [mem 0xfd800000-0xfd8fffff] [ 0.220724] pci 0000:00:1c.3: bridge window [mem 0xfd700000-0xfd7fffff 64bit pref] [ 0.220730] pci 0000:00:1e.0: PCI bridge to [bus 05-05] [ 0.220733] pci 0000:00:1e.0: bridge window [io 0xc000-0xcfff] [ 0.220738] pci 0000:00:1e.0: bridge window [mem 0xfd500000-0xfd5fffff] [ 0.220742] pci 0000:00:1e.0: bridge window [mem 0xfd400000-0xfd4fffff 64bit pref]
pci_assign_unassigned_resources對pci_root_buses列表中的全部總線調用pci_enable_bridges,
pci_enable_bridges對於總線上全部設備調用pci_set_master, pci_set_master調用pcibios_set_master,由於是屢次調用,因此輸出下面信息:
[ 0.220761] pci 0000:00:1c.0: setting latency timer to 64 [ 0.220773] pci 0000:00:1c.1: setting latency timer to 64 [ 0.220784] pci 0000:00:1c.2: setting latency timer to 64 [ 0.220794] pci 0000:00:1c.3: setting latency timer to 64 [ 0.220801] pci 0000:00:1e.0: setting latency timer to 64
pci_assign_unassigned_resources對pci_root_buses列表中的全部總線調用pci_bus_dump_resources,
pci_bus_dump_resources調用pci_bus_dump_res,由於屢次調用,輸出下面信息:
[ 0.220804] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7] [ 0.220806] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff] [ 0.220809] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff] [ 0.220811] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000dffff] [ 0.220813] pci_bus 0000:00: resource 8 [mem 0x7f600000-0xfebfffff] [ 0.220815] pci_bus 0000:01: resource 0 [io 0xb000-0xbfff] [ 0.220818] pci_bus 0000:01: resource 1 [mem 0xfde00000-0xfdefffff] [ 0.220820] pci_bus 0000:01: resource 2 [mem 0xfdd00000-0xfddfffff 64bit pref] [ 0.220822] pci_bus 0000:02: resource 0 [io 0xa000-0xafff] [ 0.220824] pci_bus 0000:02: resource 1 [mem 0xfdc00000-0xfdcfffff] [ 0.220827] pci_bus 0000:02: resource 2 [mem 0xfdb00000-0xfdbfffff 64bit pref] [ 0.220829] pci_bus 0000:03: resource 0 [io 0xe000-0xefff] [ 0.220831] pci_bus 0000:03: resource 1 [mem 0xfda00000-0xfdafffff] [ 0.220833] pci_bus 0000:03: resource 2 [mem 0xfd900000-0xfd9fffff 64bit pref] [ 0.220835] pci_bus 0000:04: resource 0 [io 0xd000-0xdfff] [ 0.220837] pci_bus 0000:04: resource 1 [mem 0xfd800000-0xfd8fffff] [ 0.220840] pci_bus 0000:04: resource 2 [mem 0xfd700000-0xfd7fffff 64bit pref] [ 0.220842] pci_bus 0000:05: resource 0 [io 0xc000-0xcfff] [ 0.220844] pci_bus 0000:05: resource 1 [mem 0xfd500000-0xfd5fffff] [ 0.220847] pci_bus 0000:05: resource 2 [mem 0xfd400000-0xfd4fffff 64bit pref] [ 0.220849] pci_bus 0000:05: resource 4 [io 0x0000-0x0cf7] [ 0.220851] pci_bus 0000:05: resource 5 [io 0x0d00-0xffff] [ 0.220853] pci_bus 0000:05: resource 6 [mem 0x000a0000-0x000bffff] [ 0.220855] pci_bus 0000:05: resource 7 [mem 0x000c0000-0x000dffff] [ 0.220857] pci_bus 0000:05: resource 8 [mem 0x7f600000-0xfebfffff]
net/ipv4/af_inet.c中有下面代碼:
fs_initcall(inet_init);
此時調用inet_init, inet_init調用socket_register(&inet_family_ops),輸出下面信息:
[ 0.220902] NET: Registered protocol family 2
在include/linux/socket.h中有下面的定義:
#define AF_INET 2 /* Internet IP Protocol */
inet_family_ops.family=PF_INET,而PF_INET又等於AF_INET,因此輸出的協議簇是2
inet_init還分別對arp,ip,tcp,udp,ping,icmp等進行了初始化。
inet_init調用ip_init,ip_init調用ip_rt_init,輸出下面信息:
[ 0.220961] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
inet_init調用tcp_init,輸出下面信息:
[ 0.221172] TCP established hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.221641] TCP bind hash table entries: 65536 (order: 7, 524288 bytes) [ 0.221873] TCP: Hash tables configured (established 131072 bind 65536)
tcp_init調用tcp_register_congestion_control(&tcp_reno),輸出下面信息:
[ 0.221875] TCP reno registered
inet_init調用udp_init,udp_init調用udp_table_init,udp_table_init調用alloc_large_system_hash,輸出下面信息:
[ 0.221878] UDP hash table entries: 512 (order: 2, 16384 bytes)
inet_init接着調用udplite4_register,udplite4_register調用udp_table_init(&udplite_table,"UDP-LITE"),
udp_table_init調用alloc_large_system_hash,輸出下面信息:
[ 0.221886] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
net/unix/af_unix.c中有下面代碼:
fs_initcall(af_unix_init);
此時調用af_unix_init,af_unit_init調用sock_register(&unix_family_ops),unix_family_ops.family=PF_UNIX,
PF_UNIX=AF_UNIX,而AF_UNIX定義位於include/linux/socket.h,以下所示:
#define AF_UNIX 1 /* Unix domain sockets */
因此輸出下面信息:
[ 0.221963] NET: Registered protocol family 1
drivers/pci/quirks.c中有下面代碼:
fs_initcall_sync(pci_apply_final_quirks);
此時執行pci_apply_final_quirks,pci_apply_final_quirks對於每一個pci設備調用pci_fixup_dev(pci_fixup_final,dev).
至關於執行pci_do_fixups(dev, __start_pci_fixups_final,__end_pci_fixups_final).
該函數會調用__start_pci_fixups_final和__end_pci_fixups_final之間的全部函數。
arch/x86/kernel/vmlinux.lds中有下面的定義:
__start_pci_fixups_final = .; *(.pci_fixup_final) __end_pci_fixups_final = .;
因此會調用.pci_fixup_final段中的全部函數。
pci_fixup_video有下面的聲明(arch/x86/pci/fixup.c):
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video);
DECLARE_PCI_FIXUP_FINAL定義以下(include/linux/pci.h):
#define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ 1465 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ 1466 vendor##device##hook, vendor, device, hook)
該聲明會將pci_fixup_video函數放入到.pci_fixup_final段中。
因此此時會執行pci_fixup_video,輸出下面信息:
[ 0.221980] pci 0000:00:02.0: Boot video device
pci_apply_final_quirks中繼續輸出下面信息:
[ 0.222136] PCI: CLS 32 bytes, default 64
init/initramfs.c中有下面代碼:
rootfs_initcall(populate_rootfs);
此時執行populate_rootfs,輸出下面信息:
[ 0.222187] Unpacking initramfs...
populate_rootfs中調用free_initrd,free_initrd調用free_initrd_mem,free_initrd_mem調用free_init_pages, 輸出下面信息:
[ 2.772396] Freeing initrd memory: 116776k freed
kernel/audit.c中有下面代碼:
__initcall(audit_init);
include/linux/init.h中定義以下:
#define __initcall(fn) device_initcall(fn)
此時執行audit_init,輸出下面信息:
[ 2.837035] audit: initializing netlink socket (disabled)
audit_init中調用audit_log,輸出下面信息:
[ 2.837049] type=2000 audit(1403510217.832:1): initialized
mm/bounce.c中有下面代碼:
__initcall(init_emergency_pool);
此時執行init_emergency_pool函數,輸出下面信息:
[ 2.853523] highmem bounce pool size: 64 pages
mm/hugetlb.c中有下面定義:
module_init(hugetlb_init);
include/linux/init.h中有下面定義:
#define module_init(x) __initcall(x);
此時執行hugetlb_init,hugetlb_init調用report_hugepages,輸出下面信息:
[ 2.853528] HugeTLB registered 2 MB page size, pre-allocated 0 pages
fs/quota/dquot.c中有下面代碼:
module_init(dquot_init);
此時調用dquot_init,輸出下面信息:
[ 2.853968] VFS: Disk quotas dquot_6.5.2
[ 2.854000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
ipc/util.c中有下面代碼:
__initcall(ipc_init);
此時執行ipc_init.ipc_init調用msg_init,輸出下面信息:
[ 2.854069] msgmni has been set to 1734
下面輸出信息是從cryptomgr_notifiy中調用的(不知道是從哪一個函數調用過來的):
[ 2.854228] alg: No test for stdrng (krng)
block/bsg.c中有下面代碼:
device_initcall(bsg_init);
此時調用bsg_init,輸出下面信息:
[ 2.854253] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
block/noop-iosched.c中有下面代碼:
module_init(noop_init);
此時執行noop_init,noop_init調用elv_register,輸出下面信息:
[ 2.854256] io scheduler noop registered
block/deadline-iosched.c中有下面代碼:
module_init(deadline_init);
此時執行deadline_init,deadline_init調用elv_register,輸出下面信息:
[ 2.854258] io scheduler deadline registered
block/cfq-iosched.c中有下面代碼:
module_init(cfq_init);
此時調用cfq_init,cfq_init調用elv_register,輸出下面信息:
[ 2.854269] io scheduler cfq registered (default)
drivers/pci/pcie/portdrv_pci.c中有下面代碼:
module_init(pcie_portdrv_init);
此時執行pcie_portdrv_init,pcie_portdrv_init調用pcie_register_driver,.以後會執行pcie_portdriver的probe函數,即pcie_portdrv_probe.
pcie_portdrv_probe調用pcie_port_device_register,pcie_port_device_register調用pci_set_master,pci_set_master調用pcibios_set_master,
輸出下面信息:
[ 2.854355] pcieport 0000:00:1c.0: setting latency timer to 64
下面信息是由setup_msi_irq輸出的(但不知道是從哪一個函數調用過去的):
[ 2.854395] pcieport 0000:00:1c.0: irq 40 for MSI/MSI-X
相似地,輸出下面信息:
[ 2.854451] pcieport 0000:00:1c.1: setting latency timer to 64 [ 2.854484] pcieport 0000:00:1c.1: irq 41 for MSI/MSI-X [ 2.854541] pcieport 0000:00:1c.2: setting latency timer to 64 [ 2.854573] pcieport 0000:00:1c.2: irq 42 for MSI/MSI-X [ 2.854628] pcieport 0000:00:1c.3: setting latency timer to 64 [ 2.854661] pcieport 0000:00:1c.3: irq 43 for MSI/MSI-X
drivers/pci/hotplug/pci_hotplug_core.c中有下面代碼:
module_init(pci_hotplug_init);
此時執行pci_hotplug_init,輸出下面信息:
[ 2.854741] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
drivers/pci/hotplug/pciehp_core.c中有下面代碼:
module_init(pcied_init);
此時執行pcied_init, 輸出下面信息:
[ 2.854761] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
drivers/pci/hotplug/acpiphp_core.c中有下面代碼:
module_init(acpiphp_init);
此時執行acpiphp_init,輸出下面信息:
[ 2.854763] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
drivers/idle/intel_idle.c中有下面代碼:
module_init(intel_idle_init);
此時執行intel_idle_init,intel_idle_init調用intel_idle_probe,輸出下面信息:
[ 2.855076] intel_idle: does not run on family 6 model 23
drivers/acpi/apei/erst.c中有下面代碼:
device_initcall(erst_init);
此時執行erst_init,輸出下面信息:
[ 2.855100] ERST: Table is not found!
drivers/acpi/apei/ghes.c中有下面代碼:
module_init(ghes_init);
此時執行ghes_init,輸出下面信息:
[ 2.855101] GHES: HEST is not enabled!
drivers/pnp/isapnp/core.c中有下面代碼:
device_initcall(isapnp_init);
此時執行isapnp_init,輸出下面信息:
[ 2.855114] isapnp: Scanning for PnP cards... [ 3.208006] isapnp: No Plug & Play device found
drivers/tty/serial/8250.c有下面代碼:
module_init(serial8250_init);
此時執行serial8250_init,輸出下面信息:
[ 3.208065] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250_init調用serial8250_register_ports,serial8250_register_ports對於每一個串口調用uart_add_one_port,
uart_add_one_port調用uart_configure_port,uart_configure_port調用uart_report_port,因屢次調用,輸出下面信息:
[ 3.228404] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 3.248775] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
以後執行serial8250_probe,對於每一個端口serial8250_register_port調用uart_add_one_port,uart_add_one_port調用uart_configure_port,
uart_configure_port調用uart_report_port,由於屢次調用輸出下面信息:
[ 3.272684] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 3.293099] 00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
drivers/char/agp/backend.c中有下面代碼:
module_init(agp_init);
此時執行agp_init,輸出下面信息:
[ 3.293354] Linux agpgart interface v0.103
drivers/char/agp/intel-agp.c中有下面代碼:
module_init(agp_intel_init);
此時執行agp_intel_init函數,調用pci_register_driver,通過很長一段調用後會調用agp_intel_pci_driver.probe,即agp_intel_probe.
agp_intel_probe調用agp_gmch_probe,輸出下面信息:
[ 3.293461] agpgart-intel 0000:00:00.0: Intel G33 Chipset
agp_gmch_probe調用intel_gtt_init,輸出下面信息:
[ 3.293522] agpgart-intel 0000:00:00.0: detected gtt size: 524288K total, 262144K mappable
intel_gtt_init調用intel_gtt_stolen_size,輸出下面信息:
[ 3.294055] agpgart-intel 0000:00:00.0: detected 8192K stolen memory
agp_intel_probe調用agp_add_bridge,輸出下面信息:
[ 3.294182] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000
driver/input/serio/i8042.c中有下面代碼:
module_init(i8042_init);
此時調用i8042_init,i8042_init調用i8042_platform_init,i8042_platform_init調用i8042_pnp_init, 輸出下面信息:
[ 3.294348] i8042: PNP: No PS/2 controller found. Probing ports directly.
以後執行platform_create_bundle,platform_create_bundle調用platform_driver_probe,以後調用i8042_probe,
i8042_probe調用i8042_register_ports,i8042_register_ports對每一個串口輸出信息,獲得下面內容:
[ 3.294708] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 3.294714] serio: i8042 AUX port at 0x60,0x64 irq 12
drivers/input/mousedev.c中有下面代碼:
module_init(mousedev_init);
此時執行mousedev_init,輸出下面信息:
[ 3.294847] mousedev: PS/2 mouse device common for all mice
drivers/rtc/rtc-cmos.c中有下面代碼:
module_init(cmos_init);
此時執行cmos_init, cmos_init調用pnp_register_driver或者platform_driver_probe,
以後會調用cmos_pnp_probe或者cmos_platform_probe,而後調用cmos_wake_setup,
cmos_wake_setup輸出下面信息:
[ 3.294893] rtc_cmos 00:04: RTC can wake from S4
cmos_do_probe調用rtc_device_register,輸出下面信息:
[ 3.294995] rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0
cmos_do_probe繼續輸出下面信息:
[ 3.295017] rtc0: alarms up to one month, 242 bytes nvram, hpet irqs
drivers/cpuidle/governors/ladder.c中有下面代碼:
module_init(init_ladder);
此時調用init_ladder, init_ladder調用cpuidle_register_governor(&ladder_governor),ladder_governor.name="ladder".
cpuidle_register_governor調用cpuidle_switch_governor,輸出下面信息:
[ 3.295029] cpuidle: using governor ladder
drivers/cpuidle/governors/menu.c中有下面代碼:
module_init(init_menu);
跟上一行輸出相似,會產生下面的輸出:
[ 3.295031] cpuidle: using governor menu
net/ipv4/tcp_cubic.c中有下面代碼:
module_init(cubictcp_register);
此時執行 cubictcp_register, cubictcp_register調用tcp_register_congestion_control(&cutictcp),輸出下面信息:
[ 3.295221] TCP cubic registered
net/ipv6/af_inet6.c中有下面代碼:
module_init(inet6_init);
此時執行inet6_init,inet6_init調用sock_register(&inet6_family_ops),輸出下面信息:
[ 3.295256] NET: Registered protocol family 10
net/ipv6/mip6.c中有下面代碼:
module_init(mip6_init);
此時執行mip6_init,輸出下面信息:
[ 3.295692] Mobile IPv6
net/packet/af_packet.c中有下面代碼:
module_init(packet_init);
此時執行packet_init,packet_init調用sock_register,輸出下面信息:
[ 3.295695] NET: Registered protocol family 17
注意:17=AF_PACKET 用於raw packet socket.
net/dns_resolver/dns_key.c中有下面代碼:
module_init(init_dns_resolver)
此時調用init_dns_resolver,輸出下面信息:
[ 3.295699] Registering the dns_resolver key type
arch/x86/kernel/apci/probe_32.c中有下面代碼:
late_initcall(print_ipi_mode);
此時執行print_ipi_mode函數,輸出下面信息:
[ 3.295718] Using IPI No-Shortcut mode
kernel/power/hibernate.c中有下面代碼:
late_initcall(software_resume);
此時執行software_resume,輸出下面信息:
[ 3.295829] PM: Hibernation image not present or could not be loaded.
kernel/taskstats.c中有下面代碼:
late_initcall(taskstats_init);
此時執行taskstats_init,輸出下面信息:
[ 3.295839] registered taskstats version 1
drivers/rtc/hctosys.c中有下面代碼:
late_initcall(rtc_hctosys);
此時執行rtc_hctosys函數,輸出下面信息:
[ 3.296264] rtc_cmos 00:04: setting system clock to 2014-06-23 07:56:58 UTC (1403510218)
net/core/drop_monitor.c中有下面代碼:
late_initcall(init_net_drop_monitor);
此時執行init_net_drop_monitor,輸出下面信息:
[ 3.296298] Initializing network drop monitor service
回到kernel_init函數,調用init_post,init_post調用free_initmem,free_initmem調用free_init_pages, 輸出下面信息:
[ 3.296382] Freeing unused kernel memory: 428k freed
init_post調用mark_rodata_ro,輸出下面信息:
[ 3.296529] Write protecting the kernel text: 2884k [ 3.296559] Write protecting the kernel read-only data: 1104k
mark_rodata_ro調用mark_nxdata_nx,輸出下面信息:
[ 3.296560] NX-protecting the kernel data: 3260k
init_post新開啓一個進程執行/sbin/init。