Page MenuHomeFreeBSD

bsd.cpu.mk: Add a workaround for erratum 843419
ClosedPublic

Authored by andrew on Mon, Jul 13, 10:55 AM.
Tags
None
Referenced Files
F163025426: D58212.id.diff
Sun, Jul 19, 8:16 AM
Unknown Object (File)
Sat, Jul 18, 7:28 PM
Unknown Object (File)
Sat, Jul 18, 6:14 PM
Unknown Object (File)
Sat, Jul 18, 6:18 AM
Unknown Object (File)
Fri, Jul 17, 9:48 PM
Unknown Object (File)
Fri, Jul 17, 7:32 PM
Unknown Object (File)
Fri, Jul 17, 7:08 AM
Unknown Object (File)
Thu, Jul 16, 2:27 PM

Details

Summary

Add a workaround for the Arm Cortex-A53 erratum 843419. This has been
targeted when the build is either unoptimised for any CPU/architecture
or targets the Cortex-A53 or ARMv8.0 architecture.

PR: 296240
PR: 296395
Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74766
Build 71649: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mon, Jul 13, 6:21 PM

I think the only thing I'd love to see is to tell users in the commit message how to apply this as it seems this needs to be done manually.

The other question I have: does this work with gcc or do we need -mfix-cortex-a53-843419 there?

In D58212#1335515, @bz wrote:

I think the only thing I'd love to see is to tell users in the commit message how to apply this as it seems this needs to be done manually.

The fixup is applied automatically if your CPUTYPE is set to 'generic', 'armv8-a', 'cortex-a53' or if it is left empty.

The other question I have: does this work with gcc or do we need -mfix-cortex-a53-843419 there?

Yes, the linker flag is compatible with the GCC toolchain/linker.

Sure, enabling the -mfix-cortex-a53-843419 flag in clang also for FreeBSD will make things much cleaner. It's hard to say why it's not enabled yet.
Then enable all Cortex mitigations unconditionally (there are three others) and then leave all this dance to the compiler.

In D58212#1335515, @bz wrote:

I think the only thing I'd love to see is to tell users in the commit message how to apply this as it seems this needs to be done manually.

The fixup is applied automatically if your CPUTYPE is set to 'generic', 'armv8-a', 'cortex-a53' or if it is left empty.

It should also be applied to a CPUTYPE of cortex-a57.cortex-a53.

The world will need to be rebuilt, however as a limited number of cores are affected, and it seems difficult to hit the erratum I'm not planning on forcing a rebuild for everyone.