p2pool
p2pool copied to clipboard
ARM Cortex A-53 / 72 errata mitigations
Applicable to all ARM A-53 single board computers but primarily targeted at Raspberry Pi 3&4 users as those will be the most numerous:
There are known faults at the chip level with ARM Cortex A-53, as per the Arm Developer errata notice developer.arm.com/documentation where:
835769: AArch64 multiply-accumulate instruction might produce incorrect result (page 20 of that document) and 843419: A load or store might access an incorrect address (page 22)
To mitigate for this gcc has additional build flags:
https://gcc.gnu.org/onlinedocs/gcc.pdf (Page 315)
-mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769. This involves inserting a NOP instruction between memory instructions and 64-bit integer multiply-accumulate instructions.
-mfix-cortex-a53-843419 -mno-fix-cortex-a53-843419 Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419. This erratum workaround is made at link time and this will only pass the corresponding flag to the linker.
Which Monero implemented:
monero-project/monero/commit/cf10e05cc6a0ed495dbdd44ec3a76b964b14edba
And can be seen working/triggered as during build.
Is this applicable through any of the pools verification functions?
Draft Pull Request as not sure how applicable. I'm assuming P2Pool performs verification checks on miners submissions, possibly triggering this error?
I have Raspberry Pi 3b+ and P2Pool runs just fine there.
Actually... The mystery is solved now :D https://github.com/tevador/RandomX/commit/457c0e4a547b27d3484d84bbe978870c3f037092
I've added these command line flags to build scripts: https://github.com/SChernykh/p2pool/commit/8d9b9e505e08e5d188cf163bb177d4fc833b0391
Glad to see this has been useful, even as an awareness piece for RandomX hardware issues.