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

Tom Rini trini at konsulko.com
Fri Jul 9 18:15:25 CEST 2021


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.

-- 
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/20210709/cbae3939/attachment.sig>


More information about the U-Boot mailing list