cpu.c (97a28b0eeac14a4a7326d583b745c555fa1f1da6) cpu.c (ea90db0af67aabdf0abb65c418b8857d5359b6ea)
1/*
2 * QEMU ARM CPU
3 *
4 * Copyright (c) 2012 SUSE LINUX Products GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2

--- 755 unchanged lines hidden (view full) ---

764 DEFINE_PROP_BOOL("pmu", ARMCPU, has_pmu, true);
765
766static Property arm_cpu_has_vfp_property =
767 DEFINE_PROP_BOOL("vfp", ARMCPU, has_vfp, true);
768
769static Property arm_cpu_has_neon_property =
770 DEFINE_PROP_BOOL("neon", ARMCPU, has_neon, true);
771
1/*
2 * QEMU ARM CPU
3 *
4 * Copyright (c) 2012 SUSE LINUX Products GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2

--- 755 unchanged lines hidden (view full) ---

764 DEFINE_PROP_BOOL("pmu", ARMCPU, has_pmu, true);
765
766static Property arm_cpu_has_vfp_property =
767 DEFINE_PROP_BOOL("vfp", ARMCPU, has_vfp, true);
768
769static Property arm_cpu_has_neon_property =
770 DEFINE_PROP_BOOL("neon", ARMCPU, has_neon, true);
771
772static Property arm_cpu_has_dsp_property =
773 DEFINE_PROP_BOOL("dsp", ARMCPU, has_dsp, true);
774
772static Property arm_cpu_has_mpu_property =
773 DEFINE_PROP_BOOL("has-mpu", ARMCPU, has_mpu, true);
774
775/* This is like DEFINE_PROP_UINT32 but it doesn't set the default value,
776 * because the CPU initfn will have already set cpu->pmsav7_dregion to
777 * the right value for that particular CPU type, and we don't want
778 * to override that with an incorrect constant value.
779 */

--- 96 unchanged lines hidden (view full) ---

876 if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) {
877 cpu->has_neon = true;
878 if (!kvm_enabled()) {
879 qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property,
880 &error_abort);
881 }
882 }
883
775static Property arm_cpu_has_mpu_property =
776 DEFINE_PROP_BOOL("has-mpu", ARMCPU, has_mpu, true);
777
778/* This is like DEFINE_PROP_UINT32 but it doesn't set the default value,
779 * because the CPU initfn will have already set cpu->pmsav7_dregion to
780 * the right value for that particular CPU type, and we don't want
781 * to override that with an incorrect constant value.
782 */

--- 96 unchanged lines hidden (view full) ---

879 if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) {
880 cpu->has_neon = true;
881 if (!kvm_enabled()) {
882 qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property,
883 &error_abort);
884 }
885 }
886
887 if (arm_feature(&cpu->env, ARM_FEATURE_M) &&
888 arm_feature(&cpu->env, ARM_FEATURE_THUMB_DSP)) {
889 qdev_property_add_static(DEVICE(obj), &arm_cpu_has_dsp_property,
890 &error_abort);
891 }
892
884 if (arm_feature(&cpu->env, ARM_FEATURE_PMSA)) {
885 qdev_property_add_static(DEVICE(obj), &arm_cpu_has_mpu_property,
886 &error_abort);
887 if (arm_feature(&cpu->env, ARM_FEATURE_V7)) {
888 qdev_property_add_static(DEVICE(obj),
889 &arm_cpu_pmsav7_dregion_property,
890 &error_abort);
891 }

--- 203 unchanged lines hidden (view full) ---

1095 t = FIELD_DP64(t, ID_AA64ISAR1, FRINTTS, 0);
1096 cpu->isar.id_aa64isar1 = t;
1097
1098 u = cpu->isar.mvfr0;
1099 u = FIELD_DP32(u, MVFR0, SIMDREG, 0);
1100 cpu->isar.mvfr0 = u;
1101 }
1102
893 if (arm_feature(&cpu->env, ARM_FEATURE_PMSA)) {
894 qdev_property_add_static(DEVICE(obj), &arm_cpu_has_mpu_property,
895 &error_abort);
896 if (arm_feature(&cpu->env, ARM_FEATURE_V7)) {
897 qdev_property_add_static(DEVICE(obj),
898 &arm_cpu_pmsav7_dregion_property,
899 &error_abort);
900 }

--- 203 unchanged lines hidden (view full) ---

1104 t = FIELD_DP64(t, ID_AA64ISAR1, FRINTTS, 0);
1105 cpu->isar.id_aa64isar1 = t;
1106
1107 u = cpu->isar.mvfr0;
1108 u = FIELD_DP32(u, MVFR0, SIMDREG, 0);
1109 cpu->isar.mvfr0 = u;
1110 }
1111
1112 if (arm_feature(env, ARM_FEATURE_M) && !cpu->has_dsp) {
1113 uint32_t u;
1114
1115 unset_feature(env, ARM_FEATURE_THUMB_DSP);
1116
1117 u = cpu->isar.id_isar1;
1118 u = FIELD_DP32(u, ID_ISAR1, EXTEND, 1);
1119 cpu->isar.id_isar1 = u;
1120
1121 u = cpu->isar.id_isar2;
1122 u = FIELD_DP32(u, ID_ISAR2, MULTU, 1);
1123 u = FIELD_DP32(u, ID_ISAR2, MULTS, 1);
1124 cpu->isar.id_isar2 = u;
1125
1126 u = cpu->isar.id_isar3;
1127 u = FIELD_DP32(u, ID_ISAR3, SIMD, 1);
1128 u = FIELD_DP32(u, ID_ISAR3, SATURATE, 0);
1129 cpu->isar.id_isar3 = u;
1130 }
1131
1103 /* Some features automatically imply others: */
1104 if (arm_feature(env, ARM_FEATURE_V8)) {
1105 if (arm_feature(env, ARM_FEATURE_M)) {
1106 set_feature(env, ARM_FEATURE_V7);
1107 } else {
1108 set_feature(env, ARM_FEATURE_V7VE);
1109 }
1110 }

--- 1317 unchanged lines hidden ---
1132 /* Some features automatically imply others: */
1133 if (arm_feature(env, ARM_FEATURE_V8)) {
1134 if (arm_feature(env, ARM_FEATURE_M)) {
1135 set_feature(env, ARM_FEATURE_V7);
1136 } else {
1137 set_feature(env, ARM_FEATURE_V7VE);
1138 }
1139 }

--- 1317 unchanged lines hidden ---