]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/PciCf8Lib.h
Synchronize function comment in h file
[mirror_edk2.git] / MdePkg / Include / Library / PciCf8Lib.h
index 1f6ec13ffdd18f550bee29c45fbb30583c19369d..3683590eff29f9ba31376cb1c252c525a0789aa9 100644 (file)
@@ -1,14 +1,18 @@
 /** @file\r
-  PCI CF8 Library Services for PCI Segment #0\r
+  Provides services to access PCI Configuration Space using the I/O ports 0xCF8 and 0xCFC.\r
+  \r
+  This library is identical to the PCI Library, except the access method for performing PCI \r
+  configuration cycles must be though I/O ports 0xCF8 and 0xCFC.  This library only allows \r
+  access to PCI Segment #0.\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
+Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
+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
 #define PCI_CF8_LIB_ADDRESS(Bus,Device,Function,Offset) \\r
   (((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))\r
 \r
+/**\r
+  Register a PCI device so PCI configuration registers may be accessed after \r
+  SetVirtualAddressMap().\r
+  \r
+  If Address > 0x0FFFFFFF, then ASSERT().\r
+\r
+  @param  Address Address that encodes the PCI Bus, Device, Function and\r
+                  Register.\r
+  \r
+  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.\r
+  @retval RETURN_UNSUPPORTED       An attempt was made to call this function \r
+                                   after ExitBootServices().\r
+  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device\r
+                                   at runtime could not be mapped.\r
+  @retval RETURN_OUT_OF_RESOURCES  There are not enough resources available to\r
+                                   complete the registration.\r
+\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+PciCf8RegisterForRuntimeAccess (\r
+  IN UINTN  Address\r
+  );\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
@@ -78,7 +106,7 @@ UINT8
 EFIAPI\r
 PciCf8Write8 (\r
   IN      UINTN                     Address,\r
-  IN      UINT8                     Data\r
+  IN      UINT8                     Value\r
   );\r
 \r
 /**\r
@@ -388,7 +416,7 @@ UINT16
 EFIAPI\r
 PciCf8Write16 (\r
   IN      UINTN                     Address,\r
-  IN      UINT16                    Data\r
+  IN      UINT16                    Value\r
   );\r
 \r
 /**\r
@@ -706,7 +734,7 @@ UINT32
 EFIAPI\r
 PciCf8Write32 (\r
   IN      UINTN                     Address,\r
-  IN      UINT32                    Data\r
+  IN      UINT32                    Value\r
   );\r
 \r
 /**\r
@@ -1000,7 +1028,7 @@ PciCf8BitFieldAndThenOr32 (
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer receiving the data read.\r
 \r
-  @return Size\r
+  @return Size read from StartAddress.\r
 \r
 **/\r
 UINTN\r
@@ -1033,7 +1061,7 @@ PciCf8ReadBuffer (
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer containing the data to write.\r
 \r
-  @return Size\r
+  @return Size written to StartAddress.\r
 \r
 **/\r
 UINTN\r