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
F162761756: D58212.diff
Thu, Jul 16, 2:27 PM
F162725300: D58212.id181894.diff
Thu, Jul 16, 4:42 AM
Unknown Object (File)
Wed, Jul 15, 9:47 AM
Unknown Object (File)
Tue, Jul 14, 11:24 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 Not Applicable
Unit
Tests Not Applicable

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.