@@ -428,6 +428,30 @@ static const struct arm64_ftr_bits ftr_id_aa64dfr0[] = {
428
428
ARM64_FTR_END ,
429
429
};
430
430
431
+ static const struct arm64_ftr_bits ftr_mvfr0 [] = {
432
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPROUND_SHIFT , 4 , 0 ),
433
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPSHVEC_SHIFT , 4 , 0 ),
434
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPSQRT_SHIFT , 4 , 0 ),
435
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPDIVIDE_SHIFT , 4 , 0 ),
436
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPTRAP_SHIFT , 4 , 0 ),
437
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPDP_SHIFT , 4 , 0 ),
438
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_FPSP_SHIFT , 4 , 0 ),
439
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR0_SIMD_SHIFT , 4 , 0 ),
440
+ ARM64_FTR_END ,
441
+ };
442
+
443
+ static const struct arm64_ftr_bits ftr_mvfr1 [] = {
444
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_SIMDFMAC_SHIFT , 4 , 0 ),
445
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_FPHP_SHIFT , 4 , 0 ),
446
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_SIMDHP_SHIFT , 4 , 0 ),
447
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_SIMDSP_SHIFT , 4 , 0 ),
448
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_SIMDINT_SHIFT , 4 , 0 ),
449
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_SIMDLS_SHIFT , 4 , 0 ),
450
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_FPDNAN_SHIFT , 4 , 0 ),
451
+ ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR1_FPFTZ_SHIFT , 4 , 0 ),
452
+ ARM64_FTR_END ,
453
+ };
454
+
431
455
static const struct arm64_ftr_bits ftr_mvfr2 [] = {
432
456
ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR2_FPMISC_SHIFT , 4 , 0 ),
433
457
ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , MVFR2_SIMDMISC_SHIFT , 4 , 0 ),
@@ -458,10 +482,10 @@ static const struct arm64_ftr_bits ftr_id_isar0[] = {
458
482
459
483
static const struct arm64_ftr_bits ftr_id_isar5 [] = {
460
484
ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_RDM_SHIFT , 4 , 0 ),
461
- ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_CRC32_SHIFT , 4 , 0 ),
462
- ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_SHA2_SHIFT , 4 , 0 ),
463
- ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_SHA1_SHIFT , 4 , 0 ),
464
- ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_AES_SHIFT , 4 , 0 ),
485
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_CRC32_SHIFT , 4 , 0 ),
486
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_SHA2_SHIFT , 4 , 0 ),
487
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_SHA1_SHIFT , 4 , 0 ),
488
+ ARM64_FTR_BITS (FTR_VISIBLE , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_AES_SHIFT , 4 , 0 ),
465
489
ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , ID_ISAR5_SEVL_SHIFT , 4 , 0 ),
466
490
ARM64_FTR_END ,
467
491
};
@@ -574,7 +598,7 @@ static const struct arm64_ftr_bits ftr_smcr[] = {
574
598
* Common ftr bits for a 32bit register with all hidden, strict
575
599
* attributes, with 4bit feature fields and a default safe value of
576
600
* 0. Covers the following 32bit registers:
577
- * id_isar[1-4 ], id_mmfr[1-3], id_pfr1, mvfr[0-1 ]
601
+ * id_isar[1-3 ], id_mmfr[1-3]
578
602
*/
579
603
static const struct arm64_ftr_bits ftr_generic_32bits [] = {
580
604
ARM64_FTR_BITS (FTR_HIDDEN , FTR_STRICT , FTR_LOWER_SAFE , 28 , 4 , 0 ),
@@ -645,8 +669,8 @@ static const struct __ftr_reg_entry {
645
669
ARM64_FTR_REG (SYS_ID_ISAR6_EL1 , ftr_id_isar6 ),
646
670
647
671
/* Op1 = 0, CRn = 0, CRm = 3 */
648
- ARM64_FTR_REG (SYS_MVFR0_EL1 , ftr_generic_32bits ),
649
- ARM64_FTR_REG (SYS_MVFR1_EL1 , ftr_generic_32bits ),
672
+ ARM64_FTR_REG (SYS_MVFR0_EL1 , ftr_mvfr0 ),
673
+ ARM64_FTR_REG (SYS_MVFR1_EL1 , ftr_mvfr1 ),
650
674
ARM64_FTR_REG (SYS_MVFR2_EL1 , ftr_mvfr2 ),
651
675
ARM64_FTR_REG (SYS_ID_PFR2_EL1 , ftr_id_pfr2 ),
652
676
ARM64_FTR_REG (SYS_ID_DFR1_EL1 , ftr_id_dfr1 ),
@@ -3339,7 +3363,7 @@ static void __maybe_unused cpu_enable_cnp(struct arm64_cpu_capabilities const *c
3339
3363
3340
3364
/*
3341
3365
* We emulate only the following system register space.
3342
- * Op0 = 0x3, CRn = 0x0, Op1 = 0x0, CRm = [0, 4 - 7]
3366
+ * Op0 = 0x3, CRn = 0x0, Op1 = 0x0, CRm = [0, 2 - 7]
3343
3367
* See Table C5-6 System instruction encodings for System register accesses,
3344
3368
* ARMv8 ARM(ARM DDI 0487A.f) for more details.
3345
3369
*/
@@ -3349,7 +3373,7 @@ static inline bool __attribute_const__ is_emulated(u32 id)
3349
3373
sys_reg_CRn (id ) == 0x0 &&
3350
3374
sys_reg_Op1 (id ) == 0x0 &&
3351
3375
(sys_reg_CRm (id ) == 0 ||
3352
- ((sys_reg_CRm (id ) >= 4 ) && (sys_reg_CRm (id ) <= 7 ))));
3376
+ ((sys_reg_CRm (id ) >= 2 ) && (sys_reg_CRm (id ) <= 7 ))));
3353
3377
}
3354
3378
3355
3379
/*
0 commit comments