Hi Javier, On Thu, Apr 4, 2024 at 8:58 AM Viguera, Javier <[email protected]> wrote:
> The struct has the fields in the wrong order according to other documentation > from NXP (see for example the AN13994 - Encrypted Boot on AHAB-enabled > devices). > > In the current upstream u-boot code there is NO runtime error, as those > fields are not being used. Only ' get_container_size`on > `arch/arm/mach-imx/image-container.c` defines a variable of that type. But > then it only uses the "length_lsb" and "length_msb" fiels, which are at the > beginning of the struct and thus in the correct position. > > On the other hand, we were hit by this problem in some bootloader encryption > related code we do in our (as of Digi) BSP. We get the blob offset from the > signature block header to read the data encryption key blob and due to the > wrong order this patch fixes, we were getting a wrong position of the DEK > blob. > > Hope this clears it up a bit. Thanks for the clarification. Please put all this explanation into the commit log and send a v2. Thanks

