]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Protocol/PciHotPlugInit.h
Add the following PI 1.2 Protocols to the MdePkg
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / PciHotPlugInit.h
index 577a4dd430152bb4f8718e09c4cb550da92f3f0c..684b6ca550f2313ae93af3107528d5df707261fc 100644 (file)
@@ -1,7 +1,9 @@
 /** @file\r
-  This file declares EFI PCI Hot Plug Init Protocol\r
+  This file declares EFI PCI Hot Plug Init Protocol.\r
+  This protocol provides the necessary functionality to initialize the Hot Plug Controllers (HPCs) and\r
+  the buses that they control. This protocol also provides information regarding resource padding.\r
 \r
-  Copyright (c) 2007, Intel Corporation\r
+  Copyright (c) 2007 - 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
@@ -10,8 +12,6 @@
   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
 \r
-  Module Name:  PciHotPlugInit.h\r
-\r
   @par Revision Reference:\r
   This protocol is defined in Framework of EFI Hot Plug Pci Initialization Protocol Spec\r
   Version 0.9\r
 #ifndef _EFI_PCI_HOT_PLUG_INIT_H_\r
 #define _EFI_PCI_HOT_PLUG_INIT_H_\r
 \r
-//\r
-// Global ID for the PCI Hot Plug Protocol\r
-//\r
-#define EFI_PCI_HOT_PLUG_INIT_PROTOCOL_GUID \\r
-  { 0xaa0e8bc1, 0xdabc, 0x46b0, {0xa8, 0x44, 0x37, 0xb8, 0x16, 0x9b, 0x2b, 0xea } }\r
 \r
+///\r
+/// Global ID for the PCI Hot Plug Protocol\r
+///\r
+#define EFI_PCI_HOT_PLUG_INIT_PROTOCOL_GUID \\r
+  { \\r
+    0xaa0e8bc1, 0xdabc, 0x46b0, {0xa8, 0x44, 0x37, 0xb8, 0x16, 0x9b, 0x2b, 0xea } \\r
+  }\r
 \r
 typedef struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL EFI_PCI_HOT_PLUG_INIT_PROTOCOL;\r
 \r
-#define  EFI_HPC_STATE_INITIALIZED    0x01\r
-#define  EFI_HPC_STATE_ENABLED        0x02\r
-\r
+///\r
+/// Current state of an HPC\r
+///\r
 typedef UINT16 EFI_HPC_STATE;\r
 \r
+///\r
+/// The HPC initialization function was called and the HPC completed \r
+/// initialization, but it was not enabled for some reason. The HPC may be \r
+/// disabled in hardware, or it may be disabled due to user preferences, \r
+/// hardware failure, or other reasons. No resource padding is required.\r
+///\r
+#define  EFI_HPC_STATE_INITIALIZED    0x01\r
+\r
+///\r
+/// The HPC initialization function was called, the HPC completed \r
+/// initialization, and it was enabled. Resource padding is required.\r
+///\r
+#define  EFI_HPC_STATE_ENABLED        0x02\r
 \r
+///\r
+/// Location definition for PCI Hot Plug Controller\r
+///\r
 typedef struct{\r
+  ///\r
+  /// The device path to the Root HPC\r
+  ///\r
   EFI_DEVICE_PATH_PROTOCOL  *HpcDevicePath;\r
+  ///\r
+  /// The device path to the Hot Plug Bus (HPB) that is controlled by \r
+  /// the root HPC.\r
+  ///\r
   EFI_DEVICE_PATH_PROTOCOL  *HpbDevicePath;\r
 } EFI_HPC_LOCATION;\r
 \r
 \r
+///\r
+/// Describes how resource padding should be applied\r
+///\r
 typedef enum{\r
   EfiPaddingPciBus,\r
   EfiPaddingPciRootBridge\r
@@ -51,6 +79,15 @@ typedef enum{
   Returns a list of root Hot Plug Controllers (HPCs) that require initialization\r
   during the boot process.\r
 \r
+  This procedure returns a list of root HPCs. The PCI bus driver must initialize these controllers \r
+  during the boot process. The PCI bus driver may or may not be able to detect these HPCs. If the \r
+  platform includes a PCI-to-CardBus bridge, it can be included in this list if it requires initialization. \r
+  The HpcList must be self consistent. An HPC cannot control any of its parent buses. Only one HPC \r
+  can control a PCI bus. Because this list includes only root HPCs, no HPC in the list can be a child of \r
+  another HPC. This policy must be enforced by the EFI_PCI_HOT_PLUG_INIT_PROTOCOL. \r
+  The PCI bus driver may not check for such invalid conditions. \r
+  The callee allocates the buffer HpcList\r
+\r
   @param  This                  Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r
   @param  HpcCount              The number of root HPCs that were returned.\r
   @param  HpcList               The list of root HPCs. HpcCount defines the number of\r
@@ -63,8 +100,8 @@ typedef enum{
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_ROOT_HPC_LIST) (\r
-  IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL   *This,\r
+(EFIAPI *EFI_GET_ROOT_HPC_LIST)(\r
+  IN  EFI_PCI_HOT_PLUG_INIT_PROTOCOL  *This,\r
   OUT UINTN                           *HpcCount,\r
   OUT EFI_HPC_LOCATION                **HpcList\r
 );\r
@@ -72,13 +109,19 @@ EFI_STATUS
 /**\r
   Initializes one root Hot Plug Controller (HPC). This process may causes\r
   initialization of its subordinate buses.\r
+  \r
+  This function initializes the specified HPC. At the end of initialization, the hot-plug slots or sockets \r
+  (controlled by this HPC) are powered and are connected to the bus. All the necessary registers in the \r
+  HPC are set up. For a Standard (PCI) Hot Plug Controller (SHPC), the registers that must be set up \r
+  are defined in the PCI Standard Hot Plug Controller and Subsystem Specification.\r
 \r
   @param  This                  Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r
   @param  HpcDevicePath         The device path to the HPC that is being initialized.\r
   @param  HpcPciAddress         The address of the HPC function on the PCI bus.\r
   @param  Event                 The event that should be signaled when the HPC initialization\r
                                 is complete.\r
-  @param  HpcState              The state of the HPC hardware.\r
+  @param  HpcState              The state of the HPC hardware. The state is EFI_HPC_STATE_INITIALIZED\r
+                                or EFI_HPC_STATE_ENABLED.\r
 \r
   @retval EFI_SUCCESS           If Event is NULL, the specific HPC was successfully\r
                                 initialized. If Event is not NULL, Event will be signaled at a later time\r
@@ -92,8 +135,8 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_INITIALIZE_ROOT_HPC) (\r
-  IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL     *This,\r
+(EFIAPI *EFI_INITIALIZE_ROOT_HPC)(\r
+  IN  EFI_PCI_HOT_PLUG_INIT_PROTOCOL    *This,\r
   IN  EFI_DEVICE_PATH_PROTOCOL          *HpcDevicePath,\r
   IN  UINT64                            HpcPciAddress,\r
   IN  EFI_EVENT                         Event, OPTIONAL\r
@@ -104,6 +147,12 @@ EFI_STATUS
   Returns the resource padding that is required by the PCI bus that is controlled\r
   by the specified Hot Plug Controller (HPC).\r
 \r
+  This function returns the resource padding that is required by the PCI bus that is controlled by the \r
+  specified HPC. This member function is called for all the root HPCs and nonroot HPCs that are \r
+  detected by the PCI bus enumerator. This function will be called before PCI resource allocation is \r
+  completed. This function must be called after all the root HPCs, with the possible exception of a \r
+  PCI-to-CardBus bridge, have completed initialization.\r
+\r
   @param  This                  Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r
   @param  HpcDevicePath         The device path to the HPC.\r
   @param  HpcPciAddress         The address of the HPC function on the PCI bus.\r
@@ -124,8 +173,8 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_PCI_HOT_PLUG_PADDING) (\r
-  IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL     *This,\r
+(EFIAPI *EFI_GET_HOT_PLUG_PADDING)(\r
+  IN  EFI_PCI_HOT_PLUG_INIT_PROTOCOL    *This,\r
   IN  EFI_DEVICE_PATH_PROTOCOL          *HpcDevicePath,\r
   IN  UINT64                            HpcPciAddress,\r
   OUT EFI_HPC_STATE                     *HpcState,\r
@@ -138,26 +187,26 @@ EFI_STATUS
 // Prototypes for the PCI Hot Plug Init Protocol\r
 //\r
 \r
-/**\r
-  @par Protocol Description:\r
-  This protocol provides the necessary functionality to initialize the\r
-  Hot Plug Controllers (HPCs) and the buses that they control. This protocol\r
-  also provides information regarding resource padding.\r
-\r
-  @param GetRootHpcList\r
-  Returns a list of root HPCs and the buses that they control.\r
-\r
-  @param InitializeRootHpc\r
-  Initializes the specified root HPC.\r
-\r
-  @param GetResourcePadding\r
-  Returns the resource padding that is required by the HPC.\r
-\r
-**/\r
+///\r
+/// This protocol provides the necessary functionality to initialize the\r
+/// Hot Plug Controllers (HPCs) and the buses that they control. This protocol\r
+/// also provides information regarding resource padding.\r
+///\r
 struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL {\r
+  ///\r
+  /// Returns a list of root HPCs and the buses that they control.\r
+  ///\r
   EFI_GET_ROOT_HPC_LIST                                  GetRootHpcList;\r
+  \r
+  ///\r
+  /// Initializes the specified root HPC.\r
+  ///\r
   EFI_INITIALIZE_ROOT_HPC                                InitializeRootHpc;\r
-  EFI_GET_PCI_HOT_PLUG_PADDING                           GetResourcePadding;\r
+  \r
+  ///\r
+  /// Returns the resource padding that is required by the HPC.\r
+  ///\r
+  EFI_GET_HOT_PLUG_PADDING                               GetResourcePadding;\r
 };\r
 \r
 extern EFI_GUID gEfiPciHotPlugInitProtocolGuid;\r