[PATCH] cpu: imx8_cpu: Avoid revision to corrupt device tree

Tom Rini trini at konsulko.com
Thu Oct 17 05:05:03 CEST 2024


On Thu, Oct 17, 2024 at 01:10:02AM +0000, Peng Fan wrote:
> > Subject: Re: [PATCH] cpu: imx8_cpu: Avoid revision to corrupt device
> > tree
> > 
> > On Sat, Oct 12, 2024 at 12:16:14AM +0000, Peng Fan wrote:
> > > > Subject: Re: [PATCH] cpu: imx8_cpu: Avoid revision to corrupt
> > device
> > > > tree
> > > >
> > > > > Why isn't this padding and alignment with the BSS being taken
> > care
> > > > of
> > > > > in either the linker script or the binman dts?
> > >
> > > Sorry, I am not sure what you mean.
> > 
> > I mean, why are things placed in this position to start with? Why is the
> > device tree not already in a place where we aren't smashing it at run
> > time? Is this a problem of the alignment / placement of items in a blob?
> > A runtime placement problem? What?
> 
> Whether binman or not. I think u-boot.dtb is padded just end
> of u-boot-nodtb.bin. Not alignment or else.
> 
> This is a common issue, bss should not be written before reloc_fdt.

It's possible I'm missing the examples in my quick grep right now but,
yes, why are you needing to make this device tree change so early? We
should not be using the "put this in the data section" kludge unless
strictly necessary. Why is this necessary and cannot wait until, well,
further along in the boot? This is supposed to be for
pre-DRAM-initialization stuff.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241016/67970c1e/attachment.sig>


More information about the U-Boot mailing list