[PATCH] armv8: Initialize CNTFRQ if at highest exception level
Tom Rini
trini at konsulko.com
Sat Jul 24 22:40:39 CEST 2021
On Mon, Jul 12, 2021 at 03:04:21PM +0100, Peter Hoyes wrote:
> From: Peter Hoyes <Peter.Hoyes at arm.com>
>
> CNTFRQ_EL0 is only writable from the highest supported exception
> level on the platform. For Armv8-A, this is typically EL3, but
> technically EL2 and EL3 are optional so it may need to be
> initialized at EL2 or EL1. For Armv8-R, the highest exception
> level is always EL2.
>
> This patch moves the initialization outside of the switch_el
> block and uses a new macro branch_if_not_highest_el which
> dynamically detects whether it is at the highest supported
> exception level.
>
> Linux's docs state that CNTFRQ_EL0 should be initialized by the
> bootloader. If not set, the the U-Boot prompt countdown hangs.
>
> Signed-off-by: Peter Hoyes <Peter.Hoyes at arm.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210724/4983ae80/attachment.sig>
More information about the U-Boot
mailing list