Hi,
Further to Jeromes email about hangs / compiler flags for BL1.
I find on my hikey board with software which usually boot OK, around 1 in 5 cold boots I can provoke another hang in BL1.
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):9a97502 NOTICE: BL1: Built : 08:13:36, Mar 10 2015 0000000002000000000000000200000000000000020000000000000002000000 (repeating at 1Hz)
Has anyone else experienced this?
regards,
Peter.
On Sat, Mar 21, 2015 at 08:41:12AM +0000, Peter Griffin wrote:
Hi,
Further to Jeromes email about hangs / compiler flags for BL1.
I find on my hikey board with software which usually boot OK, around 1 in 5 cold boots I can provoke another hang in BL1.
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):9a97502 NOTICE: BL1: Built : 08:13:36, Mar 10 2015 0000000002000000000000000200000000000000020000000000000002000000 (repeating at 1Hz)
Has anyone else experienced this?
Are u using the latest ATF?
If u can build the ATF w/t source code, could u help check if the patch 7c2d6de8b89 "Add memory barrier after pll setting" has been included in your code base?
BTW, because now in ATF, the mmio_write/mmio_read APIs have not added any memory barrier, so it's easily introduce the out-of-order issue, especially now armv8 has more weaker memory model rather than armv7; so if upper patch can not fix your issue, could u also try below patch, which it will add memory barriers for register's accessing:
https://github.com/Leo-Yan/arm-trusted-firmware/commit/a87af905ef77bf96409b8...
I also have sent pull request for this patch.
Thanks, Leo Yan
Hi Leo,
Has anyone else experienced this?
Are u using the latest ATF?
Yep
If u can build the ATF w/t source code, could u help check if the patch 7c2d6de8b89 "Add memory barrier after pll setting" has been included in your code base?
Just checked, and it wasn't in my code base.
BTW, because now in ATF, the mmio_write/mmio_read APIs have not added any memory barrier, so it's easily introduce the out-of-order issue, especially now armv8 has more weaker memory model rather than armv7; so if upper patch can not fix your issue, could u also try below patch, which it will add memory barriers for register's accessing:
https://github.com/Leo-Yan/arm-trusted-firmware/commit/a87af905ef77bf96409b8...
Interesting that there were no barriers, as the mmio macros were written by ARM. Re-building with this patch cherry-picked into ATL, I've just booted 15 times and not seen the issue. So this seems (so far at least) to have resolved the intermittent hang :-)
I also have sent pull request for this patch.
Yes getting this merged would be good.
Also do you know if anyone is investigating further why removing the packed attribute on usb_endpoint_descriptor is required when compiling ATL with gcc 4.9 (which is the other change I also have applied to my ATL code).
regards,
Peter.
Hi Peter,
On Mon, Mar 23, 2015 at 11:01:10AM +0000, Peter Griffin wrote:
BTW, because now in ATF, the mmio_write/mmio_read APIs have not added any memory barrier, so it's easily introduce the out-of-order issue, especially now armv8 has more weaker memory model rather than armv7; so if upper patch can not fix your issue, could u also try below patch, which it will add memory barriers for register's accessing:
https://github.com/Leo-Yan/arm-trusted-firmware/commit/a87af905ef77bf96409b8...
Interesting that there were no barriers, as the mmio macros were written by ARM. Re-building with this patch cherry-picked into ATL, I've just booted 15 times and not seen the issue. So this seems (so far at least) to have resolved the intermittent hang :-)
Thanks for the trying :) I also bring up this question into ATF's bug tracking list: https://github.com/ARM-software/tf-issues/issues/298;
I also have sent pull request for this patch.
Yes getting this merged would be good.
Also do you know if anyone is investigating further why removing the packed attribute on usb_endpoint_descriptor is required when compiling ATL with gcc 4.9 (which is the other change I also have applied to my ATL code).
I don't know this issue. Just reminding, if this issue is not tracked in: https://github.com/96boards/bugs/issues, suggest u can fire one.
Thanks, Leo Yan
On 03/23/2015 12:54 PM, Leo Yan wrote:
Hi Peter,
On Mon, Mar 23, 2015 at 11:01:10AM +0000, Peter Griffin wrote:
[...]
Also do you know if anyone is investigating further why removing the packed attribute on usb_endpoint_descriptor is required when compiling ATL with gcc 4.9 (which is the other change I also have applied to my ATL code).
I don't know this issue. Just reminding, if this issue is not tracked in: https://github.com/96boards/bugs/issues, suggest u can fire one.
FYI the PR for the quick-and-dirty fix is https://github.com/96boards/arm-trusted-firmware/pull/4, you may want to link to it if you create a bug.