summaryrefslogtreecommitdiff
path: root/ReferenceCode/ME/Library/AMT/Dxe/AmtLib.h
blob: b89ae0ad0c37728403d4849d45ed7e86551ede37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
/** @file
  Header file for AMT functionality

@copyright
  Copyright (c) 2006 - 2012 Intel Corporation. All rights reserved
  This software and associated documentation (if any) is furnished
  under a license and may only be used or copied in accordance
  with the terms of the license. Except as permitted by such
  license, no part of this software or documentation may be
  reproduced, stored in a retrieval system, or transmitted in any
  form or by any means without the express written consent of
  Intel Corporation.

  This file contains an 'Intel Peripheral Driver' and uniquely
  identified as "Intel Reference Module" and is
  licensed for Intel CPUs and chipsets under the terms of your
  license agreement with Intel or your vendor.  This file may
  be modified by the user, subject to additional terms of the
  license agreement
**/
#ifndef _AMT_LIB_H_
#define _AMT_LIB_H_

#include "AmtPolicyLib.h"

//
// ASF Message
//
#define EFI_ASF_START_WDT_VERSION                         0x10
#define EFI_ASF_STOP_WDT_VERSION                          0x10

#define EFI_ASF_MESSAGE_COMMAND_SENSE_DEVICE_SYSTEM_STATE 0x01
#define EFI_ASF_MESSAGE_COMMAND_MANAGEMENT_CONTROL        0x02
#define EFI_ASF_MESSAGE_COMMAND_ASF_CONFIGURATION         0x03
#define EFI_ASF_MESSAGE_COMMAND_MESSAGE                   0x04
#define EFI_ASF_MESSAGE_COMMAND_GETUUID                   0xC7

//
// HECI ASF Command
//
#define EFI_ASF_START_WDT_BYTE_COUNT                      0x0F
#define EFI_ASF_START_WDT_VERSION_NUMBER                  0x10
#define EFI_ASF_START_WDT_EVENT_SENSOR_TYPE               0x23
#define EFI_ASF_START_WDT_EVENT_TYPE                      0x6F
#define EFI_ASF_START_WDT_EVENT_OFFSET                    0x00
#define EFI_ASF_START_WDT_EVENT_SOURCE_TYPE_OS            0x48
#define EFI_ASF_START_WDT_EVENT_SOURCE_TYPE_BIOS          0x00
#define EFI_ASF_START_WDT_EVENT_SOURCE_TYPE               0x00  ///< 0x00 - BIOs, 0x48 - OS
#define EFI_ASF_START_WDT_EVENT_SEVERITY                  0x10  ///< critical
#define EFI_ASF_START_WDT_SENSOR_DEVICE                   0xFF  ///< unspecified
#define EFI_ASF_START_WDT_SENSOR_NUMBER                   0xFF  ///< unspecified
#define EFI_ASF_START_WDT_ENTITY                          0x00  ///< unspecified
#define EFI_ASF_START_WDT_ENTITY_INSTANCE                 0x00  ///< unspecified
#define EFI_ASF_START_WDT_EVENT_DATA_BYTE_0               0x40
#define EFI_ASF_START_WDT_EVENT_DATA_BYTE_1               0x02  ///< 0x02 BIOS POST WDT Timeout, 0x04 OS WDT timeout
#define EFI_ASF_START_WDT_EVENT_DATA_BYTE_1_BIOS_TIMEOUT  0x02
#define EFI_ASF_START_WDT_EVENT_DATA_BYTE_1_OS_TIMEOUT    0x04

#define EFI_ASF_STOP_WDT_BYTE_COUNT                       0x02

#define ASF_START_BIOS_WDT  0
#define ASF_START_OS_WDT    1

/**
  Check if Asf is enabled in setup options.

  @param[in] None.
  @retval EFI_SUCCESS             mActiveManagement is not NULL
  @retval                         Error Status code returned by
                                  LocateProtocol.
**/
EFI_STATUS
AmtLibInit (
  VOID
  )
;

/**
  This will return IDE Redirection Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    IDE-R is enabled.
  @retval False                   IDE-R is disabled.
**/
BOOLEAN
ActiveManagementEnableIdeR (
  VOID
  )
;

/**
  This will return Enforce Secure Boot over IDER Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    Enforce Secure Boot is enabled.
  @retval False                   Enforce Secure Boot is disabled.
**/
BOOLEAN
ActiveManagementEnforceSecureBoot (
  VOID
  )
;

/**
  This will return BIOS Pause Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    BIOS Pause is enabled.
  @retval False                   BIOS Pause is disabled.
**/
BOOLEAN
ActiveManagementPauseBoot (
  VOID
  )
;

/**
  This will return BIOS Setup Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    BIOS Setup is enabled.
  @retval False                   BIOS Setup is disabled.
**/
BOOLEAN
ActiveManagementEnterSetup (
  VOID
  )
;

/**
  This will return Serial-over-Lan Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    Console Lock is enabled.
  @retval False                   Console Lock is disabled.
**/
BOOLEAN
ActiveManagementConsoleLocked (
  VOID
  )
;

/**
  This will return KVM Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    KVM is enabled.
  @retval False                   KVM is disabled.
**/
BOOLEAN
ActiveManagementEnableKvm (
  VOID
  )
;

/**
  This will return Serial-over-Lan Boot Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    Serial-over-Lan is enabled.
  @retval False                   Serial-over-Lan is disabled.
**/
BOOLEAN
ActiveManagementEnableSol (
  VOID
  )
;

/**
  This will return IDE Redirection boot device index to boot

  @param[in] None.

  @retval IdeBootDevice           Return the boot device number to boot
                                  Bits 0-1: If IDER boot is selected in Perimeter 1 then Bits 1,2 define the drive on the IDER controller to be used as the boot driver.
                                  Bit 1  Bit0
                                   0    0    Primary Master Drive
                                   0    1    Primary Slave Drive
                                   1    0    Secondary Master Drive
                                   1    1    Secondary Slave Drive
                                  Bits 2-7: Reserved set to 0
**/
UINT8
ActiveManagementIderBootDeviceGet (
  VOID
  )
;

/**
  Stop ASF Watch Dog Timer

  @param[in] None.

  @retval None
**/
VOID
AsfStopWatchDog (
  VOID
  )
;

/**
  Start ASF Watch Dog Timer

  @param[in] WatchDogType         Which kind of WatchDog, ASF OS WatchDog Timer setting or ASF BIOS WatchDog Timer setting

  @retval None
**/
VOID
AsfStartWatchDog (
  IN  UINT8                       WatchDogType
  )
;

/**
  This will return progress event Option.
  True if the option is enabled.

  @param[in] None.

  @retval True                    progress event is enabled.
  @retval False                   progress event is disabled.
**/
BOOLEAN
ActiveManagementFwProgress (
  VOID
  )
;

/**
  Sent initialize KVM message

  @param[in] None.

  @retval True                    KVM Initialization is successful
  @retval False                   KVM is not enabled
**/
BOOLEAN
BdsKvmInitialization (
  VOID
  )
;
#endif