From: Lokesh Vutla Date: Thu, 10 Jan 2019 15:58:24 +0530 Subject: [U-Boot] memcpy/memset on arm64 platforms In-Reply-To: References: Message-ID: <5f3c0a89-d77a-0ad8-ea66-ba92b02da155@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi All, Any help is much appreciated. Thanks and regards, Lokesh On 07/01/19 2:43 PM, Lokesh Vutla wrote: > Hi All, >     I am trying to enable CONFIG_USE_ARCH_MEMSET/MEMCPY on arm64 platforms and > realized that there is no arm64 specific memcpy available in u-boot. So I tried > porting arm64 specific memcpy from kernel[1]. Memcpy stopped working after that > and observed that if destination address is unaligned then system hangs. > > After doing a bit more research, understood  that unaligned access to device or > strongly ordered memories will fail. And the memory system (even normal RAM) > behaves like strongly ordered memory when the MMU is disabled[2]. In u-boot MMU > is enabled very late after relocation and SPL doesn't enable MMU at all. > > Before I proceed any further wanted to hear from others if anyone have already > tried and have any working solution. If not should we update the kernel memcpy > to use unaligned destination address and use it in u-boot? > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/lib/memcpy.S > > [2] > https://community.arm.com/processors/f/discussions/7557/when-and-where-will-the-ldp-instruction-trigger-an-exception > > > Thanks and regards, > Lokesh > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > https://lists.denx.de/listinfo/u-boot