On Tue, Sep 13, 2016 at 01:15:03PM +0200, 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

good to know, so with snippets from l-loader we can boot to aarch32 and
try to switch to aarch64 and vice versa.

> 
> 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
> 

thanks for clearing

> > jetson tx1:
> >  userspace part of linux4tegra for jetson tx1 releases are both, armv7hl
> >  and aarch64, while kernel is compiled for aarch64, so i guess tegra
> >  downstream kernel has appropriate code for switching from aarch64 to 
> > aarch32.
> 
> That surely has nothing to do with downstream, any arm64 kernel can run
> aarch32 code on hardware that supports it. ThunderX among others does not.

tx1 != thunderx. and tx1 does, i just checked it in l4t 23.1 which was only 
armhfp.
what i wanted to point out is where we should look for snippets. how kernel
is switching from aa64_el1 to aa32_el0.


> 
> Regards,
> Andreas
> 
> -- 
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)

Attachment: pgpSWH4NC_E5L.pgp
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to