lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB84596E1E47CDE57ADCE9B40F88BD2@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Wed, 16 Apr 2025 08:19:27 +0000
From: Peng Fan <peng.fan@....com>
To: Hiago De Franco <hiagofranco@...il.com>
CC: "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>, Ulf Hansson
	<ulf.hansson@...aro.org>, Shawn Guo <shawnguo@...nel.org>, Sascha Hauer
	<s.hauer@...gutronix.de>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "regressions@...ts.linux.dev"
	<regressions@...ts.linux.dev>, Hiago De Franco <hiago.franco@...adex.com>
Subject: RE: [REGRESSION] Kernel reboots unexpectdely on i.MX8X when Cortex-M4
 is running and it was started by U-Boot bootaux

> Subject: Re: [REGRESSION] Kernel reboots unexpectdely on i.MX8X
> when Cortex-M4 is running and it was started by U-Boot bootaux
> 
> On Tue, Apr 15, 2025 at 12:11:33AM +0000, Peng Fan wrote:
> > > Subject: Re: [REGRESSION] Kernel reboots unexpectdely on i.MX8X
> when
> > > Cortex-M4 is running and it was started by U-Boot bootaux
> > >
> > > Hi Peng,
> > >
> > > On Mon, Apr 14, 2025 at 06:09:49AM +0000, Peng Fan wrote:
> > > >
> > > > In your case, m4 is in same scu partition as a53, so m4 power
> > > > domain is manageable(owned) by Linux.
> > > >
> > > > However to m4 earlyboot(kicked by bootloader), if you not
> wanna
> > > linux
> > > > to handle m4, use scu_rm to create a separate partition in u-boot.
> > > > If you wanna linux to handle m4, but not wanna linux to
> shutdown
> > > the
> > > > pd in kernel boot, imx_rproc.c needs to be built in, and need to
> > > > add a clock entry or use clock optional api in imx_rproc.c .
> > > >
> > > > Current imx_rproc.c needs a clock entry to probe pass.
> > > >
> > > > I think in your case, this driver not probe pass, so the
> > > > M4 pd still get powered off.
> > >
> > > This was correct, indeed. I was not able to find exactly where the
> > > cortex-m4 clock is defined, so I added a clk_dummy to the imx8x-
> cm4
> > > remoteproc node and now it works, the code continues to run and I
> > > can control the m4 with Linux. Thanks!
> > >
> > > One thing that I noticed is I cannot make the RPMsg work with this
> > > devicetree node, even tought I assigned the correct memory-
> regions
> > > (vdev0buffer, vdev0ring0...). Also tested with the rpmsg-lite from
> > > the linux-imx. Is this supposed to work with RPMsg as well?
> >
> > To make rpmsg work, you need a m4 demo that could publish
> resource
> > table, such as i.MX tty echo or pingpong demo.
> >
> > There is downstream rpmsg driver under drivers/rpmsg/imx_*.c that
> > could be used to talk with m4.
> >
> > helloworld demo does not have any virtio devices, so no rpmsg.
> 
> Got it, I was able to make it work with the downstream pingpong
> driver and the MCUXpresso demo. I can launch the firmware using the
> remoteproc and exchange data between the two cores.
> 
> There is something I noticed, when I start the pingpong demo with U-
> Boot, it does not work. I run the pingpong modprobe on Linux but the
> name service is never annouced. It only works if I start with the
> remoteproc on Linux, not U-Boot. Is this because of Linux not being
> able to control the M4?

No. In you case, you could start using remoteproc, that means
Linux could control M4.

> 
> If I start the binary using U-Boot, the "state" always report as "offline"
> by the remoteproc driver.

In drivers/remoteproc/imx_rproc.c,  imx_rproc_detect_mode
case IMX_RPROC_SCU_API is used for detect mode of M4 for i.MX8Q/X
platform. Please give a look where it returns.

For U-Boot start m4, linux should remote state: "attached"

Regards,
Peng.

> 
> >
> > Regards,
> > Peng.
> >
> > >
> > > >
> > > >
> > > > Regards,
> > > > Peng.
> > > >
> > >
> > > Hiago
> 
> Thanks,
> Hiago.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