Page MenuHomeFreeBSD

arm64: Move setting TCR_HD to C code
ClosedPublic

Authored by andrew on Nov 27 2024, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 7:12 PM
Unknown Object (File)
Wed, Dec 11, 4:57 PM
Unknown Object (File)
Wed, Dec 11, 2:00 AM
Unknown Object (File)
Dec 1 2024, 7:45 AM
Unknown Object (File)
Nov 30 2024, 7:29 PM
Unknown Object (File)
Nov 28 2024, 5:17 AM
Unknown Object (File)
Nov 28 2024, 5:17 AM
Unknown Object (File)
Nov 28 2024, 5:01 AM
Subscribers

Details

Summary

To allow for it to be more selective when we enable it, e.g. if the
CPU has an erratum that prevents us from doing so, move the check for
setting TCR_HD to C.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/arm64/pmap.c
1635

Is there a reason for omitting spaces here?

sys/arm64/arm64/pmap.c
1635

Just to fit in 1 line

sys/arm64/arm64/locore.S
951

What's the reason for not setting TCR_HA in C as well?

sys/arm64/arm64/pmap.c
1635

IMO it would be nicer to just break the line.

sys/arm64/arm64/locore.S
951

There are no errata where we need to selectively set TCR_HA so there is no need to move it.

sys/arm64/arm64/pmap.c
1635

I'd prefer to not change it as it will cause conflicts. This change so I can MFC the workaround faster than the cpu_feat code later in the stack.

alc added inline comments.
sys/arm64/arm64/locore.S
951

Are any widely used cores affected?

This revision is now accepted and ready to land.Sat, Dec 7, 6:15 PM
sys/arm64/arm64/pmap.c
1635

I agree with Mark, but if it's expedient for getting a series of patches committed, then I'm okay with this. I assume that at a later point we can introduce a line break.

Later in this stack I am adding a new cpu feature framework (D47812) and changing this to use it (D47815)

sys/arm64/arm64/locore.S
951

The workarounds are added in D47809. The two cores affected are Cortex-A55 and some early Cortex-A510 revisions.

sys/arm64/arm64/pmap.c
1635

It looks like I fixed it in the next commit (D47809) as it removed the braces so the line isn't as long.

This revision was automatically updated to reflect the committed changes.