Module Name: src Committed By: matt Date: Wed Dec 5 19:30:10 UTC 2012
Modified Files: src/sys/arch/arm/vfp: vfp_init.c Log Message: For armv7 (cortex), disable access to the upper 16 FP registers (restrict the register space to 16 64-bit FP registers). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/vfp/vfp_init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/vfp/vfp_init.c diff -u src/sys/arch/arm/vfp/vfp_init.c:1.8 src/sys/arch/arm/vfp/vfp_init.c:1.9 --- src/sys/arch/arm/vfp/vfp_init.c:1.8 Wed Dec 5 19:05:46 2012 +++ src/sys/arch/arm/vfp/vfp_init.c Wed Dec 5 19:30:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vfp_init.c,v 1.8 2012/12/05 19:05:46 matt Exp $ */ +/* $NetBSD: vfp_init.c,v 1.9 2012/12/05 19:30:10 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -231,6 +231,12 @@ vfp_attach(void) uint32_t cpacr = armreg_cpacr_read(); cpacr |= __SHIFTIN(CPACR_ALL, cpacr_vfp); cpacr |= __SHIFTIN(CPACR_ALL, cpacr_vfp2); + if (CPU_ID_CORTEX_P(curcpu()->ci_arm_cpuid)) { + /* + * Disable access to the upper 16 FP registers. + */ + cpacr |= CPACR_V7_D32DIS; + } armreg_cpacr_write(cpacr); /*