On Tuesday 13 September 2016 13:15:03 Andreas Färber wrote: > Am 13.09.2016 um 11:44 schrieb Jiri Kastner: > > On Tue, Sep 13, 2016 at 07:30:38AM +0200, Matthias Welwarsky wrote: > >> [...] can anyone share some code to switch a PE to Aarch32 mode? > >> I'm on Rpi3, using a custom little program that does nothing but set up > >> the > >> GPIOs and then execute an endless loop. The program runs at EL2 in > >> Aarch64 > >> state. This would certainly speed up work. > > > > rpi3: > > there are aarch64 images available, but at least first images were > > armv7hl > > (armhfp in debian). i expect u-boot is responsible for switching to > > aarch64. because loading kernel8.img using bootcode.bin and start.elf > > (vc4) starts in aarch32 (assumption based on fact that first images for > > rpi3 were aarch32). > Hm, we have to specify arm_control=0x200 in config.txt for aarch64: > https://build.opensuse.org/package/show/hardware/raspberrypi-firmware > > So I guess bootcode.bin does the switch itself? U-Boot rpi_3 does not > use an arm compiler for any part, only an aarch64. rpi_3_32b is > alternative, not complimentary. > > > hikey: > > during boot, switches from aarch32 to aarch64. not sure, if it is part of > > non-free bootloader (signed??) or hikey edk2. > > l-loader.bin is documented to do that: > https://github.com/96boards/l-loader
l-loader looks promising. The trick here is to set up the RVBAR with a suitable reset vector, then issue a warm-reset by writing to RMR register, asking it to restart in Aarch64 mode on reset. I'll check if I can modify my little boot program to do the same. Can Aarch32 and Aarch64 code coexist in an assembler source file? > Regards, > Andreas BR, Matthias ------------------------------------------------------------------------------ _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel