Subversion Repositories HelenOS

Rev

Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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