move pcucontrol package into pcucontrol module.
[pcucontrol.git] / pcucontrol / models / intelamt / RemoteControlTypes.h
1 //----------------------------------------------------------------------------
2 //
3 //  Copyright (C) Intel Corporation, 2004 - 2006.
4 //
5 //  File:       RemoteControlTypes.h
6 //
7 //  Contents:   Sample code for an IntelĀ® AMT Network client.
8 //
9 //  Notes:      This file contains type definitions used throughout the code
10 //                              and constants as described in the "IntelĀ® AMT Network Design 
11 //                              Guide".
12 //
13 //----------------------------------------------------------------------------
14
15 #ifndef _REMOTE_CONTROL_TYPES__H_
16 #define _REMOTE_CONTROL_TYPES__H_
17
18 /*
19  * limits.h for UINT_MAX
20  */
21 #include <limits.h>
22
23 /*
24  * Type definitions
25  */
26 typedef unsigned char uint8;
27 typedef unsigned short uint16;
28 typedef unsigned int uint32;
29 typedef unsigned long long uint64;
30 typedef unsigned char BYTE;
31
32 /*
33  * Remote Control sample
34  * command line parameters
35  */
36 static const char *POWER = "-p";
37 static const char *CAPABILITIES = "-c";
38 static const char *REMOTE = "-r";
39 static const char *API_TEST = "-A";
40 static const char *REDUCED_API_TEST = "-B";
41 static const int MIN_NUM_OF_CL_PARAMETERS = 3;
42
43 /*
44  * Command line options
45  */
46 enum Options
47 {
48         // Remote Control sample options
49         OPT_POWER,
50         OPT_CAPABILITIES,
51         OPT_REMOTE,
52         OPT_API_TEST,
53         OPT_REDUCED_API_TEST,
54 };
55
56 /*
57  * Constants
58  */
59 static const uint32 NO_VALUE = UINT_MAX;
60
61 /* 
62  * Remote control commands
63  */
64 enum RemoteControlCommand
65 {
66         Reset           = 16, //0x10
67         PowerUp         = 17, //0x11
68         PowerDown       = 18, //0x12
69         PowerCycleReset = 19, //0x13
70         SetBootOptions  = 33, //0x21
71 };
72
73 /*
74  * Special commands
75  */
76 enum SpecialCommand
77 {
78
79         NOP                         = 0, // 0x00
80         ForcePxeBoot                = 1, // 0x01
81         ForceHardDriveBoot          = 2, // 0x02
82         ForceHardDriveSafeModeBoot  = 3, // 0x03
83         ForceDiagnosticsBoot        = 4, // 0x04
84         ForceCdOrDvdBoot            = 5, // 0x05
85         // 06h-0BFh Reserved for future ASF definition 
86         IntelOemCommand             = 193, // 0x0C1
87         // 0C1h-0FFh Reserved FOR OEM 
88 }; 
89
90 /*
91  * Standard boot options
92  *
93  * Following boot options can be defined by using the bitwise OR operator. 
94  * For example: 
95  * unsigned short bootOptions = LockPowerButton | LockKeyboard | FirmwareVerbosityVerbose
96  */
97 enum BootOptions
98 {
99
100         LockPowerButton     = 2,        // 1 << 1
101         LockResetButton     = 4,        // 1 << 2
102         LockKeyboard        = 32,       // 1 << 5
103         LockSleepButton     = 64,       // 1 << 6
104         UserPasswordBypass  = 2048,     // 1 << 11 
105         ForceProgressEvents = 4096,     // 1 << 12
106
107         // only one from the Firmware verbosity options can be used
108         FirmwareVerbositySystemDefault  = 0,     // system default
109         FirmwareVerbosityQuiet          = 8192,  // 1 << 13 minimal screen activity
110         FirmwareVerbosityVerbose        = 16384, // 1 << 14 all messages appear on the screen
111         FirmwareVerbosityScreen         = 24576, // 3 << 13 blank, no messages appear on the screen.
112
113         ConfigurationDataReset          = 32768, // 1 << 14
114 };
115
116 /*
117  * Reserved bits for checking
118  * correctness of the Boot Options settings
119  */
120 const uint32 BootOptionsReservedBits = 1817;
121
122
123 /*
124  * Special Command Parameters
125  *
126  * Following boot options can be defined by using the bitwise OR operator. 
127  * For example: 
128  * unsigned short specialCommParam = UseIderCD | ReflashBios
129  */
130 enum SpecialCommandParameters
131 {
132     UndefinedSpecialCommandParameter = 0,
133         UseIderFloppy   = 1,   // use floppy as IDER boot device
134         ReflashBios     = 4,   // 1 << 2
135         BiosSetup       = 8,   // 1 << 3
136         BiosPause       = 16,  // 1 << 4
137         UseIderCD               = 257, // 1 | (1 << 8) use CD/DVD as IDER boot device
138 };
139
140 /*
141  * Reserved bits for checking
142  * correctness of the Special Parameters settings
143  */
144 const uint32 SpecialCommandParametersReservedBits = 65248;
145
146 /*
147  * OEM Parameters - Intel(R) AMT proprietary boot options
148  */
149 enum OEMParameters
150 {
151     UndefinedOEMParameter = 0,
152         UseSol          = 1,   // 1 << 1
153 };
154
155 /*
156  * IANA numbers
157  */
158 enum IanaNumbers
159 {
160         IntelIanaNumber = 343,
161         ASFIanaNumber   = 4542,
162 };
163
164
165 /*
166  * The remote control capabilities supported by the Intel(R) AMT:
167  *
168  * OEM defined capabilities
169  */
170 enum OemDefinedCapabilitiesSupported
171 {
172         SuppIDER        = 1,
173         SuppSOL         = 2,
174         SuppBiosReflash = 4,
175         SuppBiosSetup   = 8,
176         SuppBiosPause   = 16,
177
178 };
179
180 /*
181  * System capabilities
182  */
183 enum SystemCapabilitiesSupported
184 {
185         SuppPowerCycleReset  = 1,
186         SuppPowerDown        = 2,
187         SuppPowerUp          = 4,
188         SuppReset            = 8,
189 };
190
191 /*
192  * Special commands
193  */
194 enum SpecialCommandSupported
195 {
196         SuppForcePXEBoot                = 256,
197         SuppForceHardDriveBoot          = 512,
198         SuppForceHardDriveSafeModeBoot  = 1024,
199         SuppForceDiagnosticBoot         = 2048,
200         SuppForceCDorDVDBoot            = 4096,
201 };
202
203
204 /*
205  * System Firmware capabilities
206  */
207 enum SystemFirmwareCapabilitiesSupported
208 {
209         SuppVerbosityScreenBlank    = 1,
210         SuppPowerButtonLock         = 2,
211         SuppResetButtonLock         = 4,
212         SuppKeyboardLock            = 32,
213         SuppSleepButtonLock         = 64,
214         SuppUserPasswordBypass      = 2048,
215         SuppForcedProgressEvents    = 4096,
216         SuppVerbosityVerbose        = 8192,
217         SuppVerbosityQuiet          = 16384,
218         SuppConfigurationDataReset  = 32768,
219 };
220
221 #endif // _REMOTE_CONTROL_TYPES__H_
222