Hi Daniel, > Subject: Re: [PATCH V2 5/6] remoteproc: imx_rproc: set Cortex-M stack/pc > to TCML > > On Fri, Jan 27, 2023 at 11:33 AM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> > wrote: > > > > From: Peng Fan <peng.fan@xxxxxxx> > > > > The i.MX8M Cortex-M core not has ROM. It has a requirement is the > > stack, pc value should be set in address 0 and 4 from the view of > > itself. From Cortex-A core view, the region is at TCML start address. > > > > The stack and pc value are the first two words stored in section > > ".interrupts" of the firmware, and the section is the first section in > > the firmware. > > > > When the firmware is built to run in TCML, there is no issue, because > > when copying elf segments, the first two words are copied to TCML also. > > > > However when the firmware is built ro run in DDR, the first two words > > are not copied to TCML start address. > > > > This patch is to find the ".interrupts" section, read out the first > > two words and write to TCML start address at offset 0 and 4. > > > > Signed-off-by: Peng Fan <peng.fan@xxxxxxx> > > --- > > drivers/remoteproc/imx_rproc.c | 37 > > +++++++++++++++++++++++++++++++++- > > 1 file changed, 36 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/remoteproc/imx_rproc.c > > b/drivers/remoteproc/imx_rproc.c index 295e0e0e869a..f5ee0c9bb09d > > 100644 > > --- a/drivers/remoteproc/imx_rproc.c > > +++ b/drivers/remoteproc/imx_rproc.c > > @@ -7,6 +7,7 @@ > > #include <linux/arm-smccc.h> > > #include <linux/clk.h> > > #include <linux/err.h> > > +#include <linux/firmware.h> > > I wonder why do you need to include this? Nothing in this patch looks like it > is using it. It is the 2nd parameter of function imx_rproc_get_boot_addr use 'const struct firmware *' Thanks, Peng.