]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciHostBridgeDxe / PciRootBridge.h
index 13185b41ac0a1e6d749065532e709df0fcfc157a..10a620071933c7c863ac2a61764491bd5feaf1e9 100644 (file)
@@ -2,14 +2,8 @@
 \r
   The PCI Root Bridge header file.\r
 \r
-Copyright (c) 1999 - 2016, 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) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -23,7 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Driver Consumed Protocol Prototypes\r
 //\r
-#include <Protocol/Metronome.h>\r
 #include <Protocol/CpuIo2.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
@@ -34,9 +27,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/PciSegmentLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/TimerLib.h>\r
 #include "PciHostResource.h"\r
 \r
-\r
 typedef enum {\r
   IoOperation,\r
   MemOperation,\r
@@ -45,46 +39,46 @@ typedef enum {
 \r
 #define MAP_INFO_SIGNATURE  SIGNATURE_32 ('_', 'm', 'a', 'p')\r
 typedef struct {\r
-  UINT32                                    Signature;\r
-  LIST_ENTRY                                Link;\r
-  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation;\r
-  UINTN                                     NumberOfBytes;\r
-  UINTN                                     NumberOfPages;\r
-  EFI_PHYSICAL_ADDRESS                      HostAddress;\r
-  EFI_PHYSICAL_ADDRESS                      MappedHostAddress;\r
+  UINT32                                       Signature;\r
+  LIST_ENTRY                                   Link;\r
+  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION    Operation;\r
+  UINTN                                        NumberOfBytes;\r
+  UINTN                                        NumberOfPages;\r
+  EFI_PHYSICAL_ADDRESS                         HostAddress;\r
+  EFI_PHYSICAL_ADDRESS                         MappedHostAddress;\r
 } MAP_INFO;\r
-#define MAP_INFO_FROM_LINK(a) CR (a, MAP_INFO, Link, MAP_INFO_SIGNATURE)\r
+#define MAP_INFO_FROM_LINK(a)  CR (a, MAP_INFO, Link, MAP_INFO_SIGNATURE)\r
 \r
-#define PCI_ROOT_BRIDGE_SIGNATURE SIGNATURE_32 ('_', 'p', 'r', 'b')\r
+#define PCI_ROOT_BRIDGE_SIGNATURE  SIGNATURE_32 ('_', 'p', 'r', 'b')\r
 \r
 typedef struct {\r
-  UINT32                            Signature;\r
-  LIST_ENTRY                        Link;\r
-  EFI_HANDLE                        Handle;\r
-  UINT64                            AllocationAttributes;\r
-  UINT64                            Attributes;\r
-  UINT64                            Supports;\r
-  PCI_RES_NODE                      ResAllocNode[TypeMax];\r
-  PCI_ROOT_BRIDGE_APERTURE          Bus;\r
-  PCI_ROOT_BRIDGE_APERTURE          Io;\r
-  PCI_ROOT_BRIDGE_APERTURE          Mem;\r
-  PCI_ROOT_BRIDGE_APERTURE          PMem;\r
-  PCI_ROOT_BRIDGE_APERTURE          MemAbove4G;\r
-  PCI_ROOT_BRIDGE_APERTURE          PMemAbove4G;\r
-  BOOLEAN                           DmaAbove4G;\r
-  BOOLEAN                           NoExtendedConfigSpace;\r
-  VOID                              *ConfigBuffer;\r
-  EFI_DEVICE_PATH_PROTOCOL          *DevicePath;\r
-  CHAR16                            *DevicePathStr;\r
-  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL   RootBridgeIo;\r
-\r
-  BOOLEAN                           ResourceSubmitted;\r
-  LIST_ENTRY                        Maps;\r
+  UINT32                             Signature;\r
+  LIST_ENTRY                         Link;\r
+  EFI_HANDLE                         Handle;\r
+  UINT64                             AllocationAttributes;\r
+  UINT64                             Attributes;\r
+  UINT64                             Supports;\r
+  PCI_RES_NODE                       ResAllocNode[TypeMax];\r
+  PCI_ROOT_BRIDGE_APERTURE           Bus;\r
+  PCI_ROOT_BRIDGE_APERTURE           Io;\r
+  PCI_ROOT_BRIDGE_APERTURE           Mem;\r
+  PCI_ROOT_BRIDGE_APERTURE           PMem;\r
+  PCI_ROOT_BRIDGE_APERTURE           MemAbove4G;\r
+  PCI_ROOT_BRIDGE_APERTURE           PMemAbove4G;\r
+  BOOLEAN                            DmaAbove4G;\r
+  BOOLEAN                            NoExtendedConfigSpace;\r
+  VOID                               *ConfigBuffer;\r
+  EFI_DEVICE_PATH_PROTOCOL           *DevicePath;\r
+  CHAR16                             *DevicePathStr;\r
+  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL    RootBridgeIo;\r
+\r
+  BOOLEAN                            ResourceSubmitted;\r
+  LIST_ENTRY                         Maps;\r
 } PCI_ROOT_BRIDGE_INSTANCE;\r
 \r
-#define ROOT_BRIDGE_FROM_THIS(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, RootBridgeIo, PCI_ROOT_BRIDGE_SIGNATURE)\r
+#define ROOT_BRIDGE_FROM_THIS(a)  CR (a, PCI_ROOT_BRIDGE_INSTANCE, RootBridgeIo, PCI_ROOT_BRIDGE_SIGNATURE)\r
 \r
-#define ROOT_BRIDGE_FROM_LINK(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, Link, PCI_ROOT_BRIDGE_SIGNATURE)\r
+#define ROOT_BRIDGE_FROM_LINK(a)  CR (a, PCI_ROOT_BRIDGE_INSTANCE, Link, PCI_ROOT_BRIDGE_SIGNATURE)\r
 \r
 /**\r
   Construct the Pci Root Bridge instance.\r
@@ -96,12 +90,13 @@ typedef struct {
 **/\r
 PCI_ROOT_BRIDGE_INSTANCE *\r
 CreateRootBridge (\r
-  IN PCI_ROOT_BRIDGE       *Bridge\r
+  IN PCI_ROOT_BRIDGE  *Bridge\r
   );\r
 \r
 //\r
 // Protocol Member Function Prototypes\r
 //\r
+\r
 /**\r
 \r
   Poll an address in memory mapped space until an exit condition is met\r
@@ -291,11 +286,11 @@ RootBridgeIoIoWrite (
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoCopyMem (\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL          *This,\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH    Width,\r
-  IN UINT64                                   DestAddress,\r
-  IN UINT64                                   SrcAddress,\r
-  IN UINTN                                    Count\r
+  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *This,\r
+  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH  Width,\r
+  IN UINT64                                 DestAddress,\r
+  IN UINT64                                 SrcAddress,\r
+  IN UINTN                                  Count\r
   )\r
 ;\r
 \r
@@ -552,10 +547,10 @@ RootBridgeIoSetAttributes (
 /**\r
 \r
   Retrieves the current resource settings of this PCI root bridge\r
-  in the form of a set of ACPI 2.0 resource descriptor.\r
+  in the form of a set of ACPI resource descriptor.\r
 \r
   @param This       -  Pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
-  @param Resources  -  Pointer to the ACPI 2.0 resource descriptor that\r
+  @param Resources  -  Pointer to the resource descriptor that\r
                        describe the current configuration of this PCI root\r
                        bridge.\r
 \r
@@ -572,7 +567,5 @@ RootBridgeIoConfiguration (
   )\r
 ;\r
 \r
-\r
-extern EFI_METRONOME_ARCH_PROTOCOL *mMetronome;\r
-extern EFI_CPU_IO2_PROTOCOL         *mCpuIo;\r
+extern EFI_CPU_IO2_PROTOCOL  *mCpuIo;\r
 #endif\r