X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciResourceSupport.h;h=d3c120499384527552dda31a3fed0dc5aa91823c;hp=cd0f417e081b6143e0af9713e3abfdbad3e025fc;hb=fcdfcdbfc2e5dc6a96ce550a1f46edb4007f35a9;hpb=cd5ebaa06dca3e6ef3c464081e6defe00d358c69 diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h index cd0f417e08..d3c1204993 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h @@ -1,7 +1,7 @@ /** @file - PCI resouces support functions declaration for PCI Bus module. + PCI resources support functions declaration for PCI Bus module. -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,9 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define _EFI_PCI_RESOURCE_SUPPORT_H_ typedef enum { - PciResUsageTypical = 0, - PciResUsagePadding, - PciResUsageOptionRomProcessing + PciResUsageTypical, + PciResUsagePadding } PCI_RESOURCE_USAGE; #define PCI_RESOURCE_SIGNATURE SIGNATURE_32 ('p', 'c', 'r', 'c') @@ -83,11 +82,11 @@ InsertResourceNode ( /** This routine is used to merge two different resource trees in need of - resoure degradation. + resource degradation. For example, if an upstream PPB doesn't support, prefetchable memory decoding, the PCI bus driver will choose to call this function - to merge prefectchable memory resource list into normal memory list. + to merge prefetchable memory resource list into normal memory list. If the TypeMerge is TRUE, Res resource type is changed to the type of destination resource type. @@ -122,7 +121,7 @@ CalculateApertureIo16 ( This function is used to calculate the resource aperture for a given bridge device. - @param Bridge PCI resouce node for given bridge device. + @param Bridge PCI resource node for given bridge device. **/ VOID @@ -131,7 +130,7 @@ CalculateResourceAperture ( ); /** - Get IO/Memory resource infor for given PCI device. + Get IO/Memory resource info for given PCI device. @param PciDev Pci device instance. @param IoNode Resource info node for IO . @@ -176,8 +175,7 @@ CreateResourceNode ( ); /** - This function is used to extract resource request from - IOV VF device node list. + This function is used to create a IOV VF resource node. @param PciDev Pci device instance. @param Length Length of Io/Memory resource. @@ -186,7 +184,7 @@ CreateResourceNode ( @param ResType Type of resource: IO/Memory. @param ResUsage Resource usage. - @return PCI resource node created for given PCI device. + @return PCI resource node created for given VF PCI device. NULL means PCI resource node is not created. **/ @@ -286,10 +284,10 @@ BridgeSupportResourceDecode ( This function is used to program the resource allocated for each resource node under specified bridge. - @param Base Base address of resource to be progammed. + @param Base Base address of resource to be programmed. @param Bridge PCI resource node for the bridge device. - @retval EFI_SUCCESS Successfully to program all resouces + @retval EFI_SUCCESS Successfully to program all resources on given PCI bridge device. @retval EFI_OUT_OF_RESOURCES Base is all one. @@ -303,8 +301,8 @@ ProgramResource ( /** Program Bar register for PCI device. - @param Base Base address for PCI device resource to be progammed. - @param Node Point to resoure node structure. + @param Base Base address for PCI device resource to be programmed. + @param Node Point to resource node structure. **/ VOID @@ -316,8 +314,8 @@ ProgramBar ( /** Program IOV VF Bar register for PCI device. - @param Base Base address for PCI device resource to be progammed. - @param Node Point to resoure node structure. + @param Base Base address for PCI device resource to be programmed. + @param Node Point to resource node structure. **/ EFI_STATUS @@ -327,10 +325,10 @@ ProgramVfBar ( ); /** - Program PCI-PCI bridge apperture. + Program PCI-PCI bridge aperture. @param Base Base address for resource. - @param Node Point to resoure node structure. + @param Node Point to resource node structure. **/ VOID @@ -342,13 +340,13 @@ ProgramPpbApperture ( /** Program parent bridge for Option Rom. - @param PciDevice Pci deivce instance. - @param OptionRomBase Base address for Optiona Rom. + @param PciDevice Pci device instance. + @param OptionRomBase Base address for Option Rom. @param Enable Enable or disable PCI memory. **/ VOID -ProgrameUpstreamBridgeForRom ( +ProgramUpstreamBridgeForRom ( IN PCI_IO_DEVICE *PciDevice, IN UINT32 OptionRomBase, IN BOOLEAN Enable @@ -383,38 +381,7 @@ InitializeResourcePool ( ); /** - Get all resource information for given Pci device. - - @param PciDev Pci device instance. - @param IoBridge Io resource node. - @param Mem32Bridge 32-bit memory node. - @param PMem32Bridge 32-bit Pmemory node. - @param Mem64Bridge 64-bit memory node. - @param PMem64Bridge 64-bit PMemory node. - @param IoPool Link list header for Io resource. - @param Mem32Pool Link list header for 32-bit memory. - @param PMem32Pool Link list header for 32-bit Prefetchable memory. - @param Mem64Pool Link list header for 64-bit memory. - @param PMem64Pool Link list header for 64-bit Prefetchable memory. - -**/ -VOID -GetResourceMap ( - IN PCI_IO_DEVICE *PciDev, - IN PCI_RESOURCE_NODE **IoBridge, - IN PCI_RESOURCE_NODE **Mem32Bridge, - IN PCI_RESOURCE_NODE **PMem32Bridge, - IN PCI_RESOURCE_NODE **Mem64Bridge, - IN PCI_RESOURCE_NODE **PMem64Bridge, - IN PCI_RESOURCE_NODE *IoPool, - IN PCI_RESOURCE_NODE *Mem32Pool, - IN PCI_RESOURCE_NODE *PMem32Pool, - IN PCI_RESOURCE_NODE *Mem64Pool, - IN PCI_RESOURCE_NODE *PMem64Pool - ); - -/** - Destory given resource tree. + Destroy given resource tree. @param Bridge PCI resource root node of resource tree.