]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h
Adjust the code so that global variable placed at beginning of file.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / VgaMiniPortDxe / VgaMiniPort.h
1 /** @file
2
3 Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 **/
13
14 #ifndef _VGA_MINIPORT_H_
15 #define _VGA_MINIPORT_H_
16
17 //
18 // The package level header files this module uses
19 //
20 #include <PiDxe.h>
21 //
22 // The protocols, PPI and GUID defintions for this module
23 //
24 #include <Protocol/PciIo.h>
25 #include <Protocol/VgaMiniPort.h>
26 #include <Protocol/ComponentName2.h>
27
28
29 //
30 // The Library classes this module consumes
31 //
32 #include <Library/DebugLib.h>
33 #include <Library/BaseMemoryLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/UefiBootServicesTableLib.h>
36 #include <Library/UefiLib.h>
37
38 #include <IndustryStandard/Pci22.h>
39
40 //
41 // Global Variables
42 //
43 extern EFI_DRIVER_BINDING_PROTOCOL gPciVgaMiniPortDriverBinding;
44 extern EFI_COMPONENT_NAME_PROTOCOL gPciVgaMiniPortComponentName;
45 extern EFI_COMPONENT_NAME2_PROTOCOL gPciVgaMiniPortComponentName2;
46
47 //
48 // PCI VGA MiniPort Device Structure
49 //
50 #define PCI_VGA_MINI_PORT_DEV_SIGNATURE SIGNATURE_32('P','V','M','P')
51
52 typedef struct {
53 UINTN Signature;
54 EFI_HANDLE Handle;
55 EFI_VGA_MINI_PORT_PROTOCOL VgaMiniPort;
56 EFI_PCI_IO_PROTOCOL *PciIo;
57 } PCI_VGA_MINI_PORT_DEV;
58
59 #define PCI_VGA_MINI_PORT_DEV_FROM_THIS(a) CR(a, PCI_VGA_MINI_PORT_DEV, VgaMiniPort, PCI_VGA_MINI_PORT_DEV_SIGNATURE)
60
61 //
62 // Driver Binding Protocol functions
63 //
64 /**
65 Supported.
66
67 (Standard DriverBinding Protocol Supported() function)
68
69 @param This The driver binding protocol.
70 @param Controller The controller handle to check.
71 @param RemainingDevicePath The remaining device path.
72
73 @retval EFI_SUCCESS The driver supports this controller.
74 @retval EFI_UNSUPPORTED This device isn't supported.
75
76 **/
77 EFI_STATUS
78 EFIAPI
79 PciVgaMiniPortDriverBindingSupported (
80 IN EFI_DRIVER_BINDING_PROTOCOL *This,
81 IN EFI_HANDLE Controller,
82 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
83 );
84
85 /**
86 Install VGA Mini Port Protocol onto VGA device handles
87
88 (Standard DriverBinding Protocol Start() function)
89
90 @param This The driver binding instance.
91 @param Controller The controller to check.
92 @param RemainingDevicePath The remaining device patch.
93
94 @retval EFI_SUCCESS The controller is controlled by the driver.
95 @retval EFI_ALREADY_STARTED The controller is already controlled by the driver.
96 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.
97
98 **/
99 EFI_STATUS
100 EFIAPI
101 PciVgaMiniPortDriverBindingStart (
102 IN EFI_DRIVER_BINDING_PROTOCOL *This,
103 IN EFI_HANDLE Controller,
104 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
105 );
106
107 /**
108 Stop.
109
110 (Standard DriverBinding Protocol Stop() function)
111
112 @param This The driver binding protocol.
113 @param Controller The controller to release.
114 @param NumberOfChildren The child number that opened controller
115 BY_CHILD.
116 @param ChildHandleBuffer The array of child handle.
117
118 @retval EFI_SUCCESS The controller or children are stopped.
119 @retval EFI_DEVICE_ERROR Failed to stop the driver.
120
121 **/
122 EFI_STATUS
123 EFIAPI
124 PciVgaMiniPortDriverBindingStop (
125 IN EFI_DRIVER_BINDING_PROTOCOL *This,
126 IN EFI_HANDLE Controller,
127 IN UINTN NumberOfChildren,
128 IN EFI_HANDLE *ChildHandleBuffer
129 );
130
131 //
132 // VGA Mini Port Protocol functions
133 //
134 /**
135 Thunk function of EFI_VGA_MINI_PORT_SET_MODE.
136
137 @param This Point to instance of EFI_VGA_MINI_PORT_PROTOCOL.
138 @param ModeNumber Mode number.
139
140 @retval EFI_UNSUPPORTED Invalid mode number.
141 @retval EFI_SUCCESS Success.
142
143 **/
144 EFI_STATUS
145 EFIAPI
146 PciVgaMiniPortSetMode (
147 IN EFI_VGA_MINI_PORT_PROTOCOL *This,
148 IN UINTN ModeNumber
149 );
150
151 #endif