Skip to content

Conversation

tomty89
Copy link
Contributor

@tomty89 tomty89 commented Jan 5, 2020

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.

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
Copy link
Contributor Author

tomty89 commented Jan 5, 2020

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

  • 12.1-RELEASE works fine
  • 12.1-STABLE / 13.0-CURRENT snapshots (since at least / as of 20191226) are broken

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

  • rpi3-psci-monitor-2b8890a is equivalent to the one in 12.1-RELEASE
  • rpi3-psci-monitor-6bfbaff is equivalent to the one in the snapshots
  • rpi3-psci-monitor-2b8890a-{a,b} can show that either of the new values of LOCAL_CONTROL and LOCAL_PRESCALER or OSC_FREQ could slow down booting / time to different severity at different point
  • rpi3-psci-monitor-6bfbaff-c can show that L2 read/write cache latency setting, the only remaining difference of the armstub8.bin in 12.1-RELEASE and the one in the snapshots, is not the cause of the issue; although this does not mean it will not be potentially problematic on other aspects if done "generally".

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

kevans91 commented Jan 9, 2020

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
Copy link
Contributor

pelwell commented Jan 10, 2020

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
Copy link
Contributor Author

tomty89 commented Jan 10, 2020

Sure, thanks!

@pelwell pelwell merged commit fd1373e into raspberrypi:master Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants