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