]>
Commit | Line | Data |
---|---|---|
5f597758 | 1 | /** @file\r |
88f20127 | 2 | \r |
5f597758 LG |
3 | This protocol provides the interfaces to Get/Set the current video mode for GOP/UGA screen\r |
4 | \r | |
ed055f1b | 5 | Copyright (c) 2006 - 2008, Intel Corporation\r |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
88f20127 | 13 | \r |
5f597758 | 14 | **/\r |
88f20127 | 15 | \r |
16 | #ifndef __CONSOLE_CONTROL_H__\r | |
17 | #define __CONSOLE_CONTROL_H__\r | |
18 | \r | |
19 | #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \\r | |
20 | { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } }\r | |
21 | \r | |
22 | typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;\r | |
23 | \r | |
24 | \r | |
25 | typedef enum {\r | |
b9982883 LG |
26 | EfiConsoleControlScreenText, ///> Text Mode\r |
27 | EfiConsoleControlScreenGraphics, ///> Graphics Mode\r | |
88f20127 | 28 | EfiConsoleControlScreenMaxValue\r |
29 | } EFI_CONSOLE_CONTROL_SCREEN_MODE;\r | |
30 | \r | |
5f597758 LG |
31 | /**\r |
32 | Return the current video mode information. Also returns info about existence\r | |
d2bc9f32 | 33 | of Graphics Output devices or UGA Draw devices in system, and whether the Std\r |
257efb0b | 34 | In device is locked. GopUgaExists and StdInLocked parameters are optional, and\r |
35 | only returned if a non NULL pointer is passed in.\r | |
5f597758 LG |
36 | \r |
37 | @param This Protocol instance pointer.\r | |
346cf9ac | 38 | @param Mode Current video mode.\r |
257efb0b | 39 | @param GopUgaExists TRUE if GOP Spliter has found a GOP/UGA device\r |
5f597758 | 40 | @param StdInLocked TRUE if StdIn device is keyboard locked\r |
88f20127 | 41 | \r |
5f597758 LG |
42 | @retval EFI_SUCCESS Video mode information is returned.\r |
43 | @retval EFI_INVALID_PARAMETER Invalid parameters if Mode == NULL.\r | |
44 | \r | |
45 | **/\r | |
88f20127 | 46 | typedef\r |
47 | EFI_STATUS\r | |
7d839888 | 48 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE)(\r |
88f20127 | 49 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r |
50 | OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,\r | |
ed055f1b | 51 | OUT BOOLEAN *GopUgaExists, OPTIONAL\r |
62409219 | 52 | OUT BOOLEAN *StdInLocked OPTIONAL\r |
ed66e1bc | 53 | );\r |
88f20127 | 54 | \r |
5f597758 | 55 | /**\r |
d2bc9f32 | 56 | Set the current video mode to either text or graphics. Graphics is\r |
57 | for Quiet Boot.\r | |
88f20127 | 58 | \r |
5f597758 | 59 | @param This Protocol instance pointer.\r |
346cf9ac | 60 | @param Mode Video mode is to be set.\r |
88f20127 | 61 | \r |
346cf9ac | 62 | @retval EFI_SUCCESS Mode is set successfully.\r |
5f597758 LG |
63 | @retval EFI_INVALID_PARAMETER Mode is not the valid mode value.\r |
64 | @retval EFI_UNSUPPORTED Mode is unsupported by console device.\r | |
88f20127 | 65 | \r |
5f597758 | 66 | **/\r |
88f20127 | 67 | typedef\r |
68 | EFI_STATUS\r | |
7d839888 | 69 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE)(\r |
88f20127 | 70 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r |
71 | OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode\r | |
ed66e1bc | 72 | );\r |
88f20127 | 73 | \r |
5f597758 | 74 | /**\r |
ed055f1b | 75 | If Password is NULL or the Password is too big, then return an error. If the\r |
d2bc9f32 | 76 | Password is valid, then store the password, lock StdIn and arm the periodic timer.\r |
aae4ad05 | 77 | \r |
ed055f1b | 78 | @param This Protocol instance pointer.\r |
aae4ad05 | 79 | @param Password The password input.\r |
5f597758 | 80 | \r |
ed055f1b | 81 | @retval EFI_SUCCESS Lock the StdIn device.\r |
82 | @retval EFI_INVALID_PARAMETER Password is NULL.\r | |
83 | @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails.\r | |
88f20127 | 84 | \r |
5f597758 | 85 | **/\r |
88f20127 | 86 | typedef\r |
87 | EFI_STATUS\r | |
7d839888 | 88 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN)(\r |
88f20127 | 89 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r |
aae4ad05 | 90 | IN CHAR16 *Password\r |
ed66e1bc | 91 | );\r |
88f20127 | 92 | \r |
88f20127 | 93 | struct _EFI_CONSOLE_CONTROL_PROTOCOL {\r |
94 | EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;\r | |
95 | EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;\r | |
96 | EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;\r | |
97 | };\r | |
98 | \r | |
99 | extern EFI_GUID gEfiConsoleControlProtocolGuid;\r | |
100 | \r | |
101 | #endif\r |