Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
Hi, On 03/07/18 21:51, Andreas Färber wrote: > 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 >>> 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 --- >>> >>> 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... There are reports for that happening on the kernel side as well: http://lists.infradead.org/pipermail/linux-arm-kernel/2018-July/588288.html (also see the follow-ups) I suspect the TVAL access is affected as well (this internally accesses the counter), so we would need to cover this also. I'd suggest we wait for the kernel side solution and then copy that, but we keep this patch here in, as it seems to fix far more frequent problems. Btw: I tried to use the Freescale workaround in U-Boot, but this at least requires another patch: to fix the problem when the CPU runs at 24MHz. Also it doesn't really help the MMC issue (I saw the same crashes), as it doesn't cover forward jumps. Cheers, Andre. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On 07/03/2018 09:59 PM, Alexander Graf wrote: > > >> Am 03.07.2018 um 22:51 schrieb Andreas Färber : >> >>> 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 > 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 > --- 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. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
> Am 03.07.2018 um 22:51 schrieb Andreas Färber : > >> 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 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 --- >>> >>> 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? It'd be quite tedious to fix up all OSs out there. Alex ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
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 >> 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 >>> --- >> >> 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... Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On Tue, Jul 3, 2018 at 5:20 PM, Guillaume Gardet wrote: > > > Le 03/07/2018 à 01:08, Andreas Färber a écrit : >> >> Am 02.07.2018 um 10:01 schrieb Jagan Teki: >>> >>> On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara >>> 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 --- >>> >>> Applied both patches, to u-boot-sunxi/master >> >> Tested both on top of v2018.07-rc2, fixes the boot for me. > > > Tested both on top of v2018.07-rc3, and it fixes the boot. Thanks, I've collected Tested-by ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
Le 03/07/2018 à 01:08, Andreas Färber a écrit : Am 02.07.2018 um 10:01 schrieb Jagan Teki: On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara 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 --- Applied both patches, to u-boot-sunxi/master Tested both on top of v2018.07-rc2, fixes the boot for me. Tested both on top of v2018.07-rc3, and it fixes the boot. Thanks. Guillaume Thanks, Andreas ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
Am 02.07.2018 um 10:01 schrieb Jagan Teki: > On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara > 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 >> --- > > Applied both patches, to u-boot-sunxi/master Tested both on top of v2018.07-rc2, fixes the boot for me. Thanks, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara 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 > --- Applied both patches, to u-boot-sunxi/master ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
Hi, On 06/29/2018 11:18 AM, Emmanuel Vadot wrote: > On 2018-06-28 16:37, Andre Przywara wrote: >> Hi, >> >> On 28/06/18 15:27, Jagan Teki wrote: >>> On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara >>> 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 --- arch/arm/cpu/armv8/generic_timer.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) >>> >>> Are these these two patches are for coming release? >> >> Yes, please. That's an issue that needs fixing now. The bug is in all >> A64 silicon, but the issue popped up with the recent commit 5ff8e54888e4 >> and can be triggered quite easily: >> Boot mainline U-Boot on any A64 board, and do: >>> ls mmc 0:1 >> on any SD card (with at least one partition defined). Then hold down the >> Enter key to repeat this last command over and over again. It usually >> takes less than 10 seconds to crash the board. >> People reported immediate crashes under certain circumstances (GPT >> partitioned SD cards): >> https://bugzilla.opensuse.org/show_bug.cgi?id=1098550 >> >> Cheers, >> Andre. > > For fixing the issue we also need to add the compat to the timer in the > dts so kernels will also Apply the errata. > Booting is cool but if you boot a kernel that will have timer issue > it's not that great. Yes, but that is a separate issue. The Linux patch [1] is on the list, but hasn't been merged yet. So the details of the DT property are not yet set. And since we need the fixup already early in the SPL, we have to use a compile time option for U-Boot anyway. So the DT property would be purely for OSes and we would get it during the normal DT sync anyway. Cheers, Andre. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/576886.html ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On 2018-06-28 16:37, Andre Przywara wrote: Hi, On 28/06/18 15:27, Jagan Teki wrote: On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara 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 --- arch/arm/cpu/armv8/generic_timer.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) Are these these two patches are for coming release? Yes, please. That's an issue that needs fixing now. The bug is in all A64 silicon, but the issue popped up with the recent commit 5ff8e54888e4 and can be triggered quite easily: Boot mainline U-Boot on any A64 board, and do: ls mmc 0:1 on any SD card (with at least one partition defined). Then hold down the Enter key to repeat this last command over and over again. It usually takes less than 10 seconds to crash the board. People reported immediate crashes under certain circumstances (GPT partitioned SD cards): https://bugzilla.opensuse.org/show_bug.cgi?id=1098550 Cheers, Andre. For fixing the issue we also need to add the compat to the timer in the dts so kernels will also Apply the errata. Booting is cool but if you boot a kernel that will have timer issue it's not that great. -- Emmanuel Vadot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On Fri, Jun 29, 2018 at 2:17 PM, Andre Przywara wrote: > Hi Jagan, > > On 29/06/18 09:41, Jagan Teki wrote: >> On Thu, Jun 28, 2018 at 8:07 PM, Andre Przywara >> wrote: >>> Hi, >>> >>> On 28/06/18 15:27, Jagan Teki wrote: On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara 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 > --- > arch/arm/cpu/armv8/generic_timer.c | 31 +-- > 1 file changed, 25 insertions(+), 6 deletions(-) > Are these these two patches are for coming release? >>> >>> Yes, please. That's an issue that needs fixing now. The bug is in all >>> A64 silicon, but the issue popped up with the recent commit 5ff8e54888e4 >>> and can be triggered quite easily: >>> Boot mainline U-Boot on any A64 board, and do: ls mmc 0:1 >>> on any SD card (with at least one partition defined). Then hold down the >>> Enter key to repeat this last command over and over again. It usually >>> takes less than 10 seconds to crash the board. >>> People reported immediate crashes under certain circumstances (GPT >>> partitioned SD cards): >>> https://bugzilla.opensuse.org/show_bug.cgi?id=1098550 >> >> Yes I would able to reproduce the issue related to GPT partitions[1] >> with SD card on BPI-M64 and seems like issue fixed[2] after applying >> these two patches. I even tried another board in eMMC partition. >> >> Tested-by: Jagan Teki > > Thanks! That's much appreciated. UW. Hi All, If anyone has any further questions on these two patches, please let me know. Would like to apply soon. Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
Hi Jagan, On 29/06/18 09:41, Jagan Teki wrote: > On Thu, Jun 28, 2018 at 8:07 PM, Andre Przywara > wrote: >> Hi, >> >> On 28/06/18 15:27, Jagan Teki wrote: >>> On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara >>> 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 --- arch/arm/cpu/armv8/generic_timer.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) >>> >>> Are these these two patches are for coming release? >> >> Yes, please. That's an issue that needs fixing now. The bug is in all >> A64 silicon, but the issue popped up with the recent commit 5ff8e54888e4 >> and can be triggered quite easily: >> Boot mainline U-Boot on any A64 board, and do: >>> ls mmc 0:1 >> on any SD card (with at least one partition defined). Then hold down the >> Enter key to repeat this last command over and over again. It usually >> takes less than 10 seconds to crash the board. >> People reported immediate crashes under certain circumstances (GPT >> partitioned SD cards): >> https://bugzilla.opensuse.org/show_bug.cgi?id=1098550 > > Yes I would able to reproduce the issue related to GPT partitions[1] > with SD card on BPI-M64 and seems like issue fixed[2] after applying > these two patches. I even tried another board in eMMC partition. > > Tested-by: Jagan Teki Thanks! That's much appreciated. Cheers, Andre. > [1] https://paste.ubuntu.com/p/hkHrQKXRj5/ > [2] https://paste.ubuntu.com/p/JKrxC7ScNX/ > > Jagan. > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On Thu, Jun 28, 2018 at 8:07 PM, Andre Przywara wrote: > Hi, > > On 28/06/18 15:27, Jagan Teki wrote: >> On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara >> 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 >>> --- >>> arch/arm/cpu/armv8/generic_timer.c | 31 +-- >>> 1 file changed, 25 insertions(+), 6 deletions(-) >>> >> >> Are these these two patches are for coming release? > > Yes, please. That's an issue that needs fixing now. The bug is in all > A64 silicon, but the issue popped up with the recent commit 5ff8e54888e4 > and can be triggered quite easily: > Boot mainline U-Boot on any A64 board, and do: >> ls mmc 0:1 > on any SD card (with at least one partition defined). Then hold down the > Enter key to repeat this last command over and over again. It usually > takes less than 10 seconds to crash the board. > People reported immediate crashes under certain circumstances (GPT > partitioned SD cards): > https://bugzilla.opensuse.org/show_bug.cgi?id=1098550 Yes I would able to reproduce the issue related to GPT partitions[1] with SD card on BPI-M64 and seems like issue fixed[2] after applying these two patches. I even tried another board in eMMC partition. Tested-by: Jagan Teki [1] https://paste.ubuntu.com/p/hkHrQKXRj5/ [2] https://paste.ubuntu.com/p/JKrxC7ScNX/ Jagan. -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
Hi, On 28/06/18 15:27, Jagan Teki wrote: > On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara > 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 >> --- >> arch/arm/cpu/armv8/generic_timer.c | 31 +-- >> 1 file changed, 25 insertions(+), 6 deletions(-) >> > > Are these these two patches are for coming release? Yes, please. That's an issue that needs fixing now. The bug is in all A64 silicon, but the issue popped up with the recent commit 5ff8e54888e4 and can be triggered quite easily: Boot mainline U-Boot on any A64 board, and do: > ls mmc 0:1 on any SD card (with at least one partition defined). Then hold down the Enter key to repeat this last command over and over again. It usually takes less than 10 seconds to crash the board. People reported immediate crashes under certain circumstances (GPT partitioned SD cards): https://bugzilla.opensuse.org/show_bug.cgi?id=1098550 Cheers, Andre. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: timer: factor out FSL arch timer erratum workaround
On Wed, Jun 27, 2018 at 6:12 AM, Andre Przywara 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 > --- > arch/arm/cpu/armv8/generic_timer.c | 31 +-- > 1 file changed, 25 insertions(+), 6 deletions(-) > Are these these two patches are for coming release? ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot