1 /*++ 2 3 Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR> 4 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 GOP/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 *GopUgaExists, 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 Graphics Output devices or UGA Draw devices in system, and if the Std In 51 device is locked. All the arguments are optional and only returned if a non 52 NULL pointer is passed in. 53 54 Arguments: 55 This - Protocol instance pointer. 56 Mode - Are we in text of grahics mode. 57 GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device 58 StdInLocked - TRUE if StdIn device is keyboard locked 59 60 Returns: 61 EFI_SUCCESS - Mode information returned. 62 63 --*/ 64 ; 65 66 67 typedef 68 EFI_STATUS 69 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) ( 70 IN EFI_CONSOLE_CONTROL_PROTOCOL *This, 71 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode 72 ) 73 /*++ 74 75 Routine Description: 76 Set the current mode to either text or graphics. Graphics is 77 for Quiet Boot. 78 79 Arguments: 80 This - Protocol instance pointer. 81 Mode - Mode to set the 82 83 Returns: 84 EFI_SUCCESS - Mode information returned. 85 86 --*/ 87 ; 88 89 90 typedef 91 EFI_STATUS 92 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) ( 93 IN EFI_CONSOLE_CONTROL_PROTOCOL *This, 94 IN CHAR16 *Password 95 ) 96 /*++ 97 98 Routine Description: 99 Lock Std In devices until Password is typed. 100 101 Arguments: 102 This - Protocol instance pointer. 103 Password - Password needed to unlock screen. NULL means unlock keyboard 104 105 Returns: 106 EFI_SUCCESS - Mode information returned. 107 EFI_DEVICE_ERROR - Std In not locked 108 109 --*/ 110 ; 111 112 113 114 struct _EFI_CONSOLE_CONTROL_PROTOCOL { 115 EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode; 116 EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode; 117 EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn; 118 }; 119 120 extern EFI_GUID gEfiConsoleControlProtocolGuid; 121 122 #endif 123