* [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
* Re: [i.MX8 PCIe] PCIe link fails after kexec
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
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2025-09-23 23:00 UTC (permalink / raw)
To: He, Guocai (CN)
Cc: Richard Zhu, Lucas Stach, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Shawn Guo,
Sascha Hauer, Philipp Zabel, kernel@pengutronix.de,
linux-imx@nxp.com, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Wang, Xiaolei
On Tue, Sep 23, 2025 at 03:35:56AM +0000, He, Guocai (CN) wrote:
> 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.
Can you boot a recent kernel, e.g., v6.16 or v6.17-rc7, to make sure
you're not seeing an already-fixed problem?
If you can't try a recent kernel, please include your devicetree and
the complete dmesg log including both the initial boot and the kexec.
> ## 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
* RE: [i.MX8 PCIe] PCIe link fails after kexec
2025-09-23 23:00 ` Bjorn Helgaas
@ 2025-09-25 6:19 ` Hongxing Zhu
2025-09-25 6:31 ` He, Guocai (CN)
0 siblings, 1 reply; 4+ messages in thread
From: Hongxing Zhu @ 2025-09-25 6:19 UTC (permalink / raw)
To: Bjorn Helgaas, He, Guocai (CN)
Cc: Lucas Stach, Lorenzo Pieralisi, Krzysztof Wilczyński,
Rob Herring, Bjorn Helgaas, Shawn Guo, Sascha Hauer,
Philipp Zabel, kernel@pengutronix.de, dl-linux-imx,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
xiaolei.wang
Hi Guocai:
I tried the L6.17-rc1 on i.MX8QM MEK board.
No such kind of problem.
Here are the logs:
root@imx8qmmek:~# kexec /run/media/boot-mmcblk1p1/Image --dtb=/run/media/boot-mmcblk1p1/imx8qm-mek.dtb --command-line="console=ttyLP0,115200 earlycon no_console_suspend root=/dev/mmcblk1p2 rootwait rw"
root@imx8qmmek:~# Stopping Session c6 of User root...
[ OK ] Removed slice Slice /system/modprobe.
[ OK ] Stopped target Graphical Interface.
[ OK ] Stopped target Multi-User System.
...
[ 28.693426] kexec_core: Starting new kernel
[ 28.744358] psci: CPU1 killed (polled 0 ms)
[ 28.776362] psci: CPU2 killed (polled 0 ms)
[ 28.791996] psci: CPU3 killed (polled 0 ms)
[ 28.797151] Bye!
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
...
[ 2.432495] clk: Disabling unused clocks
[ 2.443360] check access for rdinit=/init failed: -2, ignoring
[ 2.629319] imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
[ 2.637134] imx6q-pcie 5f000000.pcie: Invalid eDMA IRQs found
[ 2.746542] mmc1: new high speed SDHC card at address aaaa
[ 2.753040] mmcblk1: mmc1:aaaa SA16G 14.8 GiB
[ 2.761508] mmcblk1: p1 p2
[ 2.840973] imx6q-pcie 5f000000.pcie: PCIe Gen.3 x1 link up
[ 2.847724] imx6q-pcie 5f000000.pcie: PCI host bridge to bus 0000:00
[ 2.854136] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.859659] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
...
imx8qmmek login: root
root@imx8qmmek:~#
root@imx8qmmek:~#
root@imx8qmmek:~# uname -a
Linux imx8qmmek 6.17.0-rc1 #3 SMP PREEMPT Thu Sep 25 14:14:51 CST 2025 aarch64 GNU/Linux
root@imx8qmmek:~# lspci
00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
01:00.0 Non-Volatile memory controller: Shenzhen Unionmemory Information System Ltd. AM610 PCIe 3.0 x2 NVMe SSD 128GB, 256GB (rev 01)
Best Regards
Richard Zhu
> -----Original Message-----
> From: Bjorn Helgaas <helgaas@kernel.org>
> Sent: 2025年9月24日 7:00
> To: He, Guocai (CN) <Guocai.He.CN@windriver.com>
> Cc: Hongxing Zhu <hongxing.zhu@nxp.com>; Lucas Stach
> <l.stach@pengutronix.de>; Lorenzo Pieralisi <lpieralisi@kernel.org>; Krzysztof
> Wilczyński <kw@linux.com>; Rob Herring <robh@kernel.org>; Bjorn Helgaas
> <bhelgaas@google.com>; Shawn Guo <shawnguo@kernel.org>; Sascha Hauer
> <s.hauer@pengutronix.de>; Philipp Zabel <p.zabel@pengutronix.de>;
> kernel@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>;
> linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; xiaolei.wang
> <xiaolei.wang@windriver.com>
> Subject: Re: [i.MX8 PCIe] PCIe link fails after kexec
>
> On Tue, Sep 23, 2025 at 03:35:56AM +0000, He, Guocai (CN) wrote:
> > 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.
>
> Can you boot a recent kernel, e.g., v6.16 or v6.17-rc7, to make sure you're not
> seeing an already-fixed problem?
>
> If you can't try a recent kernel, please include your devicetree and the
> complete dmesg log including both the initial boot and the kexec.
>
> > ## 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
* Re: [i.MX8 PCIe] PCIe link fails after kexec
2025-09-25 6:19 ` Hongxing Zhu
@ 2025-09-25 6:31 ` He, Guocai (CN)
0 siblings, 0 replies; 4+ messages in thread
From: He, Guocai (CN) @ 2025-09-25 6:31 UTC (permalink / raw)
To: Hongxing Zhu, Bjorn Helgaas
Cc: Lucas Stach, Lorenzo Pieralisi,
Krzysztof Wilczy��ski, Rob Herring, Bjorn Helgaas,
Shawn Guo, Sascha Hauer, Philipp Zabel, kernel@pengutronix.de,
dl-linux-imx, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Wang, Xiaolei,
Bi, Peng (CN)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 8024 bytes --]
Richard and Bjorn:
Thank you very much for your response and enthusiastic help.
The issue is still exist on 6.16, but In 6.17, from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0bd0a41a5120f78685a132834865b0a631b9026a
the issue is disappeared. I have tried to use git bisect to find the commit and find a commit of "d31eb2174255 PCI: imx6: Remove apps_reset toggling from imx_pcie_{assert/deassert}_core_reset¡°.
In fact, I applied the patch which created from d31eb2174255 to somewhere of 6.17, it works. But applied to 6.16, it not works, let alone 6.6.
So I suspect the commit that fixed this issue was a combination of multiple commits.
I will compare the differences and try to identify where the issue lies.
Guocai
________________________________________
From: Hongxing Zhu <hongxing.zhu@nxp.com>
Sent: Thursday, September 25, 2025 2:19 PM
To: Bjorn Helgaas; He, Guocai (CN)
Cc: Lucas Stach; Lorenzo Pieralisi; Krzysztof Wilczy¨½ski; Rob Herring; Bjorn Helgaas; Shawn Guo; Sascha Hauer; Philipp Zabel; kernel@pengutronix.de; dl-linux-imx; linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Wang, Xiaolei
Subject: RE: [i.MX8 PCIe] PCIe link fails after kexec
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Guocai:
I tried the L6.17-rc1 on i.MX8QM MEK board.
No such kind of problem.
Here are the logs:
root@imx8qmmek:~# kexec /run/media/boot-mmcblk1p1/Image --dtb=/run/media/boot-mmcblk1p1/imx8qm-mek.dtb --command-line="console=ttyLP0,115200 earlycon no_console_suspend root=/dev/mmcblk1p2 rootwait rw"
root@imx8qmmek:~# Stopping Session c6 of User root...
[ OK ] Removed slice Slice /system/modprobe.
[ OK ] Stopped target Graphical Interface.
[ OK ] Stopped target Multi-User System.
...
[ 28.693426] kexec_core: Starting new kernel
[ 28.744358] psci: CPU1 killed (polled 0 ms)
[ 28.776362] psci: CPU2 killed (polled 0 ms)
[ 28.791996] psci: CPU3 killed (polled 0 ms)
[ 28.797151] Bye!
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
...
[ 2.432495] clk: Disabling unused clocks
[ 2.443360] check access for rdinit=/init failed: -2, ignoring
[ 2.629319] imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
[ 2.637134] imx6q-pcie 5f000000.pcie: Invalid eDMA IRQs found
[ 2.746542] mmc1: new high speed SDHC card at address aaaa
[ 2.753040] mmcblk1: mmc1:aaaa SA16G 14.8 GiB
[ 2.761508] mmcblk1: p1 p2
[ 2.840973] imx6q-pcie 5f000000.pcie: PCIe Gen.3 x1 link up
[ 2.847724] imx6q-pcie 5f000000.pcie: PCI host bridge to bus 0000:00
[ 2.854136] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.859659] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
...
imx8qmmek login: root
root@imx8qmmek:~#
root@imx8qmmek:~#
root@imx8qmmek:~# uname -a
Linux imx8qmmek 6.17.0-rc1 #3 SMP PREEMPT Thu Sep 25 14:14:51 CST 2025 aarch64 GNU/Linux
root@imx8qmmek:~# lspci
00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
01:00.0 Non-Volatile memory controller: Shenzhen Unionmemory Information System Ltd. AM610 PCIe 3.0 x2 NVMe SSD 128GB, 256GB (rev 01)
Best Regards
Richard Zhu
> -----Original Message-----
> From: Bjorn Helgaas <helgaas@kernel.org>
> Sent: 2025Äê9ÔÂ24ÈÕ 7:00
> To: He, Guocai (CN) <Guocai.He.CN@windriver.com>
> Cc: Hongxing Zhu <hongxing.zhu@nxp.com>; Lucas Stach
> <l.stach@pengutronix.de>; Lorenzo Pieralisi <lpieralisi@kernel.org>; Krzysztof
> Wilczy¨½ski <kw@linux.com>; Rob Herring <robh@kernel.org>; Bjorn Helgaas
> <bhelgaas@google.com>; Shawn Guo <shawnguo@kernel.org>; Sascha Hauer
> <s.hauer@pengutronix.de>; Philipp Zabel <p.zabel@pengutronix.de>;
> kernel@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>;
> linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; xiaolei.wang
> <xiaolei.wang@windriver.com>
> Subject: Re: [i.MX8 PCIe] PCIe link fails after kexec
>
> On Tue, Sep 23, 2025 at 03:35:56AM +0000, He, Guocai (CN) wrote:
> > 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.
>
> Can you boot a recent kernel, e.g., v6.16 or v6.17-rc7, to make sure you're not
> seeing an already-fixed problem?
>
> If you can't try a recent kernel, please include your devicetree and the
> complete dmesg log including both the initial boot and the kexec.
>
> > ## 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