儲存庫 vbox 的更動 60445
- 時間撮記:
- 2016-4-12 上午08:35:53 (9 年 以前)
- 位置:
- trunk/src/VBox/ValidationKit/bootsectors
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-c.c
r60319 r60445 40 40 //BS3TESTMODE_PROTOTYPES_CMN(bs3CpuBasic2_iret); 41 41 BS3TESTMODE_PROTOTYPES_MODE(bs3CpuBasic2_iret); 42 BS3TESTMODE_PROTOTYPES_MODE(bs3CpuBasic2_sidt); 42 43 43 44 … … 48 49 { 49 50 //BS3TESTMODEENTRY_MODE("tss / gate / esp", bs3CpuBasic2_TssGateEsp), 50 BS3TESTMODEENTRY_MODE("raise xcpt #1", bs3CpuBasic2_RaiseXcpt1),51 //BS3TESTMODEENTRY_MODE("raise xcpt #1", bs3CpuBasic2_RaiseXcpt1), 51 52 //BS3TESTMODEENTRY_CMN("iret", bs3CpuBasic2_iret), 52 53 //BS3TESTMODEENTRY_MODE("iret", bs3CpuBasic2_iret), 54 BS3TESTMODEENTRY_MODE("sidt", bs3CpuBasic2_sidt), 53 55 }; 54 56 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.c
r60444 r60445 94 94 extern BS3_DECL(void) TMPL_NM(bs3CpuBasic2_Int83)(void); 95 95 extern BS3_DECL(void) TMPL_NM(bs3CpuBasic2_ud2)(void); 96 extern BS3_DECL(void) TMPL_NM(bs3CpuBasic2_sidt_bx_ud2)(void); 97 extern BS3_DECL(void) TMPL_NM(bs3CpuBasic2_lidt_bx_ud2)(void); 96 98 #ifndef DOXYGEN_RUNNING 97 99 # define g_bs3CpuBasic2_ud2_FlatAddr BS3_DATA_NM(g_bs3CpuBasic2_ud2_FlatAddr) … … 1297 1299 } 1298 1300 1301 1302 #define bs3CpuBasic2_sidt_Common BS3_CMN_NM(bs3CpuBasic2_sidt_Common) 1303 void bs3CpuBasic2_sidt_Common(void) 1304 { 1305 BS3TRAPFRAME TrapCtx; 1306 BS3REGCTX Ctx; 1307 BS3REGCTX TmpCtx; 1308 uint8_t abBuf[16]; 1309 uint8_t BS3_FAR *pbBuf = abBuf; 1310 1311 /* make sure they're allocated */ 1312 Bs3MemZero(&Ctx, sizeof(Ctx)); 1313 Bs3MemZero(&TmpCtx, sizeof(TmpCtx)); 1314 Bs3MemZero(&TrapCtx, sizeof(TrapCtx)); 1315 Bs3MemZero(&abBuf, sizeof(abBuf)); 1316 1317 /* Create a context, give this routine some more stack space, point the context 1318 at our SIDT [xBX] + UD2 combo, and point DS:xBX at abBuf. */ 1319 Bs3RegCtxSave(&Ctx); 1320 Ctx.rsp.u -= 0x80; 1321 Ctx.rip.u = (uintptr_t)BS3_FP_OFF(&TMPL_NM(bs3CpuBasic2_sidt_bx_ud2)); 1322 # if TMPL_BITS == 32 1323 g_uBs3TrapEipHint = Ctx.rip.u32; 1324 # endif 1325 Ctx.rbx.u = BS3_FP_OFF(pbBuf); 1326 # if TMPL_BITS == 16 1327 Ctx.ds = BS3_FP_SEG(pbBuf); 1328 # endif 1329 1330 /* 1331 * Check that it works at all. 1332 */ 1333 Bs3MemZero(&abBuf, sizeof(abBuf)); 1334 Bs3TrapSetJmpAndRestore(&Ctx, &TrapCtx); 1335 g_usBs3TestStep = 0; 1336 //bs3CpuBasic2_CompareIntCtx1(&TrapCtx, &Ctx, 0x80 /*bXcpt*/); 1337 1338 } 1339 1299 1340 #endif /* once for each bitcount */ 1300 1341 … … 1454 1495 } 1455 1496 1456 #endif 1497 #endif /* PE16 || PE32 */ 1457 1498 1458 1499 … … 1524 1565 1525 1566 1526 1527 1528 1567 BS3_DECL(uint8_t) TMPL_NM(bs3CpuBasic2_iret)(uint8_t bMode) 1529 1568 { … … 1536 1575 1537 1576 1577 BS3_DECL(uint8_t) TMPL_NM(bs3CpuBasic2_sidt)(uint8_t bMode) 1578 { 1579 g_pszTestMode = TMPL_NM(g_szBs3ModeName); 1580 g_bTestMode = bMode; 1581 g_f16BitSys = BS3_MODE_IS_16BIT_SYS(TMPL_MODE); 1582 1583 BS3_ASSERT(bMode == TMPL_MODE); 1584 1585 /* 1586 * Pass to common worker which is only compiled once per mode. 1587 */ 1588 bs3CpuBasic2_sidt_Common(); 1589 1590 /* 1591 * Re-initialize the IDT. 1592 */ 1593 TMPL_NM(Bs3TrapInit)(); 1594 return 0; 1595 } 1596 1597 1538 1598 #endif /* BS3_INSTANTIATING_MODE */ 1539 1599 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.mac
r60295 r60445 81 81 BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int80 82 82 int 80h 83 ud2 83 .again: ud2 84 jmp .again 84 85 BS3_PROC_END_MODE bs3CpuBasic2_Int80 85 86 … … 87 88 BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int81 88 89 int 81h 89 ud2 90 .again: ud2 91 jmp .again 90 92 BS3_PROC_END_MODE bs3CpuBasic2_Int81 91 93 … … 93 95 BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int82 94 96 int 82h 95 ud2 97 .again: ud2 98 jmp .again 96 99 BS3_PROC_END_MODE bs3CpuBasic2_Int82 97 100 … … 99 102 BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int83 100 103 int 83h 101 ud2 104 .again: ud2 105 jmp .again 102 106 BS3_PROC_END_MODE bs3CpuBasic2_Int83 107 108 109 BS3_PROC_BEGIN_MODE bs3CpuBasic2_sidt_bx_ud2 110 sidt [xBX] 111 .again: ud2 112 jmp .again 113 BS3_PROC_END_MODE bs3CpuBasic2_sidt_bx_ud2 114 115 116 BS3_PROC_BEGIN_MODE bs3CpuBasic2_lidt_bx_ud2 117 lidt [xBX] 118 .again: ud2 119 jmp .again 120 BS3_PROC_END_MODE bs3CpuBasic2_lidt_bx_ud2 103 121 104 122
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器