1271762Semaste/*-
2271762Semaste * Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
3271762Semaste *
4271762Semaste * Redistribution and use in source and binary forms, with or without
5271762Semaste * modification, are permitted provided that the following conditions
6271762Semaste * are met:
7271762Semaste *
8271762Semaste * 1. Redistributions of source code must retain the above copyright
9271762Semaste *    notice, this list of conditions and the following disclaimer.
10271762Semaste * 2. Redistributions in binary form must reproduce the above copyright
11271762Semaste *    notice, this list of conditions and the following disclaimer in the
12271762Semaste *    documentation and/or other materials provided with the distribution.
13271762Semaste *
14271762Semaste * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15271762Semaste * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16271762Semaste * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17271762Semaste * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
18271762Semaste * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19271762Semaste * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20271762Semaste * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21271762Semaste * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22271762Semaste * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23271762Semaste * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24271762Semaste * THE POSSIBILITY OF SUCH DAMAGE.
25271762Semaste */
26271762Semaste
27271762Semaste/*
28271762Semaste * Original Module Name: ConsoleControl.h
29271762Semaste * Abstract: Abstraction of a Text mode or GOP/UGA screen
30271762Semaste */
31271762Semaste
32271762Semaste/* $FreeBSD: releng/11.0/sys/boot/efi/include/eficonsctl.h 293724 2016-01-12 02:17:39Z smh $ */
33271762Semaste
34271762Semaste#ifndef _EFI_CONS_CTL_H
35271762Semaste#define _EFI_CONS_CTL_H
36271762Semaste
37271762Semaste#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
38293724Ssmh    { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
39271762Semaste
40271762Semastetypedef struct _EFI_CONSOLE_CONTROL_PROTOCOL   EFI_CONSOLE_CONTROL_PROTOCOL;
41271762Semaste
42271762Semaste
43271762Semastetypedef enum {
44271762Semaste  EfiConsoleControlScreenText,
45271762Semaste  EfiConsoleControlScreenGraphics,
46271762Semaste  EfiConsoleControlScreenMaxValue
47271762Semaste} EFI_CONSOLE_CONTROL_SCREEN_MODE;
48271762Semaste
49271762Semaste
50271762Semastetypedef
51271762SemasteEFI_STATUS
52271762Semaste(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
53271762Semaste  IN  EFI_CONSOLE_CONTROL_PROTOCOL      *This,
54271762Semaste  OUT EFI_CONSOLE_CONTROL_SCREEN_MODE   *Mode,
55271762Semaste  OUT BOOLEAN                           *GopUgaExists,  OPTIONAL
56271762Semaste  OUT BOOLEAN                           *StdInLocked    OPTIONAL
57271762Semaste  )
58271762Semaste/*++
59271762Semaste
60271762Semaste  Routine Description:
61271762Semaste    Return the current video mode information. Also returns info about existence
62271762Semaste    of Graphics Output devices or UGA Draw devices in system, and if the Std In
63271762Semaste    device is locked. All the arguments are optional and only returned if a non
64271762Semaste    NULL pointer is passed in.
65271762Semaste
66271762Semaste  Arguments:
67271762Semaste    This         - Protocol instance pointer.
68271762Semaste    Mode         - Are we in text of grahics mode.
69271762Semaste    GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device
70271762Semaste    StdInLocked  - TRUE if StdIn device is keyboard locked
71271762Semaste
72271762Semaste  Returns:
73271762Semaste    EFI_SUCCESS     - Mode information returned.
74271762Semaste
75271762Semaste--*/
76271762Semaste;
77271762Semaste
78271762Semaste
79271762Semastetypedef
80271762SemasteEFI_STATUS
81271762Semaste(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
82271762Semaste  IN  EFI_CONSOLE_CONTROL_PROTOCOL      *This,
83271762Semaste  IN  EFI_CONSOLE_CONTROL_SCREEN_MODE   Mode
84271762Semaste  )
85271762Semaste/*++
86271762Semaste
87271762Semaste  Routine Description:
88271762Semaste    Set the current mode to either text or graphics. Graphics is
89271762Semaste    for Quiet Boot.
90271762Semaste
91271762Semaste  Arguments:
92271762Semaste    This  - Protocol instance pointer.
93271762Semaste    Mode  - Mode to set the
94271762Semaste
95271762Semaste  Returns:
96271762Semaste    EFI_SUCCESS     - Mode information returned.
97271762Semaste
98271762Semaste--*/
99271762Semaste;
100271762Semaste
101271762Semaste
102271762Semastetypedef
103271762SemasteEFI_STATUS
104271762Semaste(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
105271762Semaste  IN  EFI_CONSOLE_CONTROL_PROTOCOL      *This,
106271762Semaste  IN CHAR16                             *Password
107271762Semaste  )
108271762Semaste/*++
109271762Semaste
110271762Semaste  Routine Description:
111271762Semaste    Lock Std In devices until Password is typed.
112271762Semaste
113271762Semaste  Arguments:
114271762Semaste    This     - Protocol instance pointer.
115271762Semaste    Password - Password needed to unlock screen. NULL means unlock keyboard
116271762Semaste
117271762Semaste  Returns:
118271762Semaste    EFI_SUCCESS      - Mode information returned.
119271762Semaste    EFI_DEVICE_ERROR - Std In not locked
120271762Semaste
121271762Semaste--*/
122271762Semaste;
123271762Semaste
124271762Semaste
125271762Semaste
126271762Semastestruct _EFI_CONSOLE_CONTROL_PROTOCOL {
127271762Semaste  EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE           GetMode;
128271762Semaste  EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE           SetMode;
129271762Semaste  EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN        LockStdIn;
130271762Semaste};
131271762Semaste
132271762Semasteextern EFI_GUID gEfiConsoleControlProtocolGuid;
133271762Semaste
134271762Semaste#endif
135