Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/stand/efi/include/eficonsctl.h
34866 views
1
/*-
2
* Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
6
* are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
*
14
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
18
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24
* THE POSSIBILITY OF SUCH DAMAGE.
25
*/
26
27
/*
28
* Original Module Name: ConsoleControl.h
29
* Abstract: Abstraction of a Text mode or GOP/UGA screen
30
*/
31
32
33
#ifndef _EFI_CONS_CTL_H
34
#define _EFI_CONS_CTL_H
35
36
#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
37
{ 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
38
39
typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
40
41
42
typedef enum {
43
EfiConsoleControlScreenText,
44
EfiConsoleControlScreenGraphics,
45
EfiConsoleControlScreenMaxValue
46
} EFI_CONSOLE_CONTROL_SCREEN_MODE;
47
48
49
typedef
50
EFI_STATUS
51
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
52
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
53
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
54
OUT BOOLEAN *GopUgaExists, OPTIONAL
55
OUT BOOLEAN *StdInLocked OPTIONAL
56
)
57
/*++
58
59
Routine Description:
60
Return the current video mode information. Also returns info about existence
61
of Graphics Output devices or UGA Draw devices in system, and if the Std In
62
device is locked. All the arguments are optional and only returned if a non
63
NULL pointer is passed in.
64
65
Arguments:
66
This - Protocol instance pointer.
67
Mode - Are we in text of grahics mode.
68
GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device
69
StdInLocked - TRUE if StdIn device is keyboard locked
70
71
Returns:
72
EFI_SUCCESS - Mode information returned.
73
74
--*/
75
;
76
77
78
typedef
79
EFI_STATUS
80
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
81
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
82
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
83
)
84
/*++
85
86
Routine Description:
87
Set the current mode to either text or graphics. Graphics is
88
for Quiet Boot.
89
90
Arguments:
91
This - Protocol instance pointer.
92
Mode - Mode to set the
93
94
Returns:
95
EFI_SUCCESS - Mode information returned.
96
97
--*/
98
;
99
100
101
typedef
102
EFI_STATUS
103
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
104
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
105
IN CHAR16 *Password
106
)
107
/*++
108
109
Routine Description:
110
Lock Std In devices until Password is typed.
111
112
Arguments:
113
This - Protocol instance pointer.
114
Password - Password needed to unlock screen. NULL means unlock keyboard
115
116
Returns:
117
EFI_SUCCESS - Mode information returned.
118
EFI_DEVICE_ERROR - Std In not locked
119
120
--*/
121
;
122
123
124
125
struct _EFI_CONSOLE_CONTROL_PROTOCOL {
126
EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
127
EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
128
EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
129
};
130
131
extern EFI_GUID gEfiConsoleControlProtocolGuid;
132
133
#endif
134
135