]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update comments for IsaAcpi.h, IsaIo.h, and VgaMiniPort.h
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 3 Jul 2009 00:37:42 +0000 (00:37 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 3 Jul 2009 00:37:42 +0000 (00:37 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8728 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Include/Protocol/IsaAcpi.h
IntelFrameworkModulePkg/Include/Protocol/IsaIo.h
IntelFrameworkModulePkg/Include/Protocol/VgaMiniPort.h

index e3ad06f60f923e1ec14e9750827ddb3590020c88..81e75f949ecce34d4343fef55abc13da29f4ddfc 100644 (file)
 /** @file\r
-  ISA Acpi Protocol is used to operate and communicate with ISA device.\r
+  EFI ISA ACPI Protocol is used to enumerate and manage all the ISA controllers on\r
+  the platform's ISA Bus.\r
 \r
-Copyright (c) 2006 - 2009, 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
+  Copyright (c) 2006 - 2009, 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
 **/\r
 \r
 #ifndef __ISA_ACPI_H_\r
 #define __ISA_ACPI_H_\r
 \r
+///\r
+/// Global ID for the EFI ISA ACPI Protocol\r
+///\r
 #define EFI_ISA_ACPI_PROTOCOL_GUID \\r
-               { 0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } }\r
+  { \\r
+    0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } \\r
+  }\r
 \r
+///\r
+/// Forward declaration fo the EFI ISA ACPI Protocol\r
+///\r
 typedef struct _EFI_ISA_ACPI_PROTOCOL EFI_ISA_ACPI_PROTOCOL;\r
 \r
-//\r
-// Resource Attribute definition\r
-//\r
-#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE   0x01\r
-#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE    0x02\r
-#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE  0x04\r
-#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE   0x08\r
-\r
-#define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK                 0x03\r
-\r
-#define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY        0x00\r
-#define EFI_ISA_ACPI_DMA_SPEED_TYPE_A                    0x01\r
-#define EFI_ISA_ACPI_DMA_SPEED_TYPE_B                    0x02\r
-#define EFI_ISA_ACPI_DMA_SPEED_TYPE_F                    0x03\r
-#define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE                   0x04\r
-#define EFI_ISA_ACPI_DMA_COUNT_BY_WORD                   0x08\r
-#define EFI_ISA_ACPI_DMA_BUS_MASTER                      0x10\r
-#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT             0x20\r
-#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT  0x40\r
-#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT            0x80\r
-\r
-#define EFI_ISA_ACPI_MEMORY_WIDTH_MASK                   0x03\r
-\r
-#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT                  0x00\r
-#define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT                 0x01\r
-#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT       0x02\r
-#define EFI_ISA_ACPI_MEMORY_WRITEABLE                    0x04\r
-#define EFI_ISA_ACPI_MEMORY_CACHEABLE                    0x08\r
-#define EFI_ISA_ACPI_MEMORY_SHADOWABLE                   0x10\r
-#define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM                0x20\r
-\r
-#define EFI_ISA_ACPI_IO_DECODE_10_BITS                   0x01\r
-#define EFI_ISA_ACPI_IO_DECODE_16_BITS                   0x02\r
-\r
-//\r
-// Resource List definition: \r
-//\r
+///\r
+/// ISA ACPI Protocol interrupt resource attributes\r
+///\r
+#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE   0x01   ///< Edge triggered interrupt on a rising edge\r
+#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE    0x02   ///< Edge triggered interrupt on a falling edge\r
+#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE  0x04   ///< Level sensitive interrupt active high\r
+#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE   0x08   ///< Level sensitive interrupt active low\r
+\r
+///\r
+/// ISA ACPI Protocol DMA resource attributes\r
+///\r
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK                 0x03   ///< Bit mask of supported DMA speed attributes\r
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY        0x00   ///< ISA controller supports compatibility mode DMA transfers\r
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_A                    0x01   ///< ISA controller supports type A DMA transfers \r
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_B                    0x02   ///< ISA controller supports type B DMA transfers\r
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_F                    0x03   ///< ISA controller supports type F DMA transfers\r
+#define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE                   0x04   ///< ISA controller increments DMA address by bytes (8-bit)\r
+#define EFI_ISA_ACPI_DMA_COUNT_BY_WORD                   0x08   ///< ISA controller increments DMA address by words (16-bit)\r
+#define EFI_ISA_ACPI_DMA_BUS_MASTER                      0x10   ///< ISA controller is a DMA bus master\r
+#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT             0x20   ///< ISA controller only supports 8-bit DMA transfers\r
+#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT  0x40   ///< ISA controller both 8-bit and 16-bit DMA transfers\r
+#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT            0x80   ///< ISA controller only supports 16-bit DMA transfers\r
+\r
+///\r
+/// ISA ACPI Protocol MMIO resource attributes\r
+///\r
+#define EFI_ISA_ACPI_MEMORY_WIDTH_MASK                   0x03   ///< Bit mask of supported ISA memory width attributes\r
+#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT                  0x00   ///< ISA MMIO region only supports 8-bit access\r
+#define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT                 0x01   ///< ISA MMIO region only supports 16-bit access\r
+#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT       0x02   ///< ISA MMIO region supports both 8-bit and 16-bit access \r
+#define EFI_ISA_ACPI_MEMORY_WRITEABLE                    0x04   ///< ISA MMIO region supports write transactions\r
+#define EFI_ISA_ACPI_MEMORY_CACHEABLE                    0x08   ///< ISA MMIO region supports being cached\r
+#define EFI_ISA_ACPI_MEMORY_SHADOWABLE                   0x10   ///< ISA MMIO region may be shadowed\r
+#define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM                0x20   ///< ISA MMIO region is an expansion ROM\r
+\r
+///\r
+/// ISA ACPI Protocol I/O resource attributes\r
+///\r
+#define EFI_ISA_ACPI_IO_DECODE_10_BITS                   0x01    ///< ISA controllers uses a 10-bit address decoder for I/O cycles\r
+#define EFI_ISA_ACPI_IO_DECODE_16_BITS                   0x02    ///< ISA controllers uses a 16-bit address decoder for I/O cycles\r
+\r
+///\r
+/// EFI ISA ACPI resource type \r
+///\r
 typedef enum {\r
-  EfiIsaAcpiResourceEndOfList,\r
-  EfiIsaAcpiResourceIo,\r
-  EfiIsaAcpiResourceMemory,\r
-  EfiIsaAcpiResourceDma,\r
-  EfiIsaAcpiResourceInterrupt\r
+  EfiIsaAcpiResourceEndOfList,    ///< Marks the end if a resource list\r
+  EfiIsaAcpiResourceIo,           ///< ISA I/O port resource range\r
+  EfiIsaAcpiResourceMemory,       ///< ISA MMIO resource range \r
+  EfiIsaAcpiResourceDma,          ///< ISA DMA resource \r
+  EfiIsaAcpiResourceInterrupt     ///< ISA interrupt resource\r
 } EFI_ISA_ACPI_RESOURCE_TYPE;\r
 \r
+///\r
+/// EFI ISA ACPI generic resource structure\r
+///\r
 typedef struct {\r
-  EFI_ISA_ACPI_RESOURCE_TYPE  Type;\r
-  UINT32                      Attribute;\r
-  UINT32                      StartRange;\r
-  UINT32                      EndRange;\r
+  EFI_ISA_ACPI_RESOURCE_TYPE  Type;         ///< The type of resource (I/O, MMIO, DMA, Interrupt)\r
+  UINT32                      Attribute;    ///< Bit mask of attributes associated with this resource.  See EFI_ISA_ACPI_xxx macros for valid combinations.\r
+  UINT32                      StartRange;   ///< The start of the resource range\r
+  UINT32                      EndRange;     ///< The end of the resource range\r
 } EFI_ISA_ACPI_RESOURCE;\r
 \r
+///\r
+/// EFI ISA ACPI resource device identifier\r
+///\r
 typedef struct {\r
-  UINT32                      HID;\r
-  UINT32                      UID;\r
+  UINT32  HID;   ///< The ACPI Hardware Identifier value associated with an ISA controller.  Matchs ACPI DSDT contents.\r
+  UINT32  UID;   ///< The ACPI Unique Identifier value associated with an ISA controller.  Matches ACPI DSDT contents.\r
 } EFI_ISA_ACPI_DEVICE_ID;\r
 \r
