]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/UgaIo.h
MdePkg/SmmGipDispatch2.h: SMM GpiNum meaning clarification
[mirror_edk2.git] / MdePkg / Include / Protocol / UgaIo.h
index b1e7d44575ac5140cf67e8de0e3f3cdb32c5d0e3..b6884219180cfaeecfae22b005661c7b2c2508c6 100644 (file)
@@ -1,34 +1,24 @@
-\r
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  UgaIo.h\r
-\r
-Abstract:\r
-\r
-  UGA IO protocol from the EFI 1.1 specification.\r
+/** @file\r
+  UGA IO protocol from the EFI 1.10 specification.\r
 \r
   Abstraction of a very simple graphics device.\r
+  \r
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
---*/\r
+**/\r
 \r
 #ifndef __UGA_IO_H__\r
 #define __UGA_IO_H__\r
 \r
 #define EFI_UGA_IO_PROTOCOL_GUID \\r
-  { \\r
-    0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 } \\r
-  }\r
+  { 0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 } }\r
 \r
 typedef struct _EFI_UGA_IO_PROTOCOL EFI_UGA_IO_PROTOCOL;\r
 \r
@@ -40,8 +30,7 @@ typedef enum {
   UgaDtOutputController,\r
   UgaDtOutputPort,\r
   UgaDtOther\r
-}\r
-UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE;\r
+} UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE;\r
 \r
 typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID;\r
 \r
@@ -50,8 +39,7 @@ typedef struct {
   UGA_DEVICE_ID   deviceId;\r
   UINT32          ui32DeviceContextSize;\r
   UINT32          ui32SharedContextSize;\r
-}\r
-UGA_DEVICE_DATA, *PUGA_DEVICE_DATA;\r
+} UGA_DEVICE_DATA, *PUGA_DEVICE_DATA;\r
 \r
 typedef struct _UGA_DEVICE {\r
   VOID                *pvDeviceContext;\r
@@ -61,13 +49,8 @@ typedef struct _UGA_DEVICE {
   VOID                *pvBusIoServices;\r
   VOID                *pvStdIoServices;\r
   UGA_DEVICE_DATA     deviceData;\r
-}\r
-UGA_DEVICE, *PUGA_DEVICE;\r
+} UGA_DEVICE, *PUGA_DEVICE;\r
 \r
