Changeset 60444 in vbox
- Timestamp:
- Apr 12, 2016 7:57:12 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106531
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.c
r60321 r60444 349 349 # if TMPL_BITS == 16 350 350 bool const f386Plus = (g_uBs3CpuDetected & BS3CPU_TYPE_MASK) >= BS3CPU_80386; 351 bool const f286 = (g_uBs3CpuDetected & BS3CPU_TYPE_MASK) >= BS3CPU_80286; 351 352 # else 353 bool const f286 = false; 352 354 bool const f386Plus = true; 353 355 int rc; … … 662 664 g_usBs3TestStep++; 663 665 664 /* Modify the gate DPL to check that this is checked before SS.DPL and SS.PRESENT. */666 /* +1: Modify the gate DPL to check that this is checked before SS.DPL and SS.PRESENT. */ 665 667 paIdt[0x83 << cIdteShift].Gate.u2Dpl = 2; 666 668 Bs3TrapSetJmpAndRestore(&CtxTmp, &TrapCtx); … … 669 671 g_usBs3TestStep++; 670 672 671 /* Check the the CS.DPL check is done before the SS ones. Restoring the ring-0 INT 83672 context triggers the CS.DPL < CPL check. */673 /* +2: Check the the CS.DPL check is done before the SS ones. Restoring the 674 ring-0 INT 83 context triggers the CS.DPL < CPL check. */ 673 675 Bs3TrapSetJmpAndRestore(&Ctx83, &TrapCtx); 674 676 bs3CpuBasic2_CompareGpCtx(&TrapCtx, &Ctx83, BS3_SEL_TEST_PAGE_02); 675 677 g_usBs3TestStep++; 676 678 677 /* Now mark the CS selector not present and check that that also triggers before SS stuff. */679 /* +3: Now mark the CS selector not present and check that that also triggers before SS stuff. */ 678 680 Bs3GdteTestPage02.Gen.u1Present = 0; 679 681 Bs3TrapSetJmpAndRestore(&CtxTmp, &TrapCtx); … … 682 684 g_usBs3TestStep++; 683 685 684 /* Make the CS selector some invalid type and check it triggers before SS stuff. */686 /* +4: Make the CS selector some invalid type and check it triggers before SS stuff. */ 685 687 Bs3GdteTestPage02.Gen.u4Type = g_aInvalidCsTypes[i].u4Type; 686 688 Bs3GdteTestPage02.Gen.u1DescType = g_aInvalidCsTypes[i].u1DescType; … … 691 693 g_usBs3TestStep++; 692 694 693 /* Now, make the CS selector limit too small and that it triggers after SS trouble. */ 695 /* +5: Now, make the CS selector limit too small and that it triggers after SS trouble. 696 The 286 had a simpler approach to these GP(0). */ 694 697 Bs3GdteTestPage02.Gen.u16LimitLow = 0; 695 698 Bs3GdteTestPage02.Gen.u4LimitHigh = 0; 696 699 Bs3GdteTestPage02.Gen.u1Granularity = 0; 697 700 Bs3TrapSetJmpAndRestore(&CtxTmp, &TrapCtx); 698 if (iRpl != 2 || iRpl != iDpl || k >= 4) 701 if (f286) 702 bs3CpuBasic2_CompareGpCtx(&TrapCtx, &CtxTmp, 0 /*uErrCd*/); 703 else if (iRpl != 2 || iRpl != iDpl || k >= 4) 699 704 bs3CpuBasic2_CompareTsCtx(&TrapCtx, &CtxTmp, BS3_SEL_TEST_PAGE_03); 700 705 else if (k != 0) … … 907 912 908 913 /* 909 * IDT limit check. 914 * IDT limit check. The 286 does not access X86DESCGATE::u16OffsetHigh. 910 915 */ 911 916 g_usBs3TestStep = 5000; 912 917 i = (0x80 << (cIdteShift + 3)) - 1; 913 j = (0x82 << (cIdteShift + 3)) - 1;918 j = (0x82 << (cIdteShift + 3)) - (!f286 ? 1 : 3); 914 919 k = (0x83 << (cIdteShift + 3)) - 1; 915 920 for (; i <= k; i++, g_usBs3TestStep++)
Note:
See TracChangeset
for help on using the changeset viewer.