Fixes LM flag for CPUID extended feature mask (#1202)

This commit is contained in:
Ryan Houdek 2020-02-09 18:57:46 -08:00 committed by GitHub
parent 63ebcf41a8
commit 1eabe2ffaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -160,6 +160,10 @@ void x86_reg_reset(struct uc_struct *uc)
env->hflags &= ~(HF_ADDSEG_MASK);
env->efer |= MSR_EFER_LMA | MSR_EFER_LME; // extended mode activated
cpu_x86_update_cr0(env, CR0_PE_MASK); // protected mode
/* If we are operating in 64bit mode then add the Long Mode flag
* to the CPUID feature flag
*/
env->features[FEAT_8000_0001_EDX] |= CPUID_EXT2_LM;
break;
}
}