Go to advanced search

by swarren
Thu Mar 31, 2016 6:23 pm
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

Electron752, do you have the latest FW? If so, I suggest you mention your UART stability issue in https://github.com/raspberrypi/firmware/issues/553 "Raspberry Pi 3 model B Serial console does not use correct baudrate". Are you running an upstream or RPi Foundation version of the kernel? Either way,...
by swarren
Wed Mar 30, 2016 2:48 pm
Forum: Bare metal, Assembly language
Topic: Firmware question?
Replies: 38
Views: 5059

Re: Firmware question?

I'm curious why running in HYP mode is any kind of problem? It works fine for the Linux kernel (in fact it very quickly drops to EL1). Rather than attempt to switch from HYP mode back up to EL3, why not simply avoid switching into HYP mode in the first place. Simply use "kernel_old=1" in config.txt,...
by swarren
Wed Mar 30, 2016 2:38 pm
Forum: Bare metal, Assembly language
Topic: Rpi power saving mode?
Replies: 3
Views: 920

Re: Rpi power saving mode?

There is the wfi instruction. It likely doesn't do a whole lot, but is better than a spin loop.
by swarren
Wed Mar 30, 2016 4:20 am
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

OK, I must be missing something very obvious. I still can't get it to work. This is my complete config.txt. dtoverlay=pi3-miniuart-bt force_turbo=1 You probably want to remove those lines. I don't know about the other AArch64 U-Boot ports, but mine uses the mini UART. If you want to use the PL011 U...
by swarren
Tue Mar 29, 2016 5:46 pm
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

Can I use ARM-Trusted Firmware as the first stage bootloader running @EL3? I would expect so, but you'd need to port ATF to the system. You'd need to use "kernel_old=1" in config.txt and make ATF handle the SMP CPU pinnning/bootup, and know how to receive ATAGS/DT from the VC FW and pass them on to...
by swarren
Tue Mar 29, 2016 5:45 pm
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

The same pins on the GPIO header are used for UART on the RPi 3. However, a different UART HW module is used to drive those pins, and enabling that requires some additional configuration of the system that may reduce performance. Consequently, you need to explicitly request that in your config.txt f...
by swarren
Wed Mar 16, 2016 5:42 am
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

My github branch now has RPi 3 support in both 32- and 64-bit builds: https://github.com/swarren/u-boot/tree/rpi_dev This version uses the ARM architectural timers thus avoids the generic_timer.c modification from zeldin's branch. This version uses the mini UART for the console (via the regular RX/T...
by swarren
Fri Mar 11, 2016 5:15 pm
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

rst wrote:Please try to add

Code: Select all

disable_commandline_tags=1
to your config.txt file. The boot loader will otherwise overwrite your code (without -O2) at 0x100 with ATAGS.
Thanks, that fixed it. I actually modified the code so that this option isn't needed though, by leaving a hole in the binary.
by swarren
Fri Mar 11, 2016 6:31 am
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

Here's something that demos AArch64 mode:
https://github.com/swarren/rpi-3-aarch64-demo

The compiler-optimization dependency is odd. I wonder if that's related to your issue?
by swarren
Sun Mar 06, 2016 4:49 pm
Forum: Bare metal, Assembly language
Topic: RPi 3 kernel8.img?
Replies: 9
Views: 4392

Re: RPi 3 kernel8.img?

Yes. There's already an option in config.txt to select between 32- and 64-bit mode. I don't recall the exact name right now; something like arm_flags. dom mentioned it in another thread on this forum IIRC (search topic titles for AArch64 IIRC).
by swarren
Sun Mar 06, 2016 5:25 am
Forum: Bare metal, Assembly language
Topic: RPi 3 kernel8.img?
Replies: 9
Views: 4392

Re: RPi 3 kernel8.img?

It might be even more useful if the FW loaded kernel8-32.img if booting in 32-bit mode and kernel8-64.img if booting in 64-bit mode (with boot mode still selected via the config.txt option for that).
by swarren
Fri Mar 04, 2016 8:48 pm
Forum: HATs and other add-ons
Topic: CLAC not HAT compatible like it claims?
Replies: 3
Views: 1664

CLAC not HAT compatible like it claims?

The Cirrus Logic Audio Card (CLAC) is advertized as being HAT compatible: http://www.newark.com/wolfson-microelectronics/cirrus-logic-audio-card/hd-audio-card-wm5102-stereo-rpi/dp/84X8125?CMP=KNC-GUSA-GEN-KWL-REM-PURCHASE-WOLFSON_MICROELECTRONICS&mckv=|pcrid|82250232621|&gclid=CjwKEAiAgeW2BRDDtKaTne...
by swarren
Fri Mar 04, 2016 3:08 pm
Forum: Bare metal, Assembly language
Topic: RPi 3 SMMU setup documentation
Replies: 4
Views: 1255

Re: RPi 3 SMMU setup documentation

The mapping had to be changed because the old one only allowed for 512MB of physical memory, so it seems reasonable to assume it will be the same as the Pi2. But that's just a guess. That's a different issue; I'm asking about the top two bits of the ARM physical address (cache aliasing bits), not t...
by swarren
Thu Mar 03, 2016 8:47 pm
Forum: Device Tree
Topic: device tree overlays and U-Boot
Replies: 32
Views: 12976

Re: device tree overlays and U-Boot

Has this feature been tested on a system with 1GB RAM and a config.txt setting the VC memory size as small as possible (e.g. 32M) and no initrd? The Linux kernel splits RAM into two sections; lowmem that is 1:1 mapped in kernel VA space and highmem that is not. The DT must reside in lowmem, since th...
by swarren
Thu Mar 03, 2016 5:37 am
Forum: Bare metal, Assembly language
Topic: Vector table init at rpi2
Replies: 25
Views: 3999

Re: Vector table init at rpi2

BTW, if you want the Pi2 to not start in HYP mode (but instead IIRC in secure SVC mode), you can add "kernel_old=1" to config.txt. kernel.img will then be loaded at address 0 rather than 0x8000 and the stub firmware won't be loaded/executed, so all 4 cores will jump into your code. You may need to d...
by swarren
Wed Mar 02, 2016 4:06 am
Forum: Bare metal, Assembly language
Topic: Vector table init at rpi2
Replies: 25
Views: 3999

Re: Vector table init at rpi2

Make sure your startup (reset) code has set up stack pointer for each CPU mode (SVC, MON, ABT, ...) so that it's valid when the exception is taken. Of course, if the stack isn't actually used, this may not be relevant. Also, did you set up VBAR to point at your exception table, and enable whatever b...
by swarren
Tue Mar 01, 2016 6:08 am
Forum: Bare metal, Assembly language
Topic: Entering aarch64 execution state
Replies: 171
Views: 78971

Re: Entering aarch64 execution state

So "arm_control=0x200" selects AArch64 mode. What value selects AArch32 mode, or does that only happen if you completely remove that entry from config.txt?
by swarren
Tue Mar 01, 2016 6:07 am
Forum: Bare metal, Assembly language
Topic: RPi 3 SMMU setup documentation
Replies: 4
Views: 1255

RPi 3 SMMU setup documentation

There's an SMMU between the ARM and VC-and-peripherals. This requires different addresses to be programmed into DMA-capable peripherals (such as USB/DWC2) vs. the ARM physical address used to access the same RAM. The mapping the VC firmware sets up is different between the RPI 0/1 and 2. Is there do...
by swarren
Tue Mar 01, 2016 6:05 am
Forum: Bare metal, Assembly language
Topic: RPi 3 CPU integration documentation
Replies: 2
Views: 1591

RPi 3 CPU integration documentation

Is there any documentation on the Cortex-A53 integration into the bcm2837? I'm hoping for a document that will address issues like: - Is an ARM GIC present, or is the bcm2835 interrupt controller setup carried over unchanged. - Are any standard ARM peripherals present, such as ARM architected timers...
by swarren
Tue Mar 01, 2016 5:59 am
Forum: Bare metal, Assembly language
Topic: RPi 3 kernel8.img?
Replies: 9
Views: 4392

RPi 3 kernel8.img?

For the RPi 0/1, the VC firmware loads kernel.img, and on the RPi 2 it loads kernel7.img (or at least tries that first). Does/will the RPi 3 try to load kernel8.img first? That would be very useful in order to create a single SD card containing a U-Boot for all Pis, which will need 3 different versi...

Go to advanced search