VirtualBox

Ignore:
Timestamp:
Aug 3, 2021 9:22:13 PM (3 years ago)
Author:
vboxsync
Message:

VMMDevTesting,bs3-locking-1: Expanded the locking test port to two ports, incorporating read/write CS and a EMT hold interval. bugref:6695

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-locking-1.c

    r90474 r90503  
    4242    const char * BS3_FAR    pszName;
    4343    uint32_t                cInnerLoops;
    44     uint32_t                uCtrlWord;
     44    uint32_t                uCtrlLo;
     45    uint32_t                uCtrlHi;
    4546} g_aLockingTests[] =
    4647{
    4748    {
    48         "Contention 500us/250us",
     49        "Contention 500us/250us/64k",
    4950        2000 + 16384,
    50         500 | (UINT32_C(250) << VMMDEV_TESTING_LOCKED_WAIT_SHIFT)
     51        500 | (UINT32_C(250) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     52        64 | VMMDEV_TESTING_LOCKED_HI_ENABLED,
    5153    },
    5254    {
    53         "Contention 100us/50us",
     55        "Contention 100us/50us/8k",
    5456        10000 + 4096,
    55         100 | (UINT32_C(50)  << VMMDEV_TESTING_LOCKED_WAIT_SHIFT)
     57        100 | (UINT32_C(50) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     58        8 | VMMDEV_TESTING_LOCKED_HI_ENABLED,
    5659    },
    5760    {
    58         "Contention 500us/250us poke",
    59         2000 + 16384,
    60         500 | (UINT32_C(250) << VMMDEV_TESTING_LOCKED_WAIT_SHIFT) | VMMDEV_TESTING_LOCKED_POKE
     61        "Contention 10us/1us/0k",
     62        16384 + 4096,
     63        10 | (UINT32_C(1) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     64        0 | VMMDEV_TESTING_LOCKED_HI_ENABLED,
    6165    },
    6266    {
    63         "Contention 100us/50us poke",
    64         10000 + 4096,
    65         100 | (UINT32_C(50)  << VMMDEV_TESTING_LOCKED_WAIT_SHIFT) | VMMDEV_TESTING_LOCKED_POKE
     67        "Contention 500us/250us/64k poke",
     68        2000 + 16384,
     69        500 | (UINT32_C(250) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     70        64 | VMMDEV_TESTING_LOCKED_HI_ENABLED | VMMDEV_TESTING_LOCKED_HI_POKE,
    6671    },
    6772    {
    68         "Contention 500us/250us poke void",
    69         2000 + 16384,
    70         500 | (UINT32_C(250) << VMMDEV_TESTING_LOCKED_WAIT_SHIFT) | VMMDEV_TESTING_LOCKED_POKE | VMMDEV_TESTING_LOCKED_BUSY_SUCCESS
     73        "Contention 100us/50us/1k poke",
     74        10000 + 4096,
     75        100 | (UINT32_C(50) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     76        1 | VMMDEV_TESTING_LOCKED_HI_ENABLED | VMMDEV_TESTING_LOCKED_HI_POKE,
    7177    },
    7278    {
    73         "Contention 50us/25us poke void",
     79        "Contention 500us/250us/64k poke void",
     80        2000 + 16384,
     81        500 | (UINT32_C(250) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     82        64 | VMMDEV_TESTING_LOCKED_HI_POKE | VMMDEV_TESTING_LOCKED_HI_BUSY_SUCCESS
     83    },
     84    {
     85        "Contention 50us/25us/8k poke void",
    7486        20000 + 4096,
    75         50 | (UINT32_C(25)  << VMMDEV_TESTING_LOCKED_WAIT_SHIFT) | VMMDEV_TESTING_LOCKED_POKE | VMMDEV_TESTING_LOCKED_BUSY_SUCCESS
     87        50 | (UINT32_C(25) << VMMDEV_TESTING_LOCKED_LO_WAIT_SHIFT),
     88        1 | VMMDEV_TESTING_LOCKED_HI_POKE | VMMDEV_TESTING_LOCKED_HI_BUSY_SUCCESS
    7689    },
    7790};
     
    98111
    99112        Bs3TestSub(g_aLockingTests[i].pszName);
    100         ASMOutU32(VMMDEV_TESTING_IOPORT_LOCKED, g_aLockingTests[i].uCtrlWord);
     113        ASMOutU32(VMMDEV_TESTING_IOPORT_LOCKED_LO, g_aLockingTests[i].uCtrlLo);
     114        ASMOutU32(VMMDEV_TESTING_IOPORT_LOCKED_HI, g_aLockingTests[i].uCtrlHi);
    101115
    102116        for (j = 0; j < _2M && cTotal < _1G; j++)
     
    107121            cTotal += iInner;
    108122            while (iInner-- > 0)
    109                 ASMInU32(VMMDEV_TESTING_IOPORT_LOCKED);
     123                ASMInU32(VMMDEV_TESTING_IOPORT_LOCKED_LO);
    110124
    111125            cNsElapsed = Bs3TestNow() - nsStart;
     
    115129
    116130        /* Disable locking. */
    117         ASMOutU32(VMMDEV_TESTING_IOPORT_LOCKED, 0);
     131        ASMOutU32(VMMDEV_TESTING_IOPORT_LOCKED_HI, 0);
    118132
    119133        Bs3TestValue("Loops", cTotal, VMMDEV_TESTING_UNIT_OCCURRENCES);
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