+///\r
+/// EFI ISA ACPI resource list\r
+///\r
 typedef struct {\r
-  EFI_ISA_ACPI_DEVICE_ID      Device;\r
-  EFI_ISA_ACPI_RESOURCE       *ResourceItem;\r
+  EFI_ISA_ACPI_DEVICE_ID  Device;          ///< The ACPI HID/UID associated with an ISA controller\r
+  EFI_ISA_ACPI_RESOURCE   *ResourceItem;   ///< Pointer to the list of resources associated with an ISA controller\r
 } EFI_ISA_ACPI_RESOURCE_LIST;\r
 \r
 /**\r
-  Enumerate the ISA devices on the ISA bus.\r
+  Enumerates the ISA controllers on an ISA bus.\r
+\r
+  This service allows all the ISA controllers on an ISA bus to be enumerated.  If\r
+  Device is a pointer to a NULL value, then the first ISA controller on the ISA\r
+  bus is returned in Device and EFI_SUCESS is returned.  If Device is a pointer \r
+  to value that was returned on a prior call to DeviceEnumerate(), then the next \r
+  ISA controller on the ISA bus is returned in Device and EFI_SUCCESS is returned.\r
+  If Device is a pointer to the last ISA controller on the ISA bus, then \r
+  EFI_NOT_FOUND is returned.\r
 \r
-  @param  This               Pointer to EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             Found next ISA device.\r
+  @param[in]  This     Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[out] Device   Pointer to an ISA controller named by ACPI HID/UID.\r
 \r
-  @retval EFI_NOT_FOUND      No device found.\r
-  @retval EFI_SUCCESS        Success get the next ISA device.\r
+  @retval EFI_SUCCESS    The next ISA controller on the ISA bus was returned.\r
+  @retval EFI_NOT_FOUND  No device found.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_DEVICE_ENUMERATE) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  OUT EFI_ISA_ACPI_DEVICE_ID         **Device\r
+(EFIAPI *EFI_ISA_ACPI_DEVICE_ENUMERATE)(\r
+  IN  EFI_ISA_ACPI_PROTOCOL   *This,\r
+  OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
   );\r
 \r
 /**\r
-  Set ISA device power.\r
+  Sets the power state of an ISA controller.\r
 \r
-  @param  This               Pointer to EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             ISA device.\r
-  @param  OnOff              Whether to set power on or off.\r
+  This services sets the power state of the ISA controller specified by Device to \r
+  the power state specified by OnOff.  If OnOff is TRUE, then power is applied to \r
+  the ISA controller.  If OnOff is FALSE, then power is remobed from the ISA \r
+  controller.  If the power state is sucessfully set on the ISA Controller, then\r
+  EFI_SUCCESS is returned.\r
 \r
-  @retval EFI_SUCCESS        Successfully set ISA device.\r
+  @param[in] This     Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[in] Device   Pointer to an ISA controller named by ACPI HID/UID.\r
+  @param[in] OnOff    TRUE to apply power to the ISA controller.  FALSE to remove\r
+                      power from the ISA controller.\r
+\r
+  @retval EFI_SUCCESS   Successfully set the power state of the ISA controller.\r
+  @retval Other         The ISA controller cound not be placed in the requested power state.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_SET_DEVICE_POWER) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID          *Device,\r
-  IN BOOLEAN                         OnOff\r
+(EFIAPI *EFI_ISA_ACPI_SET_DEVICE_POWER)(\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
+  IN BOOLEAN                 OnOff\r
   );\r
   \r
 /**\r
-  Get current Resource of the specific ISA device.\r
+  Retrieves the current set of resource associated with an ISA controller.\r
+\r
+  Retrieves the set of I/O, MMIO, DMA, and interrupt resources currently \r
+  assigned to the ISA controller specified by Device.  These resources\r
+  are returned in ResourceList.\r
 \r
-  @param  This               Pointer to EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             ISA device.\r
-  @param  ResourceList       Returned resource list.\r
+  @param[in]  This          Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[in]  Device        Pointer to an ISA controller named by ACPI HID/UID.\r
+  @param[out] ResourceList  Pointer to the current resource list for Device.\r
 \r
-  @retval EFI_SUCCESS        Successfully get current resource.\r
-  @retval EFI_NOT_FOUND      No resource found.\r
+  @retval EFI_SUCCESS    Successfully retrieved the current resource list.\r
+  @retval EFI_NOT_FOUND  The resource list could not be retrieved.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_GET_CUR_RESOURCE) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID          *Device,\r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST     **ResourceList\r
+(EFIAPI *EFI_ISA_ACPI_GET_CUR_RESOURCE)(\r
+  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   );\r
 \r
 /**\r
-  Get possible resource for the specific ISA device.\r
+  Retrieves the set of possible resources that may be assigned to an ISA controller\r
+  with SetResource().\r
 \r
-  @param  This               Pointer to EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             ISA device.\r
-  @param  ResourceList       Returned resource list.\r
+  Retrieves the possible sets of I/O, MMIO, DMA, and interrupt resources for the\r
+  ISA controller specified by Device.  The sets are returned in ResourceList.\r
+\r
+  @param[in]  This           Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[in]  Device         Pointer to an ISA controller named by ACPI HID/UID.\r
+  @param[out] ResourceList   Pointer to the returned list of resource lists.\r
+\r
+  @retval EFI_UNSUPPORTED  This services is not supported.\r
 \r
-  @retval EFI_SUCCESS        Successfully get possible resource.\r
-  @retval EFI_NOT_FOUND      No resource found.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_GET_POS_RESOURCE) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID          *Device,\r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST     **ResourceList\r
+(EFIAPI *EFI_ISA_ACPI_GET_POS_RESOURCE)(\r
+  IN EFI_ISA_ACPI_PROTOCOL        *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID       *Device,\r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   );\r
 \r
 /**\r
-  Set resources for the specific ISA device.\r
+  Assigns resources to an ISA controller.\r
 \r
-  @param  This               Pointer to EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             ISA device.\r
-  @param  ResourceList       Resource list will be set.\r
+  Assigns the I/O, MMIO, DMA, and interrupt resources specified by ResourceList\r
+  to the ISA controller specified by Device.  ResourceList must match on of the\r
+  possible resource lists returned by GetPosResource() for the same ISA controller.\r
 \r
-  @retval EFI_SUCCESS        Successfully set resource.\r
+  @param[in] This           Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[in] Device         Pointer to an ISA controller named by ACPI HID/UID.\r
+  @param[in] ResourceList   Pointer to a resources list that must be one of the \r
+                            resource lists returned by GetPosResource() for the\r
+                            ISA controller specified by Device.\r
+\r
+  @retval EFI_SUCCESS  Successfully set resources on the ISA controller.\r
+  @retval Other        The resources could not be set for the ISA controller.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_SET_RESOURCE) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID          *Device,\r
-  IN EFI_ISA_ACPI_RESOURCE_LIST      *ResourceList\r
+(EFIAPI *EFI_ISA_ACPI_SET_RESOURCE)(\r
+  IN EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID      *Device,\r
+  IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
   );    \r
 \r
 /**\r
-  Enable or disable ISA device.\r
+  Enables or disables an ISA controller.\r
 \r
-  @param  This               Pointer of EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             ISA device.\r
-  @param  Enable             Enable/Disable.\r
+  @param[in] This     Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[in] Device   Pointer to the ISA controller to enable/disable.\r
+  @param[in] Enable   TRUE to enable the ISA controller.  FALSE to disable the\r
+                      ISA controller.\r
 \r
-  @retval EFI_SUCCESS        Successfully perform this action.\r
+  @retval EFI_SUCCESS   Successfully enabled/disabled the ISA controller.\r
+  @retval Other         The ISA controller cound not be placed in the requested state.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_ENABLE_DEVICE) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID          *Device,\r
-  IN BOOLEAN                         Enable\r
+(EFIAPI *EFI_ISA_ACPI_ENABLE_DEVICE)(\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
+  IN BOOLEAN                 Enable\r
   );    \r
 \r
 /**\r
-  Init ISA device.\r
+  Places an ISA controller into a usable state.  This service must be called\r
+  before SetResource(), EnableDevice(), or SetPower() will behave as expected.\r
 \r
-  @param  This               Pointer to EFI_ISA_ACPI_PROTOCOL.\r
-  @param  Device             ISA device.\r
+  @param[in] This     Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
+  @param[in] Device   Pointer to an ISA controller named by ACPI HID/UID.\r
 \r
-  @retval EFI_SUCCESS        Successfully initialize ISA device.\r
+  @retval EFI_SUCCESS   Successfully initialized an ISA controller.\r
+  @retval Other         The ISA controller could not be initialized.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_INIT_DEVICE) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID          *Device\r
+(EFIAPI *EFI_ISA_ACPI_INIT_DEVICE)(\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device\r
   );  \r
 \r
 /**\r
-  ISA Interface Init.\r
-\r
-  @param  This               Pointer of EFI_ISA_ACPI_PROTOCOL.\r
+  Initializes all the HW state required for the ISA controlers on the ISA bus \r
+  to be enumerated and managed by this rest of the services in this prorotol.\r
+  This service must be called before any of the other services in this\r
+  protocol will function as expected.\r
\r
+  @param[in] This  Pointer to the EFI_ISA_ACPI_PROTOCOL instance.\r
 \r
-  @retval EFI_SUCCESS        Successfully initialize ISA interface.\r
+  @retval EFI_SUCCESS   Successfully initialized the ISA interface.\r
+  @retval Other         The ISA interface could not be initialized.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_ACPI_INTERFACE_INIT) (\r
-  IN EFI_ISA_ACPI_PROTOCOL           *This\r
+(EFIAPI *EFI_ISA_ACPI_INTERFACE_INIT)(\r
+  IN EFI_ISA_ACPI_PROTOCOL  *This\r
   );\r
 \r
-//\r
-// Interface structure for the ISA ACPI Protocol\r
-//\r
+///\r
+/// The EFI_ISA_ACPI_PROTOCOL provides the services to enumberate and manage\r
+/// ISA controllers on an ISA bus.  This include the ability to initialize, \r
+/// enable, disable, and manag the power state of ISA controllers.  It also \r
+/// includes services to query current ressources, query possible resources, \r
+/// and assign resources to an ISA controller.\r
+///\r
 struct _EFI_ISA_ACPI_PROTOCOL {\r
-  EFI_ISA_ACPI_DEVICE_ENUMERATE     DeviceEnumerate;\r
-  EFI_ISA_ACPI_SET_DEVICE_POWER     SetPower;\r
-  EFI_ISA_ACPI_GET_CUR_RESOURCE     GetCurResource;\r
-  EFI_ISA_ACPI_GET_POS_RESOURCE     GetPosResource;\r
-  EFI_ISA_ACPI_SET_RESOURCE         SetResource;\r
-  EFI_ISA_ACPI_ENABLE_DEVICE        EnableDevice;\r
-  EFI_ISA_ACPI_INIT_DEVICE          InitDevice;\r
-  EFI_ISA_ACPI_INTERFACE_INIT       InterfaceInit;\r
+  EFI_ISA_ACPI_DEVICE_ENUMERATE  DeviceEnumerate;\r
+  EFI_ISA_ACPI_SET_DEVICE_POWER  SetPower;\r
+  EFI_ISA_ACPI_GET_CUR_RESOURCE  GetCurResource;\r
+  EFI_ISA_ACPI_GET_POS_RESOURCE  GetPosResource;\r
+  EFI_ISA_ACPI_SET_RESOURCE      SetResource;\r
+  EFI_ISA_ACPI_ENABLE_DEVICE     EnableDevice;\r
+  EFI_ISA_ACPI_INIT_DEVICE       InitDevice;\r
+  EFI_ISA_ACPI_INTERFACE_INIT    InterfaceInit;\r
 };\r
 \r
 extern EFI_GUID gEfiIsaAcpiProtocolGuid;\r
index 9a2822937f5622b848e89fb1bd1102d981f7a7af..63999b0dc6d4c3465d86747067095c18fb49ade6 100644 (file)
 /** @file\r
-  ISA I/O Protocol is used to perform ISA device Io/Mem operations.\r
-\r
-Copyright (c) 2006 - 2009, 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
+  ISA I/O Protocol is used by ISA device drivers to perform I/O, MMIO and DMA \r
+  operations on the ISA controllers they manage.\r
+  \r
+  Copyright (c) 2006 - 2009, 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
 **/\r
 \r
 #ifndef _EFI_ISA_IO_H_\r
 #define _EFI_ISA_IO_H_\r
 \r
-\r
 #include <Protocol/IsaAcpi.h>\r
 \r
-//\r
-// Global GUID for the ISA I/O Protocol\r
-//\r
+///\r
+/// Global ID for the EFI_ISA_IO_PROTOCOL\r
+///\r
 #define EFI_ISA_IO_PROTOCOL_GUID \\r
-  { 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }\r
+  { \\r
+    0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
+  }\r
 \r
+///\r
+/// Forward declaration for the EFI_ISA_IO_PROTOCOL\r
+///\r
 typedef struct _EFI_ISA_IO_PROTOCOL EFI_ISA_IO_PROTOCOL;\r
 \r
-//\r
-// Width of ISA Io/Mem operation\r
-//\r
+///\r
+/// Width of EFI_ISA_IO_PROTOCOL I/O Port and MMIO operations\r
+///\r
 typedef enum {\r
-  EfiIsaIoWidthUint8,\r
-  EfiIsaIoWidthUint16,\r
-  EfiIsaIoWidthUint32,\r
+  EfiIsaIoWidthUint8 = 0,      ///< 8-bit operation\r
+  EfiIsaIoWidthUint16,         ///< 16-bit operation\r
+  EfiIsaIoWidthUint32,         ///< 32-bit operation\r
   EfiIsaIoWidthReserved,\r
-  EfiIsaIoWidthFifoUint8,\r
-  EfiIsaIoWidthFifoUint16,\r
-  EfiIsaIoWidthFifoUint32,\r
+  EfiIsaIoWidthFifoUint8,      ///< 8-bit FIFO operation\r
+  EfiIsaIoWidthFifoUint16,     ///< 16-bit FIFO operation\r
+  EfiIsaIoWidthFifoUint32,     ///< 32-bit FIFO operation\r
   EfiIsaIoWidthFifoReserved,\r
-  EfiIsaIoWidthFillUint8,\r
-  EfiIsaIoWidthFillUint16,\r
-  EfiIsaIoWidthFillUint32,\r
+  EfiIsaIoWidthFillUint8,      ///< 8-bit Fill operation\r
+  EfiIsaIoWidthFillUint16,     ///< 16-bit Fill operation\r
+  EfiIsaIoWidthFillUint32,     ///< 32-bit Fill operation\r
   EfiIsaIoWidthFillReserved,\r
   EfiIsaIoWidthMaximum\r
 } EFI_ISA_IO_PROTOCOL_WIDTH;\r
 \r
-//\r
-// Attributes for common buffer allocations\r
-//\r
+///\r
+/// Attributes for the EFI_ISA_IO_PROTOCOL common DMA buffer allocations\r
+///\r
 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE  0x080    ///< Map a memory range so write are combined\r
 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED         0x800    ///< Map a memory range so all r/w accesses are cached\r
 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_DISABLE        0x1000   ///< Disable a memory range \r
 \r
