]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Include/Protocol/ConsoleControl.h
Change the EfiAquireLock with RaiseTPL as the call to Boot Service UnloadImage can...
[mirror_edk2.git] / EdkModulePkg / Include / Protocol / ConsoleControl.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 ConsoleControl.h
15
16 Abstract:
17
18 Abstraction of a Text mode or UGA screen
19
20 --*/
21
22 #ifndef __CONSOLE_CONTROL_H__
23 #define __CONSOLE_CONTROL_H__
24
25 #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
26 { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } }
27
28 typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
29
30
31 typedef enum {
32 EfiConsoleControlScreenText,
33 EfiConsoleControlScreenGraphics,
34 EfiConsoleControlScreenMaxValue
35 } EFI_CONSOLE_CONTROL_SCREEN_MODE;
36
37
38 typedef
39 EFI_STATUS
40 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
41 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
42 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
43 OUT BOOLEAN *UgaExists, OPTIONAL
44 OUT BOOLEAN *StdInLocked OPTIONAL
45 )
46 /*++
47
48 Routine Description:
49 Return the current video mode information. Also returns info about existence
50 of UGA Draw devices in system, and if the Std In device is locked. All the
51 arguments are optional and only returned if a non NULL pointer is passed in.
52
53 Arguments:
54 This - Protocol instance pointer.
55 Mode - Are we in text of grahics mode.
56 UgaExists - TRUE if UGA Spliter has found a UGA device
57 StdInLocked - TRUE if StdIn device is keyboard locked
58
59 Returns:
60 EFI_SUCCESS - Mode information returned.
61
62 --*/
63 ;
64
65
66 typedef
67 EFI_STATUS
68 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
69 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
70 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
71 )
72 /*++
73
74 Routine Description:
75 Set the current mode to either text or graphics. Graphics is
76 for Quiet Boot.
77
78 Arguments:
79 This - Protocol instance pointer.
80 Mode - Mode to set the
81
82 Returns:
83 EFI_SUCCESS - Mode information returned.
84
85 --*/
86 ;
87
88
89 typedef
90 EFI_STATUS
91 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
92 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
93 IN CHAR16 *Password
94 )
95 /*++
96
97 Routine Description:
98 Lock Std In devices until Password is typed.
99
100 Arguments:
101 This - Protocol instance pointer.
102 Password - Password needed to unlock screen. NULL means unlock keyboard
103
104 Returns:
105 EFI_SUCCESS - Mode information returned.
106 EFI_DEVICE_ERROR - Std In not locked
107
108 --*/
109 ;
110
111
112
113 struct _EFI_CONSOLE_CONTROL_PROTOCOL {
114 EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
115 EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
116 EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
117 };
118
119 extern EFI_GUID gEfiConsoleControlProtocolGuid;
120
121 #endif