]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add runtime registration functions to the 4 PCI Library classes
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Nov 2008 08:29:02 +0000 (08:29 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Nov 2008 08:29:02 +0000 (08:29 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6703 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/PciCf8Lib.h
MdePkg/Include/Library/PciExpressLib.h
MdePkg/Include/Library/PciLib.h
MdePkg/Include/Library/PciSegmentLib.h

index e1f7e888eb48bd8f1f452fb707494d8d37a0efb1..e2415ff93608efaf29f67493056c108be57a8703 100644 (file)
@@ -39,6 +39,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
index 68d17901f6f3a3a1eda37ef2759df2fd24d395bc..098f815510e331f581c1d57c5a91d498eabccc26 100644 (file)
@@ -38,6 +38,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define PCI_EXPRESS_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
+PciExpressRegisterForRuntimeAccess (\r
+  IN UINTN  Address\r
+  );\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index 4e413aa9f136e043257834ac4a0b3d647447d3da..184b9f6d7d55b6a12cf6bcf9787c849f2234049b 100644 (file)
@@ -40,6 +40,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define PCI_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
+PciRegisterForRuntimeAccess (\r
+  IN UINTN  Address\r
+  );\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index 2801053710761deab5256f7e51596c76a3bd58d8..e65e9a3590865e9cb061c62ed9497a9d75991716 100644 (file)
@@ -63,6 +63,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     (LShiftU64((Segment) & 0xffff, 32)) \\r
   )\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
+PciSegmentRegisterForRuntimeAccess (\r
+  IN UINTN  Address\r
+  );\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r