-//\r
-// Channel attribute for DMA operations\r
-//\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE  0x001\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A           0x002\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B           0x004\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C           0x008\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8           0x010\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16          0x020\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE       0x040\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE       0x080\r
-#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE   0x100\r
-\r
+///\r
+/// Channel attribute for EFI_ISA_IO_PROTOCOL slave DMA requests\r
+///\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE  0x001   ///< Set the speed of the DMA transfer in compatible mode\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A           0x002   ///< Not supported\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B           0x004   ///< Not supported\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C           0x008   ///< Not supported\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8           0x010   ///< Request 8-bit DMA transfers.  Only available on channels 0..3\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16          0x020   ///< Request 16-bit DMA transfers.  Only available on channels 4..7\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE       0x040   ///< Request a single DMA transfer\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE       0x080   ///< Request multiple DMA transfers until TC(Terminal Count) or EOP(End of Process)\r
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE   0x100   ///< Automatically reload base and count at the end of the DMA transfer\r
+\r
+///\r
+/// The DMA opreration type for EFI_ISA_IO_PROTOCOL DMA requests\r
+///\r
 typedef enum {\r
+  ///\r
+  /// A read operation from system memory by a bus master.\r
+  ///\r
   EfiIsaIoOperationBusMasterRead,\r
+  ///\r
+  /// A write operation to system memory by a bus master.\r
+  ///\r
   EfiIsaIoOperationBusMasterWrite,\r
+  ///\r
+  /// Provides both read and write access to system memory by both the processor\r
+  /// and a bus master. The buffer is coherent from both the processor's and the \r
+  /// bus master's point of view.\r
+  ///\r
   EfiIsaIoOperationBusMasterCommonBuffer,\r
+  ///\r
+  /// A read operation from system memory by a slave device.\r
+  ///\r
   EfiIsaIoOperationSlaveRead,\r
+  ///\r
+  /// A write operation to system memory by a slave master.\r
+  ///\r
   EfiIsaIoOperationSlaveWrite,\r
   EfiIsaIoOperationMaximum\r
 } EFI_ISA_IO_PROTOCOL_OPERATION;\r
 \r
 /**\r
-  Performs an ISA Io/Memory Read/Write Cycle\r
-\r
-  @param This                    A pointer to the EFI_ISA_IO_PROTOCOL instance.  \r
-  @param Width                   Signifies the width of the Io/Memory operation.\r
-  @param Offset                  The offset in ISA Io/Memory space to start the Io/Memory operation.  \r
-  @param Count                   The number of Io/Memory operations to perform.\r
-  @param Buffer                  [OUT] The destination buffer to store the results.\r
-                                 [IN] The source buffer to write data to the device.\r
-\r
+  Performs ISA I/O and MMIO Read/Write Cycles\r
+\r
+  @param[in]      This     A pointer to the EFI_ISA_IO_PROTOCOL instance.  \r
+  @param[in]      Width    Specifies the width of the I/O or MMIO operation.\r
+  @param[in]      Offset   The offset into the ISA I/O or MMIO space to start the \r
+                           operation.  \r
+  @param[in]      Count    The number of I/O or MMIO operations to perform.\r
+  @param[in, out] Buffer   For read operations, the destination buffer to store \r
+                           the results. For write operations, the source buffer to \r
+                           write data from. \r
+                                 \r
   @retval EFI_SUCCESS             The data was read from / written to the device sucessfully.\r
   @retval EFI_UNSUPPORTED         The Offset is not valid for this device.\r
   @retval EFI_INVALID_PARAMETER   Width or Count, or both, were invalid.\r
@@ -92,27 +119,37 @@ typedef enum {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_IO_MEM) (\r
-  IN     EFI_ISA_IO_PROTOCOL          *This,\r
-  IN     EFI_ISA_IO_PROTOCOL_WIDTH    Width,\r
-  IN     UINT32                       Offset,\r
-  IN     UINTN                        Count,\r
-  IN OUT VOID                         *Buffer\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_IO_MEM)(\r
+  IN     EFI_ISA_IO_PROTOCOL        *This,\r
+  IN     EFI_ISA_IO_PROTOCOL_WIDTH  Width,\r
+  IN     UINT32                     Offset,\r
+  IN     UINTN                      Count,\r
+  IN OUT VOID                       *Buffer\r
   );\r
 \r
+///\r
+/// Structure of functions for accessing ISA I/O and MMIO space\r
+///\r
 typedef struct {\r
+  ///\r
+  /// Read from ISA I/O or MMIO space.\r
+  ///\r
   EFI_ISA_IO_PROTOCOL_IO_MEM  Read;\r
+  ///\r
+  /// Write to ISA I/O or MMIO space.\r
+  ///\r
   EFI_ISA_IO_PROTOCOL_IO_MEM  Write;\r
 } EFI_ISA_IO_PROTOCOL_ACCESS;\r
 \r
 /**\r
-  Performs an ISA I/O Copy Memory \r
+  Copies data from one region of ISA MMIO space to another region of ISA\r
+  MMIO space.\r
 \r
-  @param This                    A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
-  @param Width                   Signifies the width of the memory copy operation.\r
-  @param DestOffset              The offset of the destination \r
-  @param SrcOffset               The offset of the source\r
-  @param Count                   The number of memory copy  operations to perform\r
+  @param[in] This         A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Width        Specifies the width of the MMIO copy operation.\r
+  @param[in] DestOffset   The offset of the destination in ISA MMIO space\r
+  @param[in] SrcOffset    The offset of the source in ISA MMIO space\r
+  @param[in] Count        The number tranfers to perform for this copy operation\r
 \r
   @retval EFI_SUCCESS             The data was copied sucessfully.\r
   @retval EFI_UNSUPPORTED         The DestOffset or SrcOffset is not valid for this device.\r
@@ -122,35 +159,63 @@ typedef struct {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_COPY_MEM) (\r
-  IN     EFI_ISA_IO_PROTOCOL          *This,\r
-  IN     EFI_ISA_IO_PROTOCOL_WIDTH    Width,\r
-  IN     UINT32                       DestOffset,\r
-  IN     UINT32                       SrcOffset,\r
-  IN     UINTN                        Count\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_COPY_MEM)(\r
+  IN EFI_ISA_IO_PROTOCOL         *This,\r
+  IN EFI_ISA_IO_PROTOCOL_WIDTH   Width,\r
+  IN UINT32                      DestOffset,\r
+  IN UINT32                      SrcOffset,\r
+  IN UINTN                       Count\r
   );\r
 \r
 /**\r
-  Maps a memory region for DMA\r
-\r
-  @param This                    A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
-  @param Operation               Indicates the type of DMA (slave or bus master), and if \r
-                                 the DMA operation is going to read or write to system memory. \r
-  @param ChannelNumber           The slave channel number to use for this DMA operation. \r
-                                 If Operation and ChannelAttributes shows that this device \r
-                                 performs bus mastering DMA, then this field is ignored.  \r
-                                 The legal range for this field is 0..7.  \r
-  @param ChannelAttributes       The attributes of the DMA channel to use for this DMA operation\r
-  @param HostAddress             The system memory address to map to the device.  \r
-  @param NumberOfBytes           On input the number of bytes to map.  On output the number \r
-                                 of bytes that were mapped.\r
-  @param DeviceAddress           The resulting map address for the bus master device to use \r
-                                 to access the hosts HostAddress.  \r
-  @param Mapping                 A resulting value to pass to EFI_ISA_IO.Unmap().\r
-\r
+  Maps a memory region for DMA.\r
+\r
+  This function returns the device specific addresses required to access system memory.\r
+  This function is used to map system memory for ISA DMA operations.  All ISA DMA \r
+  operations must be performed through their mapped addresses and such mappings must \r
+  be freed with EFI_ISA_IO_PROTOCOL.Unmap() after the DMA operation is completed.  \r
+  If the DMA operation is a single read or write data transfer through an ISA bus \r
+  master, then EfiIsaIoOperationBusMasterRead or EfiIsaIoOperationBusMasterWrite \r
+  is used and the range is unmapped to complete the operation. If the DMA operation\r
+  is a single read or write data transfer through an ISA slave controller, then \r
+  EfiIsaIoOperationSlaveRead or EfiIsaIoOperationSlaveWrite is used and the range \r
+  is unmapped to complete the operation.  If performing a DMA read operation, all \r
+  the data must be present in system memory before the Map() is performed.  Similarly, \r
+  if performing a DMA write operation, the data must not be accessed in system \r
+  memory until EFI_ISA_IO_PROTOCOL.Unmap() is performed.  Bus master operations that \r
+  require both read and write access or require multiple host device interactions \r
+  within the same mapped region must use EfiIsaIoOperationBusMasterCommonBuffer.  \r
+  However, only memory allocated via the EFI_ISA_IO_PROTOCOL.AllocateBuffer() interface \r
+  are guaranteed to be able to be mapped for this operation type.  In all mapping \r
+  requests the NumberOfBytes returned may be less than originally requested.  It is\r
+  the caller's responsibility to make additional requests to complete the entire\r
+  transfer.\r
+\r
+  @param[in]      This                A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in]      Operation           Indicates the type of DMA (slave or bus master), \r
+                                      and if the DMA operation is going to read or \r
+                                      write to system memory. \r
+  @param[in]      ChannelNumber       The slave channel number to use for this DMA \r
+                                      operation.  If Operation and ChannelAttributes \r
+                                      shows that this device performs bus mastering \r
+                                      DMA, then this field is ignored.  The legal \r
+                                      range for this field is 0..7.\r
+  @param[in]      ChannelAttributes   A bitmask of the attributes used to configure\r
+                                      the slave DMA channel for this DMA operation.  \r
+                                      See EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_* for the\r
+                                      legal bit combinations.\r
+  @param[in]      HostAddress         The system memory address to map to the device.\r
+  @param[in, out] NumberOfBytes       On input the number of bytes to map.  On \r
+                                      output the number of bytes that were mapped.\r
+  @param[out]     DeviceAddress       The resulting map address for the bus master \r
+                                      device to use to access the hosts HostAddress.  \r
+  @param[out]     Mapping             A returned value that must be passed to into\r
+                                      EFI_ISA_IO_PROTOCOL.Unmap() to free all the the \r
+                                      resources associated with this map request.\r
 \r
   @retval EFI_SUCCESS             The range was mapped for the returned NumberOfBytes.\r
-  @retval EFI_INVALID_PARAMETER   The Operation or HostAddress is undefined.\r
+  @retval EFI_INVALID_PARAMETER   The Operation is undefined.\r
+  @retval EFI_INVALID_PARAMETER   The HostAddress is undefined.\r
   @retval EFI_UNSUPPORTED         The HostAddress can not be mapped as a common buffer.\r
   @retval EFI_DEVICE_ERROR        The system hardware could not map the requested address.\r
   @retval EFI_OUT_OF_RESOURCES    The memory pages could not be allocated.\r
@@ -158,7 +223,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_MAP) (\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_MAP)(\r
   IN     EFI_ISA_IO_PROTOCOL            *This,\r
   IN     EFI_ISA_IO_PROTOCOL_OPERATION  Operation,\r
   IN     UINT8                          ChannelNumber      OPTIONAL,\r
@@ -170,56 +235,64 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Unmaps a memory region for DMA\r
+  Unmaps a memory region that was previously mapped with EFI_ISA_IO_PROTOCOL.Map()\r
 \r
-  @param This               A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
-  @param Mapping            The mapping value returned from EFI_ISA_IO.Map().\r
+  The EFI_ISA_IO_PROTOCOL.Map() operation is completed and any corresponding \r
+  resources are released.  If the operation was EfiIsaIoOperationSlaveWrite \r
+  or EfiIsaIoOperationBusMasterWrite, the data is committed to system memory.  \r
+  Any resources used for the mapping are freed.\r
 \r
-  @retval EFI_SUCCESS        The range was unmapped.\r
-  @retval EFI_DEVICE_ERROR   The data was not committed to the target system memory.\r
+  @param[in] This           A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Mapping        The mapping value returned from EFI_ISA_IO_PROTOCOL.Map().\r
 \r
+  @retval EFI_SUCCESS       The memory region was unmapped.\r
+  @retval EFI_DEVICE_ERROR  The data was not committed to the target system memory.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_UNMAP) (\r
-  IN  EFI_ISA_IO_PROTOCOL          *This,\r
-  IN  VOID                         *Mapping\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_UNMAP)(\r
+  IN  EFI_ISA_IO_PROTOCOL  *This,\r
+  IN  VOID                 *Mapping\r
   );\r
 \r
 /**\r
-  Allocates a common buffer for DMA\r
+  Allocates pages that are suitable for an EfiIsaIoOperationBusMasterCommonBuffer\r
+  mapping.                                                                       \r
 \r
-  @param This                    A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
-  @param Type                    The type allocation to perform.\r
-  @param MemoryType              The type of memory to allocate.\r
-  @param Pages                   The number of pages to allocate.\r
-  @param HostAddress             A pointer to store the base address of the allocated range.\r
-  @param Attributes              The requested bit mask of attributes for the allocated range.\r
+  @param[in]  This          A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in]  Type          The type allocation to perform. \r
+  @param[in]  MemoryType    The type of memory to allocate.\r
+  @param[in]  Pages         The number of pages to allocate.\r
+  @param[out] HostAddress   A pointer to store the base address of the allocated range.\r
+  @param[in]  Attributes    The requested bit mask of attributes for the allocated range.\r
 \r
   @retval EFI_SUCCESS             The requested memory pages were allocated.\r
-  @retval EFI_INVALID_PARAMETER   Type is invalid or MemoryType is invalid or HostAddress is NULL\r
-  @retval EFI_UNSUPPORTED         Attributes is unsupported or the memory range specified \r
-                                  by HostAddress, Pages, and Type is not available for common buffer use.\r
+  @retval EFI_INVALID_PARAMETER   Type is invalid.\r
+  @retval EFI_INVALID_PARAMETER   MemoryType is invalid\r
+  @retval EFI_INVALID_PARAMETER   HostAddress is NULL\r
+  @retval EFI_UNSUPPORTED         Attributes is unsupported.\r
+  @retval EFI_UNSUPPORTED         The memory range specified by HostAddress, Pages,\r
+                                  and Type is not available for common buffer use.\r
   @retval EFI_OUT_OF_RESOURCES    The memory pages could not be allocated.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER) (\r
-  IN  EFI_ISA_IO_PROTOCOL          *This,\r
-  IN  EFI_ALLOCATE_TYPE            Type,\r
-  IN  EFI_MEMORY_TYPE              MemoryType,\r
-  IN  UINTN                        Pages,\r
-  OUT VOID                         **HostAddress,\r
-  IN  UINT64                       Attributes\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER)(\r
+  IN  EFI_ISA_IO_PROTOCOL  *This,\r
+  IN  EFI_ALLOCATE_TYPE    Type,\r
+  IN  EFI_MEMORY_TYPE      MemoryType,\r
+  IN  UINTN                Pages,\r
+  OUT VOID                 **HostAddress,\r
+  IN  UINT64               Attributes\r
   );\r
 \r
 /**\r
-  Frees a common buffer \r
+  Frees a common buffer that was allocated with EFI_ISA_IO_PROTOCOL.AllocateBuffer()\r
 \r
-  @param This                    A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
-  @param Pages                   The number of pages to free.\r
-  @param HostAddress             The base address of the allocated range.\r
+  @param[in] This          A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Pages         The number of pages to free from the previously allocated common buffer.\r
+  @param[in] HostAddress   The base address of the previously allocated common buffer.\r
 \r
 \r
   @retval EFI_SUCCESS             The requested memory pages were freed.\r
@@ -228,30 +301,34 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_FREE_BUFFER) (\r
-  IN  EFI_ISA_IO_PROTOCOL          *This,\r
-  IN  UINTN                        Pages,\r
-  IN  VOID                         *HostAddress\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_FREE_BUFFER)(\r
+  IN  EFI_ISA_IO_PROTOCOL  *This,\r
+  IN  UINTN                Pages,\r
+  IN  VOID                 *HostAddress\r
   );\r
 \r
 /**\r
-  Flushes a DMA buffer\r
+  Flushes a DMA buffer.  This forces all DMA posted write transactions to complete.\r
 \r
-  @param This                 A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] This   A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
 \r
-  @retval  EFI_SUCCESS        The buffers were flushed.\r
+  @retval  EFI_SUCCESS        The DMA buffers were flushed.\r
   @retval  EFI_DEVICE_ERROR   The buffers were not flushed due to a hardware error.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ISA_IO_PROTOCOL_FLUSH) (\r
-  IN EFI_ISA_IO_PROTOCOL                  *This\r
+(EFIAPI *EFI_ISA_IO_PROTOCOL_FLUSH)(\r
+  IN EFI_ISA_IO_PROTOCOL  *This\r
   );\r
 \r
-//\r
-// Interface structure for the ISA I/O Protocol\r
-//\r
+///\r
+/// The EFI_ISA_IO_PROTOCOL provides the basic Memory, I/O, and DMA interfaces \r
+/// used to abstract accesses to ISA controllers.  There is one EFI_ISA_IO_PROTOCOL \r
+/// instance for each ISA controller on a ISA bus. A device driver that wishes \r
+/// to manage an ISA controller in a system will have to retrieve the \r
+/// ISA_PCI_IO_PROTOCOL instance that is associated with the ISA controller.\r
+///\r
 struct _EFI_ISA_IO_PROTOCOL {\r
   EFI_ISA_IO_PROTOCOL_ACCESS           Mem;\r
   EFI_ISA_IO_PROTOCOL_ACCESS           Io;\r
@@ -261,8 +338,20 @@ struct _EFI_ISA_IO_PROTOCOL {
   EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER  AllocateBuffer;\r
   EFI_ISA_IO_PROTOCOL_FREE_BUFFER      FreeBuffer;\r
   EFI_ISA_IO_PROTOCOL_FLUSH            Flush;\r
+  ///\r
+  /// The list of I/O , MMIO, DMA, and Interrupt resources associated with the\r
+  /// ISA controller abstracted by this instance of the EFI_ISA_IO_PROTOCOL.\r
+  ///\r
   EFI_ISA_ACPI_RESOURCE_LIST           *ResourceList;\r
+  ///\r
+  /// The size, in bytes, of the ROM image.\r
+  ///\r
   UINT32                               RomSize;\r
+  ///\r
+  /// A pointer to the in memory copy of the ROM image. The ISA Bus Driver is responsible \r
+  /// for allocating memory for the ROM image, and copying the contents of the ROM to memory\r
+  /// during ISA Bus initialization.\r
+  /// \r
   VOID                                 *RomImage;\r
 };\r
 \r
index a76d4e2e5eda17d13825584a71c935116888e3b1..f8a73879a7cd9fae3a4c6987fac0fa10d9d7baa0 100644 (file)
@@ -1,55 +1,91 @@
 /** @file\r
-  Vga Mini port binding for a VGA controller\r
+  VGA Mini Port Protocol that is used to set the text display mode of a VGA controller.\r
 \r
-Copyright (c) 2006 - 2007, 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
+  Copyright (c) 2006 - 2009, 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
 **/\r
 \r
 #ifndef __VGA_MINI_PORT_H_\r
 #define __VGA_MINI_PORT_H_\r
 \r
+///\r
+/// Global ID for the EFI_VGA_MINI_PORT_PROTOCOL\r
+///\r
 #define EFI_VGA_MINI_PORT_PROTOCOL_GUID \\r
   { \\r
     0xc7735a2f, 0x88f5, 0x4882, {0xae, 0x63, 0xfa, 0xac, 0x8c, 0x8b, 0x86, 0xb3 } \\r
   }\r
 \r
+///\r
+/// Forward declaration for the EFI_VGA_MINI_PORT_PROTOCOL\r
+///\r
 typedef struct _EFI_VGA_MINI_PORT_PROTOCOL  EFI_VGA_MINI_PORT_PROTOCOL;\r
 \r
 /**\r
-  Sets the text display mode of a VGA controller\r
+  Sets the text display mode of a VGA controller.\r
   \r
-  @param This             Protocol instance pointer.\r
-  @param Mode             Mode number.  0 - 80x25   1-80x50\r
+  Sets the text display mode of the VGA controller to the mode specified by \r
+  ModeNumber.  A ModeNumber of 0 is a request for an 80x25 text mode.  A \r
+  ModeNumber of 1 is a request for an 80x50 text mode.  If ModeNumber is greater\r
+  than MaxModeNumber, then EFI_UNSUPPORTED is returned.  If the VGA controller \r
+  is not functioning properly, then EFI_DEVICE_ERROR is returned.  If the VGA\r
+  controller is sucessfully set to the mode number specified by ModeNumber, then \r
+  EFI_SUCCESS is returned.\r
+    \r
+  @param[in] This         A pointer to the EFI_VGA_MINI_PORT_PROTOCOL instance.\r
+  @param[in] ModeNumber   The requested mode number.  0 for 80x25.  1 for 80x5.\r
 \r
-  @retval EFI_SUCCESS            The mode was set\r
-  @retval EFI_DEVICE_ERROR       The device is not functioning properly.\r
+  @retval EFI_SUCCESS        The mode number was set\r
+  @retval EFI_UNSUPPORTED    The mode number specified by ModeNumber is not supported.\r
+  @retval EFI_DEVICE_ERROR   The device is not functioning properly.\r
   \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (\r
-  IN EFI_VGA_MINI_PORT_PROTOCOL          * This,\r
-  IN UINTN                               ModeNumber\r
+(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE)(\r
+  IN EFI_VGA_MINI_PORT_PROTOCOL  *This,\r
+  IN UINTN                        ModeNumber\r
   );\r
 \r
 struct _EFI_VGA_MINI_PORT_PROTOCOL {\r
   EFI_VGA_MINI_PORT_SET_MODE  SetMode;\r
-\r
+  ///\r
+  /// MMIO base address of the VGA text mode framebuffer.  Typically set to 0xB8000.\r
+  ///\r
   UINT64                      VgaMemoryOffset;\r
+  ///\r
+  /// I/O Port address for the VGA CRTC address register  Typically set to 0x3D4.\r
+  ///\r
   UINT64                      CrtcAddressRegisterOffset;\r
+  ///\r
+  /// I/O Port address for the VGA CRTC data register.  Typically set to 0x3D5.\r
+  ///\r
   UINT64                      CrtcDataRegisterOffset;\r
-\r
+  ///\r
+  /// PCI Controller MMIO BAR index of the VGA text mode frame buffer.  Typically \r
+  /// set to EFI_PCI_IO_PASS_THROUGH_BAR\r
+  ///\r
   UINT8                       VgaMemoryBar;\r
+  ///\r
+  /// PCI Controller I/O BAR index of the VGA CRTC address register.  Typically \r
+  /// set to EFI_PCI_IO_PASS_THROUGH_BAR\r
+  ///\r
   UINT8                       CrtcAddressRegisterBar;\r
+  ///\r
+  /// PCI Controller I/O BAR index of the VGA CRTC data register.  Typically set \r
+  /// to EFI_PCI_IO_PASS_THROUGH_BAR\r
+  ///\r
   UINT8                       CrtcDataRegisterBar;\r
-\r
+  ///\r
+  /// The maximum number of text modes that this VGA controller supports.\r
+  ///\r
   UINT8                       MaxMode;\r
 };\r
 \r