| 228 | } |
| 229 | |
| 230 | void |
| 231 | vfp_init(void) |
| 232 | { |
| 233 | uint64_t pfr; |
| 234 | |
| 235 | /* Check if there is a vfp unit present */ |
| 236 | pfr = READ_SPECIALREG(id_aa64pfr0_el1); |
| 237 | if ((pfr & ID_AA64PFR0_FP_MASK) == ID_AA64PFR0_FP_NONE) |
| 238 | return; |
| 239 | |
| 240 | /* Disable to be enabled when it's used */ |
| 241 | vfp_disable(); |
| 242 | |
| 243 | if (PCPU_GET(cpuid) == 0) |
| 244 | thread0.td_pcb->pcb_fpusaved->vfp_fpcr = initial_fpcr; |
| 245 | } |
| 246 | |
| 247 | SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, vfp_init, NULL); |
| 248 |
no test coverage detected