> From: Heinrich Schuchardt <xypron.g...@gmx.de> > Date: Sat, 20 Jul 2019 13:23:13 +0200 > > On 7/20/19 1:59 AM, Jonathan Gray wrote: > > On Fri, Jul 19, 2019 at 08:25:45PM +0200, Heinrich Schuchardt wrote: > >> In GRUB before 2.04 a bug existed which did not allow booting some ARM32 > >> boards if U-Boot did not disable caches, cf. > >> https://lists.linaro.org/pipermail/cross-distro/2019-July/000933.html > >> > >> In ExitBootServices() we were disabling the caches by calling > >> cleanup_before_linux(). This workaround is not needed anymore. > > > > It is required for at least OpenBSD, FreeBSD and NetBSD. > > Which are all now forced to carry patches to be able to use U-Boot. > > Please, compare function run_loadfile() in files > sys/arch/arm64/stand/efiboot/exec.c and > sys/arch/armv7/stand/efiboot/exec.c of openbsd/src. > > On arm64 after loading the kernel you flush the data and instruction > caches. On armv7 you don't. As the UEFI spec requires caches to be > switched on this is bound to fail. You should be good if you flush > caches like you do on arm64. > > You can find the relevant code for GRUB in > grub-core/kern/arm/cache.S and > grub-core/kern/arm/cache.c > > After GRUB loads the Linux kernel it calls > grub_arch_sync_caches ((void *) linux_addr, linux_size); > in function linux_boot().
Thanks for the pointer. I added code to OpenBSD's BOOTARM.EFI to disable the caches and MMU such that the kernel ends up being started in the same state as before. That still leaves us with the L2 cache issue though. A U-Boot with CONFIG_SYS_L2CACHE_OFF set works, whereas without it doesn't. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot