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