VirtualBox

Changeset 30772 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jul 10, 2010 4:58:28 AM (15 years ago)
Author:
vboxsync
Message:

VMMDevTesting/test1: Report the results to the host via a RTTest* like framework.

Location:
trunk/include/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VMMDevTesting.h

    r30736 r30772  
    4242/** The number of I/O ports reserved for testing. */
    4343#define VMMDEV_TESTING_IOPORT_COUNT     0x0010
    44 /** The NOP I/O port - 124 RW. */
     44/** The NOP I/O port - 1,2,4 RW. */
    4545#define VMMDEV_TESTING_IOPORT_NOP       (VMMDEV_TESTING_IOPORT_BASE + 0)
    4646/** The low nanosecond timestamp - 4 RO.  */
     
    4848/** The high nanosecond timestamp - 4 RO.  Read this after the low one!  */
    4949#define VMMDEV_TESTING_IOPORT_TS_HIGH   (VMMDEV_TESTING_IOPORT_BASE + 2)
     50/** Command register usually used for preparing the data register - 4 WO. */
     51#define VMMDEV_TESTING_IOPORT_CMD       (VMMDEV_TESTING_IOPORT_BASE + 3)
     52/** Data register which use depends on the current command - 1s, 4 WO. */
     53#define VMMDEV_TESTING_IOPORT_DATA      (VMMDEV_TESTING_IOPORT_BASE + 4)
     54
     55/** @name Commands.
     56 * @{ */
     57/** Initialize test, sending name (zero terminated string). (RTTestCreate) */
     58#define VMMDEV_TESTING_CMD_INIT         UINT32_C(0xcab1e000)
     59/** Test done, no data. (RTTestSummaryAndDestroy) */
     60#define VMMDEV_TESTING_CMD_TERM         UINT32_C(0xcab1e001)
     61/** Start a new sub-test, sending name (zero terminated string). (RTTestSub) */
     62#define VMMDEV_TESTING_CMD_SUB_NEW      UINT32_C(0xcab1e002)
     63/** Sub-test is done, sending 32-bit error count for it. (RTTestDone) */
     64#define VMMDEV_TESTING_CMD_SUB_DONE     UINT32_C(0xcab1e003)
     65/** Report a failure, sending reason (zero terminated string). (RTTestFailed) */
     66#define VMMDEV_TESTING_CMD_FAILED       UINT32_C(0xcab1e004)
     67/** Report a value, sending the 64-bit value (2x4), the 32-bit unit (4), and
     68 * finally the name (zero terminated string).  (RTTestValue) */
     69#define VMMDEV_TESTING_CMD_VALUE        UINT32_C(0xcab1e005)
     70/** @} */
     71
     72/** @name Value units
     73 * @{ */
     74#define VMMDEV_TESTING_UNIT_PCT                 UINT8_C(0x01)   /**< Percentage. */
     75#define VMMDEV_TESTING_UNIT_BYTES               UINT8_C(0x02)   /**< Bytes. */
     76#define VMMDEV_TESTING_UNIT_BYTES_PER_SEC       UINT8_C(0x03)   /**< Bytes per second. */
     77#define VMMDEV_TESTING_UNIT_KILOBYTES           UINT8_C(0x04)   /**< Kilobytes. */
     78#define VMMDEV_TESTING_UNIT_KILOBYTES_PER_SEC   UINT8_C(0x05)   /**< Kilobytes per second. */
     79#define VMMDEV_TESTING_UNIT_MEGABYTES           UINT8_C(0x06)   /**< Megabytes. */
     80#define VMMDEV_TESTING_UNIT_MEGABYTES_PER_SEC   UINT8_C(0x07)   /**< Megabytes per second. */
     81#define VMMDEV_TESTING_UNIT_PACKETS             UINT8_C(0x08)   /**< Packets. */
     82#define VMMDEV_TESTING_UNIT_PACKETS_PER_SEC     UINT8_C(0x09)   /**< Packets per second. */
     83#define VMMDEV_TESTING_UNIT_FRAMES              UINT8_C(0x0a)   /**< Frames. */
     84#define VMMDEV_TESTING_UNIT_FRAMES_PER_SEC      UINT8_C(0x0b)   /**< Frames per second. */
     85#define VMMDEV_TESTING_UNIT_OCCURRENCES         UINT8_C(0x0c)   /**< Occurrences. */
     86#define VMMDEV_TESTING_UNIT_OCCURRENCES_PER_SEC UINT8_C(0x0d)   /**< Occurrences per second. */
     87#define VMMDEV_TESTING_UNIT_CALLS               UINT8_C(0x0e)   /**< Calls. */
     88#define VMMDEV_TESTING_UNIT_CALLS_PER_SEC       UINT8_C(0x0f)   /**< Calls per second. */
     89#define VMMDEV_TESTING_UNIT_ROUND_TRIP          UINT8_C(0x10)   /**< Round trips. */
     90#define VMMDEV_TESTING_UNIT_SECS                UINT8_C(0x11)   /**< Seconds. */
     91#define VMMDEV_TESTING_UNIT_MS                  UINT8_C(0x12)   /**< Milliseconds. */
     92#define VMMDEV_TESTING_UNIT_NS                  UINT8_C(0x13)   /**< Nanoseconds. */
     93#define VMMDEV_TESTING_UNIT_NS_PER_CALL         UINT8_C(0x14)   /**< Nanoseconds per call. */
     94#define VMMDEV_TESTING_UNIT_NS_PER_FRAME        UINT8_C(0x15)   /**< Nanoseconds per frame. */
     95#define VMMDEV_TESTING_UNIT_NS_PER_OCCURRENCE   UINT8_C(0x16)   /**< Nanoseconds per occurrence. */
     96#define VMMDEV_TESTING_UNIT_NS_PER_PACKET       UINT8_C(0x17)   /**< Nanoseconds per frame. */
     97#define VMMDEV_TESTING_UNIT_NS_PER_ROUND_TRIP   UINT8_C(0x18)   /**< Nanoseconds per round trip. */
     98#define VMMDEV_TESTING_UNIT_INSTRS              UINT8_C(0x19)   /**< Instructions. */
     99#define VMMDEV_TESTING_UNIT_INSTRS_PER_SEC      UINT8_C(0x1a)   /**< Instructions per second. */
     100/** @}  */
     101
    50102
    51103/** What the NOP accesses returns. */
  • trunk/include/VBox/VMMDevTesting.mac

    r30736 r30772  
    1212%define VMMDEV_TESTING_IOPORT_TS_LOW    (VMMDEV_TESTING_IOPORT_BASE + 1)
    1313%define VMMDEV_TESTING_IOPORT_TS_HIGH   (VMMDEV_TESTING_IOPORT_BASE + 2)
     14%define VMMDEV_TESTING_IOPORT_CMD       (VMMDEV_TESTING_IOPORT_BASE + 3)
     15%define VMMDEV_TESTING_IOPORT_DATA      (VMMDEV_TESTING_IOPORT_BASE + 4)
     16%define VMMDEV_TESTING_CMD_INIT         0xcab1e000
     17%define VMMDEV_TESTING_CMD_TERM         0xcab1e001
     18%define VMMDEV_TESTING_CMD_SUB_NEW      0xcab1e002
     19%define VMMDEV_TESTING_CMD_SUB_DONE     0xcab1e003
     20%define VMMDEV_TESTING_CMD_FAILED       0xcab1e004
     21%define VMMDEV_TESTING_CMD_VALUE        0xcab1e005
     22%define VMMDEV_TESTING_UNIT_PCT                 0x01
     23%define VMMDEV_TESTING_UNIT_BYTES               0x02
     24%define VMMDEV_TESTING_UNIT_BYTES_PER_SEC       0x03
     25%define VMMDEV_TESTING_UNIT_KILOBYTES           0x04
     26%define VMMDEV_TESTING_UNIT_KILOBYTES_PER_SEC   0x05
     27%define VMMDEV_TESTING_UNIT_MEGABYTES           0x06
     28%define VMMDEV_TESTING_UNIT_MEGABYTES_PER_SEC   0x07
     29%define VMMDEV_TESTING_UNIT_PACKETS             0x08
     30%define VMMDEV_TESTING_UNIT_PACKETS_PER_SEC     0x09
     31%define VMMDEV_TESTING_UNIT_FRAMES              0x0a
     32%define VMMDEV_TESTING_UNIT_FRAMES_PER_SEC      0x0b
     33%define VMMDEV_TESTING_UNIT_OCCURRENCES         0x0c
     34%define VMMDEV_TESTING_UNIT_OCCURRENCES_PER_SEC 0x0d
     35%define VMMDEV_TESTING_UNIT_CALLS               0x0e
     36%define VMMDEV_TESTING_UNIT_CALLS_PER_SEC       0x0f
     37%define VMMDEV_TESTING_UNIT_ROUND_TRIP          0x10
     38%define VMMDEV_TESTING_UNIT_SECS                0x11
     39%define VMMDEV_TESTING_UNIT_MS                  0x12
     40%define VMMDEV_TESTING_UNIT_NS                  0x13
     41%define VMMDEV_TESTING_UNIT_NS_PER_CALL         0x14
     42%define VMMDEV_TESTING_UNIT_NS_PER_FRAME        0x15
     43%define VMMDEV_TESTING_UNIT_NS_PER_OCCURRENCE   0x16
     44%define VMMDEV_TESTING_UNIT_NS_PER_PACKET       0x17
     45%define VMMDEV_TESTING_UNIT_NS_PER_ROUND_TRIP   0x18
     46%define VMMDEV_TESTING_UNIT_INSTRS              0x19
     47%define VMMDEV_TESTING_UNIT_INSTRS_PER_SEC      0x1a
    1448%define VMMDEV_TESTING_NOP_RET          0x64726962
    1549%endif
  • trunk/include/VBox/various.sed

    r30736 r30772  
    4848s/UINT32_C([[:space:]]*\(0[xX][0-9a-fA-F][0-9a-fA-F]*\)[[:space:]]*)/\1/
    4949s/UINT32_C([[:space:]]*\([0-9][0-9]*\)[[:space:]]*)/\1/
     50s/UINT16_C([[:space:]]*\(0[xX][0-9a-fA-F][0-9a-fA-F]*\)[[:space:]]*)/\1/
     51s/UINT16_C([[:space:]]*\([0-9][0-9]*\)[[:space:]]*)/\1/
     52s/UINT8_C([[:space:]]*\(0[xX][0-9a-fA-F][0-9a-fA-F]*\)[[:space:]]*)/\1/
     53s/UINT8_C([[:space:]]*\([0-9][0-9]*\)[[:space:]]*)/\1/
    5054
    5155b end
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette