Backport the PMU feature flag

Backports the applicable code from commit 929e754d5a621cd53f30e69b766ccf381b58d124 to unicorn
This commit is contained in:
Lioncash 2018-02-02 08:28:22 -05:00
parent 35100ce4e0
commit 20038fb801
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 2 additions and 0 deletions

View file

@ -750,6 +750,7 @@ enum arm_features {
ARM_FEATURE_V8_SHA256, /* implements SHA256 part of v8 Crypto Extensions */
ARM_FEATURE_V8_PMULL, /* implements PMULL part of v8 Crypto Extensions */
ARM_FEATURE_THUMB_DSP, /* DSP insns supported in the Thumb encodings */
ARM_FEATURE_PMU, /* has PMU support */
ARM_FEATURE_VBAR, /* has cp15 VBAR */
ARM_FEATURE_V8_SHA3, /* implements SHA3 part of v8 Crypto Extensions */
};

View file

@ -85,6 +85,7 @@ static void aarch64_a57_initfn(struct uc_struct *uc, Object *obj, void *opaque)
set_feature(&cpu->env, ARM_FEATURE_V8_SHA256);
set_feature(&cpu->env, ARM_FEATURE_V8_PMULL);
set_feature(&cpu->env, ARM_FEATURE_CRC);
set_feature(&cpu->env, ARM_FEATURE_PMU);
cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57;
cpu->midr = 0x411fd070;
cpu->reset_fpsid = 0x41034070;