]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add runtime registration function to all PCI Libs
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Nov 2008 08:34:06 +0000 (08:34 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Nov 2008 08:34:06 +0000 (08:34 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6708 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c
MdePkg/Library/BasePciExpressLib/PciExpressLib.c
MdePkg/Library/BasePciLibCf8/PciLib.c
MdePkg/Library/BasePciLibPciExpress/PciLib.c
MdePkg/Library/PeiPciLibPciCfg2/PciLib.c
MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c
MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c
MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c

index 995e4ab1b7154ed9efde34670d62f977d7644e03..d6bc180b8b2e216f093577e7333bf09500fcc128 100644 (file)
 #define ASSERT_INVALID_PCI_ADDRESS(A,M) \\r
   ASSERT (((A) & (~0xffff0ff | (M))) == 0)\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
+  return RETURN_SUCCESS;\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index 6bce8f9550fe7260db311ad69db23f2f8781ff7e..6d76e846fa5a8dafcf4b60ec76c1844de5c9219b 100644 (file)
 #define ASSERT_INVALID_PCI_ADDRESS(A) \\r
   ASSERT (((A) & ~0xfffffff) == 0)\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
+  return RETURN_UNSUPPORTED;\r
+}\r
 \r
 /**\r
   Gets the base address of PCI Express.\r
index af71b88e597b9f9146069837d9e40823a7f5e1d3..d4a3ef06f636896194b137decaaca6ca9410fd3a 100644 (file)
 #include <Library/PciLib.h>\r
 #include <Library/PciCf8Lib.h>\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
+  return PciCf8RegisterForRuntimeAccess (Address);\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index c1abd09f631cc8d9dbe586f7407771a9a52711ff..48fe66f1801e7af4a22017ec332a72f3221dedea 100644 (file)
 #include <Library/PciLib.h>\r
 #include <Library/PciExpressLib.h>\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
+  return PciExpressRegisterForRuntimeAccess (Address);\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index 63b1b9fc172807f2de4446818327d88d59243426..080195f6930e53ed28e3a9f8afa6bce591ff2dc4 100644 (file)
@@ -124,6 +124,33 @@ PeiPciLibPciCfg2WriteWorker (
   return Data;\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
+PciRegisterForRuntimeAccess (\r
+  IN UINTN  Address\r
+  )\r
+{\r
+  return RETURN_UNSUPPORTED;\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index 54ff1cbe65b4a8681d4702b87bd64fadf7848414..453f2ded0f718f02bf11ff786ee24179f2ec2bc6 100644 (file)
@@ -159,6 +159,33 @@ PeiPciSegmentLibPciCfg2WriteWorker (
   return Data;\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
+  return RETURN_UNSUPPORTED;\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index a408b0a0f1e8eb8fb5bfa12d1b30ffdbad459547..7e5c60858b418ac2bb7c5fb4acf8c6ca1c1e7d0c 100644 (file)
@@ -142,6 +142,33 @@ DxePciLibPciRootBridgeIoWriteWorker (
   return Data;\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
+PciRegisterForRuntimeAccess (\r
+  IN UINTN  Address\r
+  )\r
+{\r
+  return RETURN_UNSUPPORTED;\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r
index 058d2debc68b36368aeb8f146ce68b45d2d22c0d..cb8991e2da7dd1b56827b3d6337d9b521c25161f 100644 (file)
@@ -240,6 +240,33 @@ DxePciSegmentLibPciRootBridgeIoWriteWorker (
   return Data;\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
+  return RETURN_UNSUPPORTED;\r
+}\r
+\r
 /**\r
   Reads an 8-bit PCI configuration register.\r
 \r