-#ifndef UGA_IO_REQUEST_CODE\r
-//\r
-// Prevent conflicts with UGA typedefs.\r
-//\r
 typedef enum {\r
   UgaIoGetVersion             = 1,\r
   UgaIoGetChildDevice,\r
@@ -92,10 +75,7 @@ typedef enum {
   UgaIoGetDevicePropertySize,\r
   UgaIoGetDeviceProperty,\r
   UgaIoBtPrivateInterface\r
-}\r
-UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE;\r
-\r
-#endif\r
+} UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE;\r
 \r
 typedef struct {\r
   IN UGA_IO_REQUEST_CODE  ioRequestCode;\r
@@ -104,103 +84,83 @@ typedef struct {
   OUT VOID                *pvOutBuffer;\r
   IN UINT64               ui64OutBufferSize;\r
   OUT UINT64              ui64BytesReturned;\r
-}\r
-UGA_IO_REQUEST, *PUGA_IO_REQUEST;\r
+} UGA_IO_REQUEST, *PUGA_IO_REQUEST;\r
+\r
+\r
+/**\r
+  Dynamically allocate storage for a child UGA_DEVICE.\r
+\r
+  @param[in]     This            The EFI_UGA_IO_PROTOCOL instance. \r
+  @param[in]     ParentDevice    ParentDevice specifies a pointer to the parent device of Device.\r
+  @param[in]     DeviceData      A pointer to UGA_DEVICE_DATA returned from a call to DispatchService()\r
+                                 with a UGA_DEVICE of Parent and an IoRequest of type UgaIoGetChildDevice.      \r
+  @param[in]     RunTimeContext  Context to associate with Device.  \r
+  @param[out]    Device          The Device returns a dynamically allocated child UGA_DEVICE object\r
+                                 for ParentDevice. The caller is responsible for deleting Device.\r
+\r
+                                 \r
+  @retval  EFI_SUCCESS           Device was returned.\r
+  @retval  EFI_INVALID_PARAMETER One of the arguments was not valid.\r
+  @retval  EFI_DEVICE_ERROR      The device had an error and could not complete the request.\r
 \r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UGA_IO_PROTOCOL_CREATE_DEVICE) (\r
-  IN  EFI_UGA_IO_PROTOCOL  * This,\r
-  IN  UGA_DEVICE           * ParentDevice,\r
-  IN  UGA_DEVICE_DATA      * DeviceData,\r
+(EFIAPI *EFI_UGA_IO_PROTOCOL_CREATE_DEVICE)(\r
+  IN  EFI_UGA_IO_PROTOCOL  *This,\r
+  IN  UGA_DEVICE           *ParentDevice,\r
+  IN  UGA_DEVICE_DATA      *DeviceData,\r
   IN  VOID                 *RunTimeContext,\r
   OUT UGA_DEVICE           **Device\r
   );\r
 \r
-/*++\r
-\r
-  Routine Description:\r
-\r
-    Dynamically allocate storage for a child UGA_DEVICE .\r
-\r
-  Arguments:\r
-\r
-    This           - The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is \r
-                     defined in Section 10.7.\r
 \r
-    ParentDevice   - ParentDevice specifies a pointer to the parent device of Device.\r
+/**\r
+  Delete a dynamically allocated child UGA_DEVICE object that was allocated via CreateDevice().\r
 \r
-    DeviceData     - A pointer to UGA_DEVICE_DATA returned from a call to DispatchService()\r
-                     with a UGA_DEVICE of Parent and an IoRequest of type UgaIoGetChildDevice.\r
+  @param[in]     This            The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is \r
+                                 defined in Section 10.7.\r
+  @param[in]     Device          The Device points to a UGA_DEVICE object that was dynamically\r
+                                 allocated via a CreateDevice() call.\r
 \r
-    RuntimeContext - Context to associate with Device.\r
+                                 \r
+  @retval  EFI_SUCCESS           Device was returned.\r
+  @retval  EFI_INVALID_PARAMETER The Device was not allocated via CreateDevice().\r
 \r
-    Device         - The Device returns a dynamically allocated child UGA_DEVICE object\r
-                     for ParentDevice. The caller is responsible for deleting Device.\r
-      \r
-  Returns:\r
-\r
-    EFI_SUCCESS           - Device was returned.\r
-\r
-    EFI_INVALID_PARAMETER - One of the arguments was not valid.\r
-\r
-    EFI_DEVICE_ERROR      - The device had an error and could not complete the request.\r
-\r
---*/\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UGA_IO_PROTOCOL_DELETE_DEVICE) (\r
+(EFIAPI *EFI_UGA_IO_PROTOCOL_DELETE_DEVICE)(\r
   IN EFI_UGA_IO_PROTOCOL  * This,\r
   IN UGA_DEVICE           * Device\r
   );\r
 \r
-/*++\r
-\r
-  Routine Description:\r
-\r
-    Delete a dynamically allocated child UGA_DEVICE object that was allocated via\r
-    CreateDevice() .\r
-\r
-  Arguments:\r
-\r
-    This   - The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is defined \r
-             in Section 10.7.\r
-\r
-    Device - The Device points to a UGA_DEVICE object that was dynamically\r
-             allocated via a CreateDevice() call.\r
+/**\r
+  This is the main UGA service dispatch routine for all UGA_IO_REQUEST s.\r
 \r
-  Returns:\r
-\r
-    EFI_SUCCESS           - Device was deleted.\r
-\r
-    EFI_INVALID_PARAMETER - The Device was not allocated via CreateDevice()\r
-\r
---*/\r
-typedef UGA_STATUS (EFIAPI *PUGA_FW_SERVICE_DISPATCH) (IN PUGA_DEVICE pDevice, IN OUT PUGA_IO_REQUEST pIoRequest);\r
-\r
-/*++\r
-\r
-  Routine Description:\r
-\r
-    This is the main UGA service dispatch routine for all UGA_IO_REQUEST s.\r
-\r
-  Arguments:\r
-\r
-    pDevice    - pDevice specifies a pointer to a device object associated with a \r
+  @param pDevice pDevice specifies a pointer to a device object associated with a \r
                  device enumerated by a pIoRequest->ioRequestCode of type \r
                  UgaIoGetChildDevice. The root device for the EFI_UGA_IO_PROTOCOL \r
                  is represented by pDevice being set to NULL.\r
 \r
-    pIoRequest - pIoRequest points to a caller allocated buffer that contains data\r
+  @param pIoRequest \r
+                 pIoRequest points to a caller allocated buffer that contains data\r
                  defined by pIoRequest->ioRequestCode. See Related Definitions for\r
                  a definition of UGA_IO_REQUEST_CODE s and their associated data \r
                  structures.\r
 \r
-  Returns:\r
+  @return UGA_STATUS\r
 \r
-  Varies depending on pIoRequest.\r
+**/\r
+typedef UGA_STATUS \r
+(EFIAPI *PUGA_FW_SERVICE_DISPATCH)(\r
+  IN PUGA_DEVICE pDevice, \r
+  IN OUT PUGA_IO_REQUEST pIoRequest\r
+  );\r
 \r
---*/\r
+///\r
+/// Provides a basic abstraction to send I/O requests to the graphics device and any of its children.\r
+///\r
 struct _EFI_UGA_IO_PROTOCOL {\r
   EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice;\r
   EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice;\r