Page MenuHomeFreeBSD

arm: Disable VFP if any coprocessor fails
Needs ReviewPublic

Authored by jhibbits on May 16 2024, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 20, 1:41 AM
Unknown Object (File)
Mon, May 20, 12:27 AM
Unknown Object (File)
May 19 2024, 4:10 AM
Unknown Object (File)
May 19 2024, 4:08 AM
Unknown Object (File)
May 17 2024, 7:21 PM
Subscribers

Details

Reviewers
andrew
Group Reviewers
ARM
Summary

According to the ARM Cortex-A9 Technical Reference Manual:
To determine if any particular coprocessor exists in the system, write
the access bits for the coprocessor of interest with b11. If the
coprocessor does not exist in the system the access rights remain set
to b00.

In vfp_init(), we cannot assuming that setting CP10 and CP11 access
bits will succeed always, we need to check to see if the settings we
try to write get reset back to 0. If either remains 0 after attempting
to set them, we know the VFP hardware does not exist on the ARM core
that we are running on.

Disable all VFP coprocessors if any fails to enable.

When enabling the CP10 and CP11, if one of them enables, but the other
does not, disable them both and assume VFP is not available.

Add checks in swtch-v6.S to see if vfp_exists is non-zero before
attempting to use any VFP instructions.

Obtained from: Juniper Networks, Inc.

Diff Detail

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