1 | /* $Id: VMMDevTesting.h 30736 2010-07-08 12:12:32Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VMMDev - Testing Extensions.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | #ifndef ___VBox_VMMDevTesting_h
|
---|
20 | #define ___VBox_VMMDevTesting_h
|
---|
21 |
|
---|
22 | #include <VBox/types.h>
|
---|
23 |
|
---|
24 | /** The base address of the MMIO range used for testing.
|
---|
25 | * This is intentionally put at the 2nd page above 1M so that it can be
|
---|
26 | * accessed from both real (!A20) and protected mode. */
|
---|
27 | #define VMMDEV_TESTING_MMIO_BASE UINT32_C(0x00101000)
|
---|
28 | /** The size of the MMIO range used for testing. */
|
---|
29 | #define VMMDEV_TESTING_MMIO_SIZE UINT32_C(0x00001000)
|
---|
30 | /** The NOP MMIO register - 124 RW. */
|
---|
31 | #define VMMDEV_TESTING_MMIO_NOP (VMMDEV_TESTING_MMIO_BASE + 0x000)
|
---|
32 | /** The XXX MMIO register - 124 RW. */
|
---|
33 | #define VMMDEV_TESTING_MMIO_TODO (VMMDEV_TESTING_MMIO_BASE + 0x004)
|
---|
34 | /** The real mode selector to use.
|
---|
35 | * @remarks Requires that the A20 gate is enabled. */
|
---|
36 | #define VMMDEV_TESTING_MMIO_RM_SEL 0xffff
|
---|
37 | /** Calculate the real mode offset of a MMIO register. */
|
---|
38 | #define VMMDEV_TESTING_MMIO_RM_OFF(val) ((val) - 0xffff0)
|
---|
39 |
|
---|
40 | /** The base port of the I/O range used for testing. */
|
---|
41 | #define VMMDEV_TESTING_IOPORT_BASE 0x0510
|
---|
42 | /** The number of I/O ports reserved for testing. */
|
---|
43 | #define VMMDEV_TESTING_IOPORT_COUNT 0x0010
|
---|
44 | /** The NOP I/O port - 124 RW. */
|
---|
45 | #define VMMDEV_TESTING_IOPORT_NOP (VMMDEV_TESTING_IOPORT_BASE + 0)
|
---|
46 | /** The low nanosecond timestamp - 4 RO. */
|
---|
47 | #define VMMDEV_TESTING_IOPORT_TS_LOW (VMMDEV_TESTING_IOPORT_BASE + 1)
|
---|
48 | /** The high nanosecond timestamp - 4 RO. Read this after the low one! */
|
---|
49 | #define VMMDEV_TESTING_IOPORT_TS_HIGH (VMMDEV_TESTING_IOPORT_BASE + 2)
|
---|
50 |
|
---|
51 | /** What the NOP accesses returns. */
|
---|
52 | #define VMMDEV_TESTING_NOP_RET UINT32_C(0x64726962) /* bird */
|
---|
53 |
|
---|
54 | #endif
|
---|
55 |
|
---|