]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciIo.h
index da3de3938e4b7bf5c10557f78d4d3087c600f64e..a73bd06bcf0a294182b7400481b823b8e1e6daae 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   EFI PCI IO protocol functions declaration for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
-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
@@ -23,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 VOID\r
 InitializePciIoInstance (\r
-  IN PCI_IO_DEVICE               *PciIoDevice\r
+  IN PCI_IO_DEVICE  *PciIoDevice\r
   );\r
 \r
 /**\r
@@ -43,12 +37,12 @@ InitializePciIoInstance (
 **/\r
 EFI_STATUS\r
 PciIoVerifyBarAccess (\r
-  IN PCI_IO_DEVICE                   *PciIoDevice,\r
-  IN UINT8                           BarIndex,\r
-  IN PCI_BAR_TYPE                    Type,\r
-  IN IN EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
-  IN IN UINTN                        Count,\r
-  IN UINT64                          *Offset\r
+  IN PCI_IO_DEVICE                 *PciIoDevice,\r
+  IN UINT8                         BarIndex,\r
+  IN PCI_BAR_TYPE                  Type,\r
+  IN IN EFI_PCI_IO_PROTOCOL_WIDTH  Width,\r
+  IN IN UINTN                      Count,\r
+  IN UINT64                        *Offset\r
   );\r
 \r
 /**\r
@@ -353,13 +347,13 @@ PciIoConfigWrite (
 EFI_STATUS\r
 EFIAPI\r
 PciIoCopyMem (\r
-  IN EFI_PCI_IO_PROTOCOL              *This,\r
-  IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
-  IN     UINT8                        DestBarIndex,\r
-  IN     UINT64                       DestOffset,\r
-  IN     UINT8                        SrcBarIndex,\r
-  IN     UINT64                       SrcOffset,\r
-  IN     UINTN                        Count\r
+  IN EFI_PCI_IO_PROTOCOL            *This,\r
+  IN     EFI_PCI_IO_PROTOCOL_WIDTH  Width,\r
+  IN     UINT8                      DestBarIndex,\r
+  IN     UINT64                     DestOffset,\r
+  IN     UINT8                      SrcBarIndex,\r
+  IN     UINT64                     SrcOffset,\r
+  IN     UINTN                      Count\r
   );\r
 \r
 /**\r
@@ -411,7 +405,7 @@ PciIoUnmap (
 \r
 /**\r
   Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer\r
-  mapping.\r
+  or EfiPciOperationBusMasterCommonBuffer64 mapping.\r
 \r
   @param  This                  A pointer to the EFI_PCI_IO_PROTOCOL instance.\r
   @param  Type                  This parameter is not used and must be ignored.\r
@@ -424,7 +418,7 @@ PciIoUnmap (
 \r
   @retval EFI_SUCCESS           The requested memory pages were allocated.\r
   @retval EFI_UNSUPPORTED       Attributes is unsupported. The only legal attribute bits are\r
-                                MEMORY_WRITE_COMBINE and MEMORY_CACHED.\r
+                                MEMORY_WRITE_COMBINE, MEMORY_CACHED and DUAL_ADDRESS_CYCLE.\r
   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES  The memory pages could not be allocated.\r
 \r
@@ -432,12 +426,12 @@ PciIoUnmap (
 EFI_STATUS\r
 EFIAPI\r
 PciIoAllocateBuffer (\r
-  IN  EFI_PCI_IO_PROTOCOL   *This,\r
-  IN  EFI_ALLOCATE_TYPE     Type,\r
-  IN  EFI_MEMORY_TYPE       MemoryType,\r
-  IN  UINTN                 Pages,\r
-  OUT VOID                  **HostAddress,\r
-  IN  UINT64                Attributes\r
+  IN  EFI_PCI_IO_PROTOCOL  *This,\r
+  IN  EFI_ALLOCATE_TYPE    Type,\r
+  IN  EFI_MEMORY_TYPE      MemoryType,\r
+  IN  UINTN                Pages,\r
+  OUT VOID                 **HostAddress,\r
+  IN  UINT64               Attributes\r
   );\r
 \r
 /**\r
@@ -455,9 +449,9 @@ PciIoAllocateBuffer (
 EFI_STATUS\r
 EFIAPI\r
 PciIoFreeBuffer (\r
-  IN  EFI_PCI_IO_PROTOCOL   *This,\r
-  IN  UINTN                 Pages,\r
-  IN  VOID                  *HostAddress\r
+  IN  EFI_PCI_IO_PROTOCOL  *This,\r
+  IN  UINTN                Pages,\r
+  IN  VOID                 *HostAddress\r
   );\r
 \r
 /**\r
@@ -514,9 +508,9 @@ PciIoGetLocation (
 **/\r
 BOOLEAN\r
 CheckBarType (\r
-  IN PCI_IO_DEVICE          *PciIoDevice,\r
-  IN UINT8                  BarIndex,\r
-  IN PCI_BAR_TYPE           BarType\r
+  IN PCI_IO_DEVICE  *PciIoDevice,\r
+  IN UINT8          BarIndex,\r
+  IN PCI_BAR_TYPE   BarType\r
   );\r
 \r
 /**\r
@@ -527,7 +521,7 @@ CheckBarType (
   @param  Operation    Set or Disable.\r
 \r
   @retval  EFI_UNSUPPORTED  If root bridge does not support change attribute.\r
-  @retval  EFI_SUCCESS      Successfully set new attributs.\r
+  @retval  EFI_SUCCESS      Successfully set new attributes.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -575,7 +569,7 @@ SupportPaletteSnoopAttributes (
 EFI_STATUS\r
 EFIAPI\r
 PciIoAttributes (\r
-  IN EFI_PCI_IO_PROTOCOL                       * This,\r
+  IN EFI_PCI_IO_PROTOCOL                       *This,\r
   IN  EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION  Operation,\r
   IN  UINT64                                   Attributes,\r
   OUT UINT64                                   *Result OPTIONAL\r
@@ -606,10 +600,10 @@ PciIoAttributes (
 EFI_STATUS\r
 EFIAPI\r
 PciIoGetBarAttributes (\r
-  IN EFI_PCI_IO_PROTOCOL             * This,\r
-  IN  UINT8                          BarIndex,\r
-  OUT UINT64                         *Supports, OPTIONAL\r
-  OUT VOID                           **Resources OPTIONAL\r
+  IN EFI_PCI_IO_PROTOCOL  *This,\r
+  IN  UINT8               BarIndex,\r
+  OUT UINT64              *Supports  OPTIONAL,\r
+  OUT VOID                **Resources OPTIONAL\r
   );\r
 \r
 /**\r
@@ -639,33 +633,11 @@ PciIoGetBarAttributes (
 EFI_STATUS\r
 EFIAPI\r
 PciIoSetBarAttributes (\r
-  IN EFI_PCI_IO_PROTOCOL              *This,\r
-  IN     UINT64                       Attributes,\r
-  IN     UINT8                        BarIndex,\r
-  IN OUT UINT64                       *Offset,\r
-  IN OUT UINT64                       *Length\r
-  );\r
-\r
-/**\r
-  Program parent bridge's attribute recurrently.\r
-\r
-  @param PciIoDevice  Child Pci device instance\r
-  @param Operation    The operation to perform on the attributes for this PCI controller.\r
-  @param Attributes   The mask of attributes that are used for Set, Enable, and Disable\r
-                      operations.\r
-\r
-  @retval EFI_SUCCESS           The operation on the PCI controller's attributes was completed.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_UNSUPPORTED       one or more of the bits set in\r
-                                Attributes are not supported by this PCI controller or one of\r
-                                its parent bridges when Operation is Set, Enable or Disable.\r
-\r
-**/\r
-EFI_STATUS\r
-UpStreamBridgesAttributes (\r
-  IN PCI_IO_DEVICE                            *PciIoDevice,\r
-  IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION  Operation,\r
-  IN UINT64                                   Attributes\r
+  IN EFI_PCI_IO_PROTOCOL  *This,\r
+  IN     UINT64           Attributes,\r
+  IN     UINT8            BarIndex,\r
+  IN OUT UINT64           *Offset,\r
+  IN OUT UINT64           *Length\r
   );\r
 \r
 /**\r
@@ -680,8 +652,8 @@ UpStreamBridgesAttributes (
 **/\r
 BOOLEAN\r
 PciDevicesOnTheSamePath (\r
-  IN PCI_IO_DEVICE        *PciDevice1,\r
-  IN PCI_IO_DEVICE        *PciDevice2\r
+  IN PCI_IO_DEVICE  *PciDevice1,\r
+  IN PCI_IO_DEVICE  *PciDevice2\r
   );\r
 \r
 #endif\r