Changeset 60440 in vbox
- Timestamp:
- Apr 11, 2016 7:23:37 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/VBox/VMMDevTesting.h (modified) (2 diffs)
-
src/VBox/Devices/VMMDev/VMMDevTesting.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VMMDevTesting.h
r60096 r60440 63 63 /** The high nanosecond timestamp - 4 RO. Read this after the low one! */ 64 64 #define VMMDEV_TESTING_IOPORT_TS_HIGH (VMMDEV_TESTING_IOPORT_BASE + 2) 65 /** Command register usually used for preparing the data register - 4 WO. */65 /** Command register usually used for preparing the data register - 4/2 WO. */ 66 66 #define VMMDEV_TESTING_IOPORT_CMD (VMMDEV_TESTING_IOPORT_BASE + 3) 67 67 /** Data register which use depends on the current command - 1s, 4 WO. */ … … 92 92 /** Print string, sending a string including newline. (RTTestPrintf) */ 93 93 #define VMMDEV_TESTING_CMD_PRINT UINT32_C(0xcab1e008) 94 95 /** The magic part of the command. */ 96 #define VMMDEV_TESTING_CMD_MAGIC UINT32_C(0xcab1e000) 97 /** The magic part of the command. */ 98 #define VMMDEV_TESTING_CMD_MAGIC_MASK UINT32_C(0xffffff00) 99 /** The magic high word automatically supplied to 16-bit CMD writes. */ 100 #define VMMDEV_TESTING_CMD_MAGIC_HI_WORD UINT32_C(0xcab10000) 94 101 /** @} */ 95 102 -
trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp
r60096 r60440 240 240 241 241 /* 242 * The command port (DWORD write only). 242 * The command port (DWORD and WORD write only). 243 * (We have to allow WORD writes for 286, 186 and 8086 execution modes.) 243 244 */ 244 245 case VMMDEV_TESTING_IOPORT_CMD: 246 if (cb == 2) 247 { 248 u32 |= VMMDEV_TESTING_CMD_MAGIC_HI_WORD; 249 cb = 4; 250 } 245 251 if (cb == 4) 246 252 { … … 324 330 case VMMDEV_TESTING_CMD_TERM: 325 331 case VMMDEV_TESTING_CMD_SUB_DONE: 332 if (cb == 2) 333 { 334 if (off == 0) 335 { 336 pThis->TestingData.Error.c = u32; 337 pThis->offTestingData = 2; 338 break; 339 } 340 if (off == 2) 341 { 342 u32 <<= 16; 343 u32 |= pThis->TestingData.Error.c & UINT16_MAX; 344 cb = 4; 345 off = 0; 346 } 347 else 348 break; 349 } 350 326 351 if ( off == 0 327 352 && cb == 4) … … 372 397 return VINF_SUCCESS; 373 398 } 399 if (cb == 2) 400 { 401 if (off == 0) 402 pThis->TestingData.Value.u64Value.Words.w0 = (uint16_t)u32; 403 else if (off == 2) 404 pThis->TestingData.Value.u64Value.Words.w1 = (uint16_t)u32; 405 else if (off == 4) 406 pThis->TestingData.Value.u64Value.Words.w2 = (uint16_t)u32; 407 else if (off == 6) 408 pThis->TestingData.Value.u64Value.Words.w3 = (uint16_t)u32; 409 else if (off == 8) 410 pThis->TestingData.Value.u32Unit = (uint16_t)u32; 411 else if (off == 10) 412 pThis->TestingData.Value.u32Unit = u32 << 16; 413 else 414 break; 415 pThis->offTestingData = off + 2; 416 return VINF_SUCCESS; 417 } 418 374 419 if ( off >= 12 375 420 && cb == 1
Note:
See TracChangeset
for help on using the changeset viewer.

