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.