From: Paolo Bonzini Date: Mon, 12 Oct 2015 16:25:40 +0000 (+0200) Subject: target-i386: allow any alignment for SMBASE X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~121^2~1^2~112^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd75d4fcb4a82c34d4f466e7fc166162b71ff740;p=sdk%2Femulator%2Fqemu.git target-i386: allow any alignment for SMBASE Processors up to the Pentium (says Bochs---I do not have old enough manuals) require a 32KiB alignment for the SMBASE, but newer processors do not need that, and Tiano Core will use non-aligned SMBASE values. Reported-by: Michael D Kinney Cc: Laszlo Ersek Cc: Jordan Justen Cc: Eduardo Habkost Signed-off-by: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- diff --git a/target-i386/smm_helper.c b/target-i386/smm_helper.c index 02e24b9236..c272a98407 100644 --- a/target-i386/smm_helper.c +++ b/target-i386/smm_helper.c @@ -266,7 +266,7 @@ void helper_rsm(CPUX86State *env) val = x86_ldl_phys(cs, sm_state + 0x7efc); /* revision ID */ if (val & 0x20000) { - env->smbase = x86_ldl_phys(cs, sm_state + 0x7f00) & ~0x7fff; + env->smbase = x86_ldl_phys(cs, sm_state + 0x7f00); } #else cpu_x86_update_cr0(env, x86_ldl_phys(cs, sm_state + 0x7ffc)); @@ -319,7 +319,7 @@ void helper_rsm(CPUX86State *env) val = x86_ldl_phys(cs, sm_state + 0x7efc); /* revision ID */ if (val & 0x20000) { - env->smbase = x86_ldl_phys(cs, sm_state + 0x7ef8) & ~0x7fff; + env->smbase = x86_ldl_phys(cs, sm_state + 0x7ef8); } #endif if ((env->hflags2 & HF2_SMM_INSIDE_NMI_MASK) == 0) {