1// Copyright 2020 Haiku, Inc. All rights reserved
2// Released under the terms of the MIT License
3
4#pragma once
5
6#include <efi/types.h>
7
8#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
9	{0xf42f7782, 0x012e, 0x4c12, \
10		{0x99, 0x56, 0x49, 0xf9, 0x43, 0x04, 0xf7, 0x21}}
11
12extern efi_guid ConsoleControlProtocol;
13
14typedef enum {
15	EfiConsoleControlScreenText,
16	EfiConsoleControlScreenGraphics,
17	EfiConsoleControlScreenMax
18} efi_console_control_screen_mode;
19
20typedef struct efi_console_control_protocol {
21	uint64_t Revision;
22
23	efi_status (*GetMode) (struct efi_console_control_protocol* self,
24		efi_console_control_screen_mode* mode,
25		bool* gopUgaExists,
26		bool* stdInLocked) EFIAPI;
27
28	efi_status (*SetMode) (struct efi_console_control_protocol* self,
29		efi_console_control_screen_mode mode) EFIAPI;
30
31	efi_status (*LockStdIn) (struct efi_console_control_protocol* self,
32		uint16_t* password);
33
34} efi_console_control_protocol;
35