]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h
MdeModulePkg: fix UninstallMultipleProtocolInterfaces() calls
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciResourceSupport.h
index faa6c0d60c0248d6f3ed5b5f45f28d9e7057fc47..9f2de291bae369f660f22e4fcb2f1be5e54c7760 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
-  PCI resouces support functions declaration for PCI Bus module.\r
+  PCI resources support functions declaration for PCI Bus module.\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 - 2019, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -16,9 +10,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _EFI_PCI_RESOURCE_SUPPORT_H_\r
 \r
 typedef enum {\r
-  PciResUsageTypical            = 0,\r
-  PciResUsagePadding,\r
-  PciResUsageOptionRomProcessing\r
+  PciResUsageTypical,\r
+  PciResUsagePadding\r
 } PCI_RESOURCE_USAGE;\r
 \r
 #define PCI_RESOURCE_SIGNATURE  SIGNATURE_32 ('p', 'c', 'r', 'c')\r
@@ -83,11 +76,11 @@ InsertResourceNode (
 \r
 /**\r
   This routine is used to merge two different resource trees in need of\r
-  resoure degradation.\r
+  resource degradation.\r
 \r
   For example, if an upstream PPB doesn't support,\r
   prefetchable memory decoding, the PCI bus driver will choose to call this function\r
-  to merge prefectchable memory resource list into normal memory list.\r
+  to merge prefetchable memory resource list into normal memory list.\r
 \r
   If the TypeMerge is TRUE, Res resource type is changed to the type of destination resource\r
   type.\r
@@ -122,7 +115,7 @@ CalculateApertureIo16 (
   This function is used to calculate the resource aperture\r
   for a given bridge device.\r
 \r
-  @param Bridge      PCI resouce node for given bridge device.\r
+  @param Bridge      PCI resource node for given bridge device.\r
 \r
 **/\r
 VOID\r
@@ -131,7 +124,7 @@ CalculateResourceAperture (
   );\r
 \r
 /**\r
-  Get IO/Memory resource infor for given PCI device.\r
+  Get IO/Memory resource info for given PCI device.\r
 \r
   @param PciDev     Pci device instance.\r
   @param IoNode     Resource info node for IO .\r
@@ -176,15 +169,17 @@ CreateResourceNode (
   );\r
 \r
 /**\r
-  This function is used to extract resource request from\r
-  IOV VF device node list.\r
+  This function is used to create a IOV VF resource node.\r
 \r
-  @param Bridge     Pci device instance.\r
-  @param IoNode     Resource info node for IO.\r
-  @param Mem32Node  Resource info node for 32-bit memory.\r
-  @param PMem32Node Resource info node for 32-bit Prefetchable Memory.\r
-  @param Mem64Node  Resource info node for 64-bit memory.\r
-  @param PMem64Node Resource info node for 64-bit Prefetchable Memory.\r
+  @param PciDev       Pci device instance.\r
+  @param Length       Length of Io/Memory resource.\r
+  @param Alignment    Alignment of resource.\r
+  @param Bar          Bar index.\r
+  @param ResType      Type of resource: IO/Memory.\r
+  @param ResUsage     Resource usage.\r
+\r
+  @return PCI resource node created for given VF PCI device.\r
+          NULL means PCI resource node is not created.\r
 \r
 **/\r
 PCI_RESOURCE_NODE *\r
@@ -283,10 +278,10 @@ BridgeSupportResourceDecode (
   This function is used to program the resource allocated\r
   for each resource node under specified bridge.\r
 \r
-  @param Base     Base address of resource to be progammed.\r
+  @param Base     Base address of resource to be programmed.\r
   @param Bridge   PCI resource node for the bridge device.\r
 \r
-  @retval EFI_SUCCESS            Successfully to program all resouces\r
+  @retval EFI_SUCCESS            Successfully to program all resources\r
                                  on given PCI bridge device.\r
   @retval EFI_OUT_OF_RESOURCES   Base is all one.\r
 \r
@@ -300,8 +295,8 @@ ProgramResource (
 /**\r
   Program Bar register for PCI device.\r
 \r
-  @param Base  Base address for PCI device resource to be progammed.\r
-  @param Node  Point to resoure node structure.\r
+  @param Base  Base address for PCI device resource to be programmed.\r
+  @param Node  Point to resource node structure.\r
 \r
 **/\r
 VOID\r
@@ -313,8 +308,8 @@ ProgramBar (
 /**\r
   Program IOV VF Bar register for PCI device.\r
 \r
-  @param Base  Base address for PCI device resource to be progammed.\r
-  @param Node  Point to resoure node structure.\r
+  @param Base  Base address for PCI device resource to be programmed.\r
+  @param Node  Point to resource node structure.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -324,10 +319,10 @@ ProgramVfBar (
   );\r
 \r
 /**\r
-  Program PCI-PCI bridge apperture.\r
+  Program PCI-PCI bridge aperture.\r
 \r
   @param Base  Base address for resource.\r
-  @param Node  Point to resoure node structure.\r
+  @param Node  Point to resource node structure.\r
 \r
 **/\r
 VOID\r
@@ -339,13 +334,13 @@ ProgramPpbApperture (
 /**\r
   Program parent bridge for Option Rom.\r
 \r
-  @param PciDevice      Pci deivce instance.\r
-  @param OptionRomBase  Base address for Optiona Rom.\r
+  @param PciDevice      Pci device instance.\r
+  @param OptionRomBase  Base address for Option Rom.\r
   @param Enable         Enable or disable PCI memory.\r
 \r
 **/\r
 VOID\r
-ProgrameUpstreamBridgeForRom (\r
+ProgramUpstreamBridgeForRom (\r
   IN PCI_IO_DEVICE   *PciDevice,\r
   IN UINT32          OptionRomBase,\r
   IN BOOLEAN         Enable\r
@@ -380,38 +375,7 @@ InitializeResourcePool (
   );\r
 \r
 /**\r
-  Get all resource information for given Pci device.\r
-\r
-  @param PciDev         Pci device instance.\r
-  @param IoBridge       Io resource node.\r
-  @param Mem32Bridge    32-bit memory node.\r
-  @param PMem32Bridge   32-bit Pmemory node.\r
-  @param Mem64Bridge    64-bit memory node.\r
-  @param PMem64Bridge   64-bit PMemory node.\r
-  @param IoPool         Link list header for Io resource.\r
-  @param Mem32Pool      Link list header for 32-bit memory.\r
-  @param PMem32Pool     Link list header for 32-bit Prefetchable memory.\r
-  @param Mem64Pool      Link list header for 64-bit memory.\r
-  @param PMem64Pool     Link list header for 64-bit Prefetchable memory.\r
-\r
-**/\r
-VOID\r
-GetResourceMap (\r
-  IN PCI_IO_DEVICE      *PciDev,\r
-  IN PCI_RESOURCE_NODE  **IoBridge,\r
-  IN PCI_RESOURCE_NODE  **Mem32Bridge,\r
-  IN PCI_RESOURCE_NODE  **PMem32Bridge,\r
-  IN PCI_RESOURCE_NODE  **Mem64Bridge,\r
-  IN PCI_RESOURCE_NODE  **PMem64Bridge,\r
-  IN PCI_RESOURCE_NODE  *IoPool,\r
-  IN PCI_RESOURCE_NODE  *Mem32Pool,\r
-  IN PCI_RESOURCE_NODE  *PMem32Pool,\r
-  IN PCI_RESOURCE_NODE  *Mem64Pool,\r
-  IN PCI_RESOURCE_NODE  *PMem64Pool\r
-  );\r
-\r
-/**\r
-  Destory given resource tree.\r
+  Destroy given resource tree.\r
 \r
   @param Bridge  PCI resource root node of resource tree.\r
 \r