
On 07/03/2018 09:59 PM, Alexander Graf wrote:
Am 03.07.2018 um 22:51 schrieb Andreas Färber afaerber@suse.de:
Am 03.07.2018 um 01:08 schrieb Andreas Färber:
Am 02.07.2018 um 10:01 schrieb Jagan Teki:
On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara andre.przywara@arm.com wrote: At the moment we have the workaround for the Freescale arch timer erratum A-008585 merged into the generic timer_read_counter() routine. Split those two up, so that we can add other errata workaround more easily. Also add an explaining comment on the way.
Signed-off-by: Andre Przywara andre.przywara@arm.com
Applied both patches, to u-boot-sunxi/master
Tested both on top of v2018.07-rc2, fixes the boot for me.
Actually I saw it again just now, without having touched U-Boot at all. Unplugged power, retried, worked. So it seems we've reduced the likelihood, but something might still be astray...
So maybe we need to instead apply some logic that loops until cnt == prev_cnt+1?
Also, is there any way to just trap counter reads from EL3?
I can't find anything for EL3, and I believe we can't trap the virtual timer at all except for EL0. Besides, that would be rather costly. The current solution normally gets away with just one sysreg read, so it would be just the comparison overhead we have to pay. You don't want to give this away easily.
It'd be quite tedious to fix up all OSs out there.
Well, bad luck, it's a hardware erratum - and not the first one in this area. So chances are you can add just another one quite easily, as we do in Linux - where we actually have somewhat of an "arch timer errata framework".
Cheers, Andre.