xref: /netbsd-src/sys/external/bsd/gnu-efi/dist/inc/protocol/vgaclass.h (revision b2c829d73acfa2ef1ac1967460ebcec8f439b096)
1 /*	$NetBSD: vgaclass.h,v 1.1.1.1 2014/04/01 16:16:07 jakllsch Exp $	*/
2 
3 #ifndef _VGA_CLASS_H
4 #define _VGA_CLASS_H
5 
6 /*++
7 
8 Copyright (c) 1999  Intel Corporation
9 
10 Module Name:
11 
12     VgaClass.h
13 
14 Abstract:
15 
16     Vga Mini port binding to Vga Class protocol
17 
18 
19 
20 Revision History
21 
22 --*/
23 
24 //
25 // VGA Device Structure
26 //
27 
28 // {0E3D6310-6FE4-11d3-BB81-0080C73C8881}
29 #define VGA_CLASS_DRIVER_PROTOCOL \
30     { 0xe3d6310, 0x6fe4, 0x11d3, {0xbb, 0x81, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
31 
32 typedef
33 EFI_STATUS
34 (* INIT_VGA_CARD) (
35     IN  UINTN   VgaMode,
36     IN  VOID    *Context
37     );
38 
39 typedef struct {
40     UINTN   MaxColumns;
41     UINTN   MaxRows;
42 } MAX_CONSOLE_GEOMETRY;
43 
44 #define VGA_CON_OUT_DEV_SIGNATURE   EFI_SIGNATURE_32('c','v','g','a')
45 typedef struct {
46     UINTN                           Signature;
47 
48     EFI_HANDLE                      Handle;
49     SIMPLE_TEXT_OUTPUT_INTERFACE    ConOut;
50     SIMPLE_TEXT_OUTPUT_MODE         ConOutMode;
51     EFI_DEVICE_PATH                 *DevicePath;
52 
53     UINT8                           *Buffer;
54     EFI_DEVICE_IO_INTERFACE         *DeviceIo;
55 
56     //
57     // Video Card Context
58     //
59     INIT_VGA_CARD                   InitVgaCard;
60     VOID                            *VgaCardContext;
61     MAX_CONSOLE_GEOMETRY            *Geometry;
62     //
63     // Video buffer normally 0xb8000
64     //
65     UINT64                          VideoBuffer;
66 
67     //
68     // Clear Screen & Default Attribute
69     //
70     UINT32                          Attribute;
71 
72     //
73     // -1 means search for active VGA device
74     //
75     EFI_PCI_ADDRESS_UNION           Pci;
76 } VGA_CON_OUT_DEV;
77 
78 #define VGA_CON_OUT_DEV_FROM_THIS(a) CR(a, VGA_CON_OUT_DEV, ConOut, VGA_CON_OUT_DEV_SIGNATURE)
79 
80 //
81 // Vga Class Driver Protocol.
82 // GUID defined in EFI Lib
83 //
84 
85 typedef
86 EFI_STATUS
87 (EFIAPI *INSTALL_VGA_DRIVER) (
88     IN  VGA_CON_OUT_DEV    *ConOutDev
89     );
90 
91 typedef struct {
92     UINT32               Version;
93     INSTALL_VGA_DRIVER   InstallGenericVgaDriver;
94 } INSTALL_VGA_DRIVER_INTERFACE;
95 
96 #endif
97 
98