public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [i.MX8 PCIe] PCIe link fails after kexec
@ 2025-09-23  3:35 He, Guocai (CN)
  2025-09-23 23:00 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: He, Guocai (CN) @ 2025-09-23  3:35 UTC (permalink / raw)
  To: Richard Zhu, Lucas Stach, Lorenzo Pieralisi,
	Krzysztof Wilczy��ski, Rob Herring, Bjorn Helgaas,
	Shawn Guo, Sascha Hauer, Philipp Zabel
  Cc: kernel@pengutronix.de, linux-imx@nxp.com,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Wang, Xiaolei

Hi all,

We are seeing a PCIe issue on i.MX8-based board when using kexec on Linux kernel 6.6,  
we would appreciate your help to clarify whether this is a known problem or if there is a recommended fix.

## Board & Setup
Linux version 6.6.103-yocto-standard (oe-user@oe-host) (aarch64-wrs-linux-gcc (GCC) 13.4.0, GNU ld (GNU Binutils) 2
.42.0.20240723) #1 SMP PREEMPT Wed Sep  3 20:13:35 UTC 2025

Machine model: Freescale i.MX8QM MEK
PCIe device: Intel Corporation Wireless 7260


##Boot flow:
#step 1: Initial boot: Linux kernel boot from tftp .
setenv ipaddr 128.224.165.120
setenv gatewayip 128.224.165.1
setenv netmask 255.255.255.0
setenv serverip 128.224.165.20

tftp 0x8a0000000 vlm-boards/29106/kernel
tftp 0x8d0000000 vlm-boards/29106/dtb
booti 0x8a0000000 - 0x8d0000000


#step 2: Switch to another kernel on disk using kexec
Reproduction steps
root@nxp-imx8:~# mkdir /mnt/sdisk
root@nxp-imx8:~# mount /dev/mmcblk0p1 /mnt/sdisk/
root@nxp-imx8:~# scp ghe-cn@128.224.153.151:/folk/ghe-cn/images/Image /mnt/sdisk/kernel     //the images is the same.

root@nxp-imx8:~# kexec -l /mnt/sdisk/kernel --append="console=ttyLP0,115200 video=HDMI-A-1:1920x1080-32@60 rw root=
/dev/nfs nfsroot=128.224.165.20:/export/pxeboot/vlm-boards/29105/rootfs,tcp,v3 ip=128.224.165.120:128.224.165.20:12
8.224.165.1:255.255.255.0::eth0:off selinux=0 enforcing=0"

root@nxp-imx8:~# kexec -e


#After the second kernel boots, the PCIe link does not come up.
#Key log differences

#####  boot (boot_cold.log):
imx6q-pcie 5f010000.pcie: host bridge /bus@5f000000/pcie@5f010000 ranges:
imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
imx6q-pcie 5f000000.pcie: host bridge /bus@5f000000/pcie@5f000000 ranges:
imx6q-pcie 5f000000.pcie:       IO 0x006ff80000..0x006ff8ffff -> 0x0000000000
imx6q-pcie 5f000000.pcie:      MEM 0x0060000000..0x006fefffff -> 0x0060000000
imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
imx6q-pcie 5f000000.pcie: eDMA: unroll F, 1 wr, 1 rd
imx6q-pcie 5f000000.pcie: PCIe Gen.1 x1 link up
imx6q-pcie 5f000000.pcie: PCIe Gen.1 x1 link up
imx6q-pcie 5f000000.pcie: Link up, Gen1
imx6q-pcie 5f000000.pcie: PCIe Gen.1 x1 link up
imx6q-pcie 5f000000.pcie: PCI host bridge to bus 0000:00

#→ Link up successfully

root@nxp-imx8:~# lspci
00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
root@nxp-imx8:~#


#####After kexec (boot_kexec.log):

imx6q-pcie 5f000000.pcie:       IO 0x006ff80000..0x006ff8ffff -> 0x0000000000
imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
imx6q-pcie 5f000000.pcie: eDMA: unroll F, 1 wr, 1 rd

imx6q-pcie 5f000000.pcie: Phy link never came up
imx6q-pcie 5f000000.pcie: Phy link never came up
imx6q-pcie 5f000000.pcie: PCI host bridge to bus 0000:00

#→ Link never comes up, no PCIe devices detected.

root@nxp-imx8:~# lspci
00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
root@nxp-imx8:~#


#Questions
Are there existing patches or recommended workarounds for this scenario?
Thanks for your time and any guidance you can provide.

Best regards,

Guocai

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-25  6:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23  3:35 [i.MX8 PCIe] PCIe link fails after kexec He, Guocai (CN)
2025-09-23 23:00 ` Bjorn Helgaas
2025-09-25  6:19   ` Hongxing Zhu
2025-09-25  6:31     ` He, Guocai (CN)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox