]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Csm/Include/Protocol/VgaMiniPort.h
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Csm / Include / Protocol / VgaMiniPort.h
CommitLineData
b522c77b
HW
1/** @file\r
2 The VGA Mini Port Protocol used to set the text display mode of a VGA controller.\r
3\r
4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#ifndef __VGA_MINI_PORT_H_\r
10#define __VGA_MINI_PORT_H_\r
11\r
12///\r
13/// Global ID for the EFI_VGA_MINI_PORT_PROTOCOL.\r
14///\r
15#define EFI_VGA_MINI_PORT_PROTOCOL_GUID \\r
16 { \\r
17 0xc7735a2f, 0x88f5, 0x4882, {0xae, 0x63, 0xfa, 0xac, 0x8c, 0x8b, 0x86, 0xb3 } \\r
18 }\r
19\r
20///\r
21/// Forward declaration for the EFI_VGA_MINI_PORT_PROTOCOL.\r
22///\r
ac0a286f 23typedef struct _EFI_VGA_MINI_PORT_PROTOCOL EFI_VGA_MINI_PORT_PROTOCOL;\r
b522c77b
HW
24\r
25/**\r
26 Sets the text display mode of a VGA controller.\r
27\r
28 Sets the text display mode of the VGA controller to the mode specified by\r
29 ModeNumber. A ModeNumber of 0 is a request for an 80x25 text mode. A\r
30 ModeNumber of 1 is a request for an 80x50 text mode. If ModeNumber is greater\r
31 than MaxModeNumber, then EFI_UNSUPPORTED is returned. If the VGA controller\r
32 is not functioning properly, then EFI_DEVICE_ERROR is returned. If the VGA\r
48cf40b8 33 controller is successfully set to the mode number specified by ModeNumber, then\r
b522c77b
HW
34 EFI_SUCCESS is returned.\r
35\r
36 @param[in] This A pointer to the EFI_VGA_MINI_PORT_PROTOCOL instance.\r
37 @param[in] ModeNumber The requested mode number. 0 for 80x25. 1 for 80x5.\r
38\r
39 @retval EFI_SUCCESS The mode number was set.\r
40 @retval EFI_UNSUPPORTED The mode number specified by ModeNumber is not supported.\r
41 @retval EFI_DEVICE_ERROR The device is not functioning properly.\r
42\r
43**/\r
44typedef\r
45EFI_STATUS\r
46(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE)(\r
47 IN EFI_VGA_MINI_PORT_PROTOCOL *This,\r
48 IN UINTN ModeNumber\r
49 );\r
50\r
51struct _EFI_VGA_MINI_PORT_PROTOCOL {\r
ac0a286f 52 EFI_VGA_MINI_PORT_SET_MODE SetMode;\r
b522c77b
HW
53 ///\r
54 /// MMIO base address of the VGA text mode framebuffer. Typically set to 0xB8000.\r
55 ///\r
ac0a286f 56 UINT64 VgaMemoryOffset;\r
b522c77b
HW
57 ///\r
58 /// I/O Port address for the VGA CRTC address register. Typically set to 0x3D4.\r
59 ///\r
ac0a286f 60 UINT64 CrtcAddressRegisterOffset;\r
b522c77b
HW
61 ///\r
62 /// I/O Port address for the VGA CRTC data register. Typically set to 0x3D5.\r
63 ///\r
ac0a286f 64 UINT64 CrtcDataRegisterOffset;\r
b522c77b
HW
65 ///\r
66 /// PCI Controller MMIO BAR index of the VGA text mode frame buffer. Typically\r
67 /// set to EFI_PCI_IO_PASS_THROUGH_BAR\r
68 ///\r
ac0a286f 69 UINT8 VgaMemoryBar;\r
b522c77b
HW
70 ///\r
71 /// PCI Controller I/O BAR index of the VGA CRTC address register. Typically\r
72 /// set to EFI_PCI_IO_PASS_THROUGH_BAR\r
73 ///\r
ac0a286f 74 UINT8 CrtcAddressRegisterBar;\r
b522c77b
HW
75 ///\r
76 /// PCI Controller I/O BAR index of the VGA CRTC data register. Typically set\r
77 /// to EFI_PCI_IO_PASS_THROUGH_BAR\r
78 ///\r
ac0a286f 79 UINT8 CrtcDataRegisterBar;\r
b522c77b
HW
80 ///\r
81 /// The maximum number of text modes that this VGA controller supports.\r
82 ///\r
ac0a286f 83 UINT8 MaxMode;\r
b522c77b
HW
84};\r
85\r
ac0a286f 86extern EFI_GUID gEfiVgaMiniPortProtocolGuid;\r
b522c77b
HW
87\r
88#endif\r