summaryrefslogtreecommitdiff
path: root/Board/EM/MeWrapper/AtAmUi/AtAmUi.h
blob: 04e356f82c2a90320842778d8da0322d623a9d92 (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
/** @file
  Header file.

@copyright
  Copyright (c) 2013 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 a 'Sample Driver' and is licensed as such
  under the terms of your license agreement with Intel or your
  vendor.  This file may be modified by the user, subject to
  the additional terms of the license agreement
**/
#ifndef _ATAMUI_H_
#define _ATAMUI_H_

#if !defined(EDK_RELEASE_VERSION) || (EDK_RELEASE_VERSION < 0x00020000)
#include "EdkIIGlueDxe.h"
#include "AtAmUiString.h"
#include "AtAm.h"
#include "AtHi.h"
#include "AtAmHelper.h"
#endif

#include EFI_PROTOCOL_CONSUMER (AtAm)
#include EFI_PROTOCOL_CONSUMER (AtPlatformPolicy)

///
/// Intel ME Alert AT Handler Event GUID
/// The event is used to execute AtAmUiCallback () when the system is ready to launch ATAM UI
/// The event is signaled after consoles are ready in BDS phase.
///
#define ME_ALERT_AT_HANDLER_GUID \
  { \
    0xb441df87, 0x8d94, 0x4811, 0x85, 0xf7, 0xf, 0x9a, 0x7b, 0xf8, 0x9d, 0x2a \
  }

#define ATAMUI_SUSPEND_ATTEMPTS 3

/**
  ATAM UI callback.

  @param[in] Event                The event registered
  @param[in] Context              Event context. Not used in this event handler.

  @retval None
**/
VOID
EFIAPI
AtAmUiCallback (
  IN EFI_EVENT                    Event,
  IN VOID                         *Context
  )
;

/**
  Function handling entering suspend mode.

  @param[in] None

  @retval EFI_SUCCESS             The function completed successfully.
  @retval EFI_OUT_OF_RESOURCES    Unable to allocate necessary data structures.
**/
EFI_STATUS
AtAmUiTheftNotification (
  VOID
  )
;

/**
  Function handling displaing theft notification.

  @param[in] None

  @retval EFI_SUCCESS             The function completed successfully.
  @retval EFI_OUT_OF_RESOURCES    Unable to allocate necessary data structures.
**/
EFI_STATUS
AtAmUiEnterSuspendState (
  VOID
  )
;

/**
  Function handling exiting suspend mode.

  @param[in] None

  @retval EFI_SUCCESS             The function completed successfully.
  @retval EFI_OUT_OF_RESOURCES    Unable to allocate necessary data structures.
**/
EFI_STATUS
AtAmUiExitSuspendState (
  VOID
  )
;

/**
  Function handling recovery proccess.

  @param[in] None

  @retval EFI_SUCCESS             The function completed successfully.
  @retval EFI_OUT_OF_RESOURCES    Unable to allocate necessary data structures.
**/
EFI_STATUS
AtAmUiRecovery (
  VOID
  )
;

/**
  Function displaing Ivs strings.

  @param[in] None

  @retval EFI_SUCCESS             The function completed successfully.
  @retval EFI_OUT_OF_RESOURCES    Unable to allocate necessary data structures.
**/
EFI_STATUS
AtAmUiDisplayIsvStrings (
  VOID
  )
;

/**
  This GetRecoveryPassword() process the AT recovery password user input.

  @param[out] PasswordASCII       Pointer to an array of ASCII user input
  @param[in] MaxPasswordLength    Integer value for max password length
  @param[out] PasswordUNICODE     Pointer to an array of UNICODE user input
  @param[in] ShowPassword         TRUE - password is shown, FALSE - pasword is hidden by *

  @retval EFI_SUCCESS             The function completed successfully.
  @retval EFI_OUT_OF_RESOURCES Do not have enough resources to allocate memory or password too long.
**/
EFI_STATUS
AtAmUiGetPassword (
  OUT UINT8                       *PasswordASCII,
  IN INTN                         MaxPasswordLength,
  OUT CHAR16                      *PasswordUNICODE,
  IN UINT8                        ShowPassword
  )
;
#endif