raspberrypi / tools

1.89k stars 865 forks source link

armstub8: do not use GIC values for non-GIC devices #105

Closed tomty89 closed 4 years ago

tomty89 commented 4 years ago

The new values could severely slow down booting (or actually, time, as even timeouts would be slowed down), specifically when booting FreeBSD with u-boot EFI on a RPI 3B+ (before the kernel kicks in). Therefore, revert to the old values when GIC is not enabled.

For the record, the issue could be specific to / reproducible only on RPI 3B+, or BCM2837B0 (i.e. and 3A+). I assume the old values would do for BCM2837 (i.e. the 1.2GHz older variant) as well anyway.

tomty89 commented 4 years ago

In case anyone want to test for the various models of RPIs:

Here is a set of rpi3-psci-monitor (i.e. the FreeBSD fork) sources and binaries: rpi3-psci-monitor.tar.gz

All the binaries are built with gcc-arm-9.2-2019.12-aarch64-aarch64-none-elf from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads.

kevans91 commented 4 years ago

This is also reproducible on my Raspberry Pi 3B (non-plus variant) w/ U-Boot. I can confirm that things are well again after this patch.

pelwell commented 4 years ago

The original patch confused GIC-ness with 2711-ness. armstub8[-32]-gic is effectively armstub[-32]-2711, but I'd prefer the source code to keep the distinction clear. If you're happy with my changes I'll squash and merge them.

tomty89 commented 4 years ago

Sure, thanks!