Fixes LM flag for CPUID extended feature mask (#1202)
This commit is contained in:
@ -160,6 +160,10 @@ void x86_reg_reset(struct uc_struct *uc)
|
|||||||
env->hflags &= ~(HF_ADDSEG_MASK);
|
env->hflags &= ~(HF_ADDSEG_MASK);
|
||||||
env->efer |= MSR_EFER_LMA | MSR_EFER_LME; // extended mode activated
|
env->efer |= MSR_EFER_LMA | MSR_EFER_LME; // extended mode activated
|
||||||
cpu_x86_update_cr0(env, CR0_PE_MASK); // protected mode
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user