VMMDevTesting.h revision da76e955a98bc0c8a04904c8803159043dd6956d
/* $Id$ */
/** @file
* VMMDev - Testing Extensions.
*/
/*
* Copyright (C) 2010-2015 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___VBox_VMMDevTesting_h
#define ___VBox_VMMDevTesting_h
/** The base address of the MMIO range used for testing.
* This is intentionally put at the 2nd page above 1M so that it can be
* accessed from both real (!A20) and protected mode. */
/** The size of the MMIO range used for testing. */
/** The NOP MMIO register - 1248 RW. */
/** The go-to-ring-3-NOP MMIO register - 1248 RW. */
/** The real mode selector to use.
* @remarks Requires that the A20 gate is enabled. */
#define VMMDEV_TESTING_MMIO_RM_SEL 0xffff
/** Calculate the real mode offset of a MMIO register. */
/** The base port of the I/O range used for testing. */
#define VMMDEV_TESTING_IOPORT_BASE 0x0510
/** The number of I/O ports reserved for testing. */
#define VMMDEV_TESTING_IOPORT_COUNT 0x0010
/** The NOP I/O port - 1,2,4 RW. */
#define VMMDEV_TESTING_IOPORT_NOP (VMMDEV_TESTING_IOPORT_BASE + 0)
/** The low nanosecond timestamp - 4 RO. */
/** The high nanosecond timestamp - 4 RO. Read this after the low one! */
/** Command register usually used for preparing the data register - 4 WO. */
/** Data register which use depends on the current command - 1s, 4 WO. */
/** The go-to-ring-3-NOP I/O port - 1,2,4 RW. */
/** @name Commands.
* @{ */
/** Initialize test, sending name (zero terminated string). (RTTestCreate) */
/** Test done, no data. (RTTestSummaryAndDestroy) */
/** Start a new sub-test, sending name (zero terminated string). (RTTestSub) */
/** Sub-test is done, sending 32-bit error count for it. (RTTestDone) */
/** Report a failure, sending reason (zero terminated string). (RTTestFailed) */
/** Report a value, sending the 64-bit value (2x4), the 32-bit unit (4), and
* finally the name (zero terminated string). (RTTestValue) */
/** Report a failure, sending reason (zero terminated string). (RTTestSkipped) */
/** Report a value found in a VMM register, sending a string on the form
* "value-name:register-name". */
/** @} */
/** @name Value units
* @{ */
/** @} */
/** What the NOP accesses returns. */
#endif