Commit 516633dc42a2cd92347f1bd2ba365b4043b6e8e3

Authored by bellard
1 parent dc196a57

jump to gate fix (aka OS/2 Warp install bug)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@923 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
target-i386/helper.c
@@ -1264,6 +1264,9 @@ void helper_ljmp_protected_T0_T1(int next_eip) @@ -1264,6 +1264,9 @@ void helper_ljmp_protected_T0_T1(int next_eip)
1264 if (!(e2 & DESC_P_MASK)) 1264 if (!(e2 & DESC_P_MASK))
1265 raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc); 1265 raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc);
1266 gate_cs = e1 >> 16; 1266 gate_cs = e1 >> 16;
  1267 + new_eip = (e1 & 0xffff);
  1268 + if (type == 12)
  1269 + new_eip |= (e2 & 0xffff0000);
1267 if (load_segment(&e1, &e2, gate_cs) != 0) 1270 if (load_segment(&e1, &e2, gate_cs) != 0)
1268 raise_exception_err(EXCP0D_GPF, gate_cs & 0xfffc); 1271 raise_exception_err(EXCP0D_GPF, gate_cs & 0xfffc);
1269 dpl = (e2 >> DESC_DPL_SHIFT) & 3; 1272 dpl = (e2 >> DESC_DPL_SHIFT) & 3;
@@ -1276,9 +1279,6 @@ void helper_ljmp_protected_T0_T1(int next_eip) @@ -1276,9 +1279,6 @@ void helper_ljmp_protected_T0_T1(int next_eip)
1276 raise_exception_err(EXCP0D_GPF, gate_cs & 0xfffc); 1279 raise_exception_err(EXCP0D_GPF, gate_cs & 0xfffc);
1277 if (!(e2 & DESC_P_MASK)) 1280 if (!(e2 & DESC_P_MASK))
1278 raise_exception_err(EXCP0D_GPF, gate_cs & 0xfffc); 1281 raise_exception_err(EXCP0D_GPF, gate_cs & 0xfffc);
1279 - new_eip = (e1 & 0xffff);  
1280 - if (type == 12)  
1281 - new_eip |= (e2 & 0xffff0000);  
1282 limit = get_seg_limit(e1, e2); 1282 limit = get_seg_limit(e1, e2);
1283 if (new_eip > limit) 1283 if (new_eip > limit)
1284 raise_exception_err(EXCP0D_GPF, 0); 1284 raise_exception_err(EXCP0D_GPF, 0);