[PATCH] arm64: Update memcpy_{from, to}io() helpers

Patrick DELAUNAY patrick.delaunay at foss.st.com
Mon Jul 19 11:25:12 CEST 2021


Hi Tom,

On 7/9/21 6:15 PM, Tom Rini wrote:
> On Fri, Feb 26, 2021 at 01:44:51PM +0100, Patrice Chotard wrote:
>
>> At early U-Boot stage, before relocation, MMU is not yet configured
>> and disabled. DDR may not be configured with the correct memory
>> attributes (can be configured in MT_DEVICE instead of MT_MEMORY).
>>
>> In this case, usage of memcpy_{from, to}io() may leads to synchronous
>> abort in AARCH64 in case the normal memory address is not 64Bits aligned.
>>
>> To avoid such situation, forbid usage of normal memory cast to (u64 *) in
>> case MMU is not enabled.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
>> Cc: mark.kettenis at xs4all.nl
>> Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> Sorry for the delay.  If this is still needed, you'll need to address
> the build failures on platforms such as cgtqmx8:
> +(cgtqmx8) board/congatec/cgtqmx8/cgtqmx8.c:377:6: error: conflicting types for 'reset_cpu'
> +(cgtqmx8)  void reset_cpu(ulong addr)
> +(cgtqmx8)       ^~~~~~~~~
> +(cgtqmx8) In file included from arch/arm/include/asm/io.h:341:0,
> +(cgtqmx8)                  from board/congatec/cgtqmx8/cgtqmx8.c:12:
> +(cgtqmx8) include/cpu_func.h:88:6: note: previous declaration of 'reset_cpu' was here
> +(cgtqmx8)  void reset_cpu(void);
>
> that are introduced with this patch.  Thanks.
>
I pushed a V2 serie to solve the issue.

http://patchwork.ozlabs.org/project/uboot/list/?series=254106


Regards.

Patrick



More information about the U-Boot mailing list