2.6.32 커널을 사용하여 성공적으로 부팅할 수 있는 IBM x3850 유형 8864 시스템이 있지만 3.10 커널 이상을 사용하려고 하면 커널이 모든 PCI 슬롯을 초기화하는 데 실패합니다. (수동으로 이 문제를 해결할 수 있습니다. 아래를 참조하세요. ):
pci 0000:19:00.0: BAR 14: can't assign mem (size 0x1a00000)
pci 0000:19:00.0: BAR 13: can't assign io (size 0x3000)
pci 0000:19:00.0: BAR 14: can't assign mem (size 0x1600000)
pci 0000:19:00.0: BAR 13: can't assign io (size 0x3000)
pci 0000:1a:00.0: BAR 14: can't assign mem (size 0x1600000)
pci 0000:1a:00.0: BAR 13: assigned [io 0x7000-0x8fff]
pci 0000:1b:02.0: BAR 14: can't assign mem (size 0xa00000)
pci 0000:1b:04.0: BAR 14: can't assign mem (size 0xa00000)
pci 0000:1b:02.0: BAR 13: assigned [io 0x7000-0x7fff]
pci 0000:1b:04.0: BAR 13: assigned [io 0x8000-0x8fff]
...
이로 인해 PCI 버스가 올바르게 인스턴스화되지 않았기 때문에 네트워크 카드가 성공적으로 로드되지 않았습니다.
lspci
다음과 같은 결과가 생성됩니다.
00:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV100 [Radeon 7000 / Radeon VE]
00:03.0 USB controller: NEC Corporation OHCI USB Controller (rev 43)
00:03.1 USB controller: NEC Corporation OHCI USB Controller (rev 43)
00:03.2 USB controller: NEC Corporation uPD72010x USB 2.0 Controller (rev 04)
00:0f.0 Host bridge: Broadcom CSB6 South Bridge (rev a0)
00:0f.1 IDE interface: Broadcom CSB6 RAID/IDE Controller (rev a0)
00:0f.3 ISA bridge: Broadcom GCLE-2 Host Bridge
01:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
01:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
01:01.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
01:02.0 RAID bus controller: Adaptec AAC-RAID (rev 02)
02:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
06:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
0a:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
0f:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
14:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
19:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
1a:00.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI Express Switch (rev 0c)
1b:02.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI Express Switch (rev 0c)
1b:04.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI Express Switch (rev 0c)
1c:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
1c:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
1d:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
1d:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
고정시키다
19:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
echo 1 > /sys/bus/pci/devices/0000\:19\:00.0/remove
실제로 루트 PCI 버스를 제거한 후 다시 검색하여 문제를 해결할 수 있었습니다 . echo 1 > /sys/bus/pci/rescan
결과는 다음과 같습니다.
pci _bus 0000:1c: busn_res: [bus 1c] is released
pci _bus 0000:1d: busn_res: [bus 1d] is released
pci _bus 0000:1b: busn_res: [bus 1b-1d] is released
pci _bus 0000:1a: busn_res: [bus 1a-1d] is released
pci 0000:19:00.0: [1014:0308] type 01 class 0x060401
pci 0000:19:00.0: supports D1 D2
pci 0000:19:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:1a:00.0: [111d:8018] type 01 class 0x060400
pci 0000:1a:00.0: PME# supported from D0 D3hot D3cold
pci 0000:19:00.0: pci bridge to [bus 1a-1d] (subtractive decode)
pci 0000:19:00.0: bridge window [mem 0xea800000-0xea9fffff 64bit pref]
pci 0000:19:00.0: bridge window [mem 0xea800000-0xebcfffff] (subtractive decode)
pci 0000:19:00.0: bridge window [io 0x7000-0x8fff] (subtractive decode)
pci 0000:1b:02.0: [111d:8018] type 01 class 0x060400
pci 0000:1b:02.0: PME# supported from D0 D3hot D3cold
pci 0000:1b:04.0: [111d:8018] type 01 class 0x060400
pci 0000:1b:04.0: PME# supported from D0 D3hot D3cold
pci 0000:1a:00.0: pci bridge to [bus 1b-1d]
pci 0000:1a:00.0: bridge window [io 0x7000-0x8fff]
pci 0000:1a:00.0: bridge window [mem 0xea800000-0xea9fffff 64bit pref]
....
pci 0000:1b:04.0: bridge window [mem 0xea900000-0xea9fffff 64bit pref]
pci 0000:1b:02.0: bridge window [mem 0x00100000-0x001fffff 64bit pref] to [bus 1c] add_size 100000
pci 0000:1b:04.0: bridge window [mem 0x00100000-0x001fffff 64bit pref] to [bus 1d] add_size 100000
pci 0000:1b:02.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci 0000:1b:04.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci 0000:1a:00.0: bridge window [mem 0x00100000-0x002fffff 64bit pref] to [bus 1b-1d] add_size 200000
pci 0000:19:00.0: bridge window [io 0x1000-0x2fff] to [bus 1a-1d] add_size 1000
pci 0000:1a:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:19:00.0: bridge window [mem 0x00100000-0x002fffff 64bit pref] to [bus 1a-1d] add_size 200000
pci 0000:19:00.0: bridge window [mem 0x00200000-0x015fffff] to [bus 1a-1d] add_size 200000
pci 0000:19:00.0: res[14]=[mem 0x00200000-0x015fffff] get_res_add_size add_size 200000
pci 0000:19:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:19:00.0: res[13]=[io 0x1000-0x2fff] get_res_add_size add_size 1000
pci 0000:19:00.0: BAR 14: can't assign mem (size 0x1600000)
pci 0000:19:00.0: BAR 15: assigned [mem 0xea800000-0xeabfffff 64bit pref]
pci 0000:19:00.0: BAR 13: can't assign io (size 0x3000)
pci 0000:19:00.0: BAR 14: assigned [mem 0xea800000-0xebbfffff]
pci 0000:19:00.0: BAR 15: can't assign mem pref (size 0x200000)
pci 0000:19:00.0: BAR 13: assigned [io 0x7000-0x8fff]
pci 0000:19:00.0: BAR 14: can't assign mem (size 0x1400000)
pci 0000:19:00.0: failed to add 200000 res[14]=[mem 0xea800000-0xebbfffff]
pci 0000:19:00.0: BAR 13: can't assign io (size 0x2000)
pci 0000:19:00.0: failed to add 1000 res[13]=[io 0x7000-0x8fff]
pci 0000:1a:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:1a:00.0: BAR 14: assigned [mem 0xea800000-0xebbfffff]
pci 0000:1a:00.0: BAR 15: can't assign mem pref (size 0x400000)
pci 0000:1a:00.0: BAR 13: assigned [io 0x7000-0x8fff]
pci 0000:1a:00.0: BAR 14: assigned [mem 0xea800000-0xebbfffff]
pci 0000:1a:00.0: BAR 15: can't assign mem pref (size 0x200000)
pci 0000:1b:02.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci 0000:1b:04.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci 0000:1b:02.0: BAR 14: assigned [mem 0xea800000-0xeb1fffff]
pci 0000:1b:04.0: BAR 14: assigned [mem 0xeb200000-0xebbfffff]
pci 0000:1b:02.0: BAR 15: can't assign mem pref (size 0x200000)
pci 0000:1b:04.0: BAR 15: can't assign mem pref (size 0x200000)
pci 0000:1b:02.0: BAR 13: assigned [io 0x7000-0x7fff]
pci 0000:1b:04.0: BAR 13: assigned [io 0x8000-0x8fff]
pci 0000:1b:02.0: BAR 14: assigned [mem 0xea800000-0xeb1fffff]
pci 0000:1b:04.0: BAR 14: assigned [mem 0xeb200000-0xebbfffff]
pci 0000:1b:02.0: BAR 15: can't assign mem pref (size 0x100000)
pci 0000:1b:04.0: BAR 15: can't assign mem pref (size 0x100000)
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci 0000:1c:00.1: reg 184: [mem 0xea840000-0xea843fff 64bit pref]
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci 0000:1c:00.1: reg 190: [mem 0xea860000-0xea863fff 64bit pref]
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci 0000:1c:00.1: reg 184: [mem 0xea840000-0xea843fff 64bit pref]
pci 0000:1c:00.0: res[7]=[mem 0xea800000-0xea7fffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1c:00.0: res[10]=[mem 0xea820000-0xea81ffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1c:00.1: res[7]=[mem 0xea840000-0xea83ffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1c:00.1: res[10]=[mem 0xea860000-0xea85ffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1c:00.0: BAR 1: assigned [mem 0xea800000-0xeabfffff]
pci 0000:1c:00.1: BAR 1: assigned [mem 0xeac00000-0xeaffffff]
pci 0000:1c:00.0: BAR 0: assigned [mem 0xeb000000-0xeb01ffff]
pci 0000:1c:00.1: BAR 0: assigned [mem 0xeb020000-0xeb03ffff]
pci 0000:1c:00.0: BAR 3: assigned [mem 0xeb040000-0xeb043fff]
pci 0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci 0000:1c:00.0: BAR 7: assigned [mem 0xeb044000-0xeb063fff 64bit pref]
pci 0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci 0000:1c:00.0: BAR 10: assigned [mem 0xeb064000-0xeb083fff 64bit pref]
pci 0000:1c:00.1: BAR 3: assigned [mem 0xeb084000-0xeb087fff]
pci 0000:1c:00.1: reg 184: [mem 0xea840000-0xea843fff 64bit pref]
pci 0000:1c:00.1: BAR 7: assigned [mem 0xeb088000-0xeb0a7fff 64bit pref]
pci 0000:1c:00.1: reg 190: [mem 0xea860000-0xea863fff 64bit pref]
pci 0000:1c:00.1: BAR 10: assigned [mem 0xeb0a8000-0xeb0c7fff 64bit pref]
pci 0000:1c:00.0: BAR 2: assigned [io 0x7000-0x701f]
pci 0000:1c:00.1: BAR 2: assigned [io 0x7020-0x703f]
pci 0000:1b:02.0: pci bridge to [bus 1c]
pci 0000:1b:02.0: bridge window [io 0x7000-0x7fff]
pci 0000:1b:02.0: bridge window [mem 0xea800000-0xeb1fffff]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci 0000:1d:00.1: reg 184: [mem 0xea940000-0xea943fff 64bit pref]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci 0000:1d:00.1: reg 190: [mem 0xea960000-0xea963fff 64bit pref]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci 0000:1d:00.1: reg 184: [mem 0xea940000-0xea943fff 64bit pref]
pci 0000:1d:00.0: res[7]=[mem 0xea900000-0xea8fffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1d:00.0: res[10]=[mem 0xea920000-0xea91ffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1d:00.1: res[7]=[mem 0xea940000-0xea93ffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1d:00.1: res[10]=[mem 0xea960000-0xea95ffff 64bit pref] get_res_add_size add_size 20000
pci 0000:1d:00.0: BAR 1: assigned [mem 0xeb400000-0xeb7fffff]
pci 0000:1d:00.1: BAR 1: assigned [mem 0xeb800000-0xebbfffff]
pci 0000:1d:00.0: BAR 0: assigned [mem 0xeb200000-0xeb21ffff]
pci 0000:1d:00.1: BAR 0: assigned [mem 0xeb220000-0xeb23ffff]
pci 0000:1d:00.0: BAR 3: assigned [mem 0xeb240000-0xeb243fff]
pci 0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci 0000:1d:00.0: BAR 7: assigned [mem 0xeb244000-0xeb263fff 64bit pref]
pci 0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci 0000:1d:00.0: BAR 10: assigned [mem 0xeb264000-0xeb283fff 64bit pref]
pci 0000:1d:00.1: BAR 3: assigned [mem 0xeb284000-0xeb287fff]
pci 0000:1d:00.1: reg 184: [mem 0xea940000-0xea943fff 64bit pref]
pci 0000:1d:00.1: BAR 7: assigned [mem 0xeb288000-0xeb2a7fff 64bit pref]
pci 0000:1d:00.1: reg 190: [mem 0xea960000-0xea963fff 64bit pref]
pci 0000:1d:00.1: BAR 10: assigned [mem 0xeb2a8000-0xeb2c7fff 64bit pref]
pci 0000:1d:00.0: BAR 2: assigned [io 0x8000-0x801f]
pci 0000:1d:00.1: BAR 2: assigned [io 0x8020-0x803f]
pci 0000:1b:04.0: pci bridge to [bus 1d]
pci 0000:1b:04.0: bridge window [io 0x8000-0x8fff]
pci 0000:1b:04.0: bridge window [mem 0xeb200000-0xebbfffff]
pci 0000:1a:00.0: pci bridge to [bus 1b-1d]
pci 0000:1a:00.0: bridge window [io 0x7000-0x8fff]
pci 0000:1a:00.0: bridge window [mem 0xea800000-0xebbfffff]
pci 0000:19:00.0: pci bridge to [bus 1a-1d]
pci 0000:19:00.0: bridge window [io 0x7000-0x8fff]
pci 0000:19:00.0: bridge window [mem 0xea800000-0xebbfffff]
질문
이 작업을 자동으로 수행하도록 커널에(예: 매개변수를 통해) 어떻게든 지시하는 것이 가능합니까? 애초에 이 문제의 원인은 무엇입니까?
미리 감사드립니다!
고쳐 쓰다
설명된 수정 사항이 4.x 시스템(실제로는 3.12부터 시작한다고 생각함)에서 실패했기 때문에 커널을 조사한 결과 PCI ASPM(ACPI에 의해 비활성화됨)이 비활성화된 경우(pcie_aspm =off에 의해 강제로 실행될 수도 있음을 발견했습니다) 커널의 부팅 매개변수에서)) 다음 작은 수정 사항(4.4.0의 경우)은 커널 널 포인터 역참조를 해결합니다.
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -552,11 +552,12 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
void pcie_aspm_init_link_state(struct pci_dev *pdev)
{
struct pcie_link_state *link;
- int blacklist = !!pcie_aspm_sanity_check(pdev);
-
+ int blacklist;
if (!aspm_support_enabled)
return;
+ blacklist = !!pcie_aspm_sanity_check(pdev);
+
if (pdev->link_state)
return;
조금 이상한 점은 기능 자체가 비활성화된 경우 온전성 검사가 수행되면 실제 널 포인터 역참조가 pcie_aspm_sanity_check
이 행 에서 발생한다는 것입니다 list_for_each_entry(child, &pdev->subordinate->devices, bus_list) {
. 이것은 커널 버그입니까?
답변1
이 작업을 자동으로 수행하도록 커널에(예: 매개변수를 통해) 어떻게든 지시하는 것이 가능합니까?
부팅을 시도할 때 pci=realloc
이 매개변수를 전달할 때까지 고대 마더보드에서 NVMe 드라이브를 핫플러그하는 것과 유사한 문제가 있었습니다.