1 | /**********************************************************
|
---|
2 | * Copyright 1998-2009 VMware, Inc. All rights reserved.
|
---|
3 | *
|
---|
4 | * Permission is hereby granted, free of charge, to any person
|
---|
5 | * obtaining a copy of this software and associated documentation
|
---|
6 | * files (the "Software"), to deal in the Software without
|
---|
7 | * restriction, including without limitation the rights to use, copy,
|
---|
8 | * modify, merge, publish, distribute, sublicense, and/or sell copies
|
---|
9 | * of the Software, and to permit persons to whom the Software is
|
---|
10 | * furnished to do so, subject to the following conditions:
|
---|
11 | *
|
---|
12 | * The above copyright notice and this permission notice shall be
|
---|
13 | * included in all copies or substantial portions of the Software.
|
---|
14 | *
|
---|
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
---|
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
---|
19 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
---|
20 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
21 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
---|
22 | * SOFTWARE.
|
---|
23 | *
|
---|
24 | **********************************************************/
|
---|
25 |
|
---|
26 | /*
|
---|
27 | * backdoor_def.h --
|
---|
28 | *
|
---|
29 | * This contains constants that define the backdoor I/O port, a
|
---|
30 | * simple hypercall mechanism that is used by VMware Tools.
|
---|
31 | */
|
---|
32 |
|
---|
33 |
|
---|
34 | #ifndef _BACKDOOR_DEF_H_
|
---|
35 | #define _BACKDOOR_DEF_H_
|
---|
36 |
|
---|
37 | #define BDOOR_MAGIC 0x564D5868
|
---|
38 |
|
---|
39 | #define BDOOR_PORT 0x5658
|
---|
40 |
|
---|
41 | #define BDOOR_CMD_GETMHZ 1
|
---|
42 | #define BDOOR_CMD_APMFUNCTION 2
|
---|
43 | #define BDOOR_CMD_GETDISKGEO 3
|
---|
44 | #define BDOOR_CMD_GETPTRLOCATION 4
|
---|
45 | #define BDOOR_CMD_SETPTRLOCATION 5
|
---|
46 | #define BDOOR_CMD_GETSELLENGTH 6
|
---|
47 | #define BDOOR_CMD_GETNEXTPIECE 7
|
---|
48 | #define BDOOR_CMD_SETSELLENGTH 8
|
---|
49 | #define BDOOR_CMD_SETNEXTPIECE 9
|
---|
50 | #define BDOOR_CMD_GETVERSION 10
|
---|
51 | #define BDOOR_CMD_GETDEVICELISTELEMENT 11
|
---|
52 | #define BDOOR_CMD_TOGGLEDEVICE 12
|
---|
53 | #define BDOOR_CMD_GETGUIOPTIONS 13
|
---|
54 | #define BDOOR_CMD_SETGUIOPTIONS 14
|
---|
55 | #define BDOOR_CMD_GETSCREENSIZE 15
|
---|
56 | #define BDOOR_CMD_MONITOR_CONTROL 16
|
---|
57 | #define BDOOR_CMD_GETHWVERSION 17
|
---|
58 | #define BDOOR_CMD_OSNOTFOUND 18
|
---|
59 | #define BDOOR_CMD_GETUUID 19
|
---|
60 | #define BDOOR_CMD_GETMEMSIZE 20
|
---|
61 | #define BDOOR_CMD_HOSTCOPY 21 /* Devel only */
|
---|
62 | #define BDOOR_CMD_SERVICE_VM 22 /* prototype only */
|
---|
63 | #define BDOOR_CMD_GETTIME 23 /* Deprecated. Use GETTIMEFULL. */
|
---|
64 | #define BDOOR_CMD_STOPCATCHUP 24
|
---|
65 | #define BDOOR_CMD_PUTCHR 25 /* Devel only */
|
---|
66 | #define BDOOR_CMD_ENABLE_MSG 26 /* Devel only */
|
---|
67 | #define BDOOR_CMD_GOTO_TCL 27 /* Devel only */
|
---|
68 | #define BDOOR_CMD_INITPCIOPROM 28
|
---|
69 | #define BDOOR_CMD_INT13 29
|
---|
70 | #define BDOOR_CMD_MESSAGE 30
|
---|
71 | #define BDOOR_CMD_RSVD0 31
|
---|
72 | #define BDOOR_CMD_RSVD1 32
|
---|
73 | #define BDOOR_CMD_RSVD2 33
|
---|
74 | #define BDOOR_CMD_ISACPIDISABLED 34
|
---|
75 | #define BDOOR_CMD_TOE 35 /* Not in use */
|
---|
76 | #define BDOOR_CMD_ISMOUSEABSOLUTE 36
|
---|
77 | #define BDOOR_CMD_PATCH_SMBIOS_STRUCTS 37
|
---|
78 | #define BDOOR_CMD_MAPMEM 38 /* Devel only */
|
---|
79 | #define BDOOR_CMD_ABSPOINTER_DATA 39
|
---|
80 | #define BDOOR_CMD_ABSPOINTER_STATUS 40
|
---|
81 | #define BDOOR_CMD_ABSPOINTER_COMMAND 41
|
---|
82 | #define BDOOR_CMD_TIMER_SPONGE 42
|
---|
83 | #define BDOOR_CMD_PATCH_ACPI_TABLES 43
|
---|
84 | #define BDOOR_CMD_DEVEL_FAKEHARDWARE 44 /* Debug only - needed in beta */
|
---|
85 | #define BDOOR_CMD_GETHZ 45
|
---|
86 | #define BDOOR_CMD_GETTIMEFULL 46
|
---|
87 | #define BDOOR_CMD_STATELOGGER 47
|
---|
88 | #define BDOOR_CMD_CHECKFORCEBIOSSETUP 48
|
---|
89 | #define BDOOR_CMD_LAZYTIMEREMULATION 49
|
---|
90 | #define BDOOR_CMD_BIOSBBS 50
|
---|
91 | #define BDOOR_CMD_VASSERT 51
|
---|
92 | #define BDOOR_CMD_ISGOSDARWIN 52
|
---|
93 | #define BDOOR_CMD_DEBUGEVENT 53
|
---|
94 | #define BDOOR_CMD_OSNOTMACOSXSERVER 54
|
---|
95 | #define BDOOR_CMD_GETTIMEFULL_WITH_LAG 55
|
---|
96 | #define BDOOR_CMD_ACPI_HOTPLUG_DEVICE 56
|
---|
97 | #define BDOOR_CMD_ACPI_HOTPLUG_MEMORY 57
|
---|
98 | #define BDOOR_CMD_ACPI_HOTPLUG_CBRET 58
|
---|
99 | #define BDOOR_CMD_GET_HOST_VIDEO_MODES 59
|
---|
100 | #define BDOOR_CMD_ACPI_HOTPLUG_CPU 60
|
---|
101 | #define BDOOR_CMD_MAX 61
|
---|
102 |
|
---|
103 | /*
|
---|
104 | * High-bandwidth backdoor port.
|
---|
105 | */
|
---|
106 |
|
---|
107 | #define BDOORHB_PORT 0x5659
|
---|
108 |
|
---|
109 | #define BDOORHB_CMD_MESSAGE 0
|
---|
110 | #define BDOORHB_CMD_VASSERT 1
|
---|
111 | #define BDOORHB_CMD_MAX 2
|
---|
112 |
|
---|
113 | /*
|
---|
114 | * There is another backdoor which allows access to certain TSC-related
|
---|
115 | * values using otherwise illegal PMC indices when the pseudo_perfctr
|
---|
116 | * control flag is set.
|
---|
117 | */
|
---|
118 |
|
---|
119 | #define BDOOR_PMC_HW_TSC 0x10000
|
---|
120 | #define BDOOR_PMC_REAL_NS 0x10001
|
---|
121 | #define BDOOR_PMC_APPARENT_NS 0x10002
|
---|
122 |
|
---|
123 | #define IS_BDOOR_PMC(index) (((index) | 3) == 0x10003)
|
---|
124 | #define BDOOR_CMD(ecx) ((ecx) & 0xffff)
|
---|
125 |
|
---|
126 | #endif /* _BACKDOOR_DEF_H_ */
|
---|