]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h
BaseTools/BinToPcd: Fix Python 2.7.x compatibility issue
[mirror_edk2.git] / PcAtChipsetPkg / IsaAcpiDxe / PcatIsaAcpi.h
index 8608156b9b5f6653d66377f8a67101449ee90e28..4e04f53a076c28ca7c1b541a6015a2e90b980e44 100644 (file)
@@ -1,26 +1,16 @@
-/*++\r
+/** @file\r
+  EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
 \r
-Copyright (c) 2006 - 2007, 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 - 2018, 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
 \r
-Module Name:\r
-\r
-    PcatIsaAcpi.h\r
-    \r
-Abstract:\r
-\r
-    EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _PCAT_ISA_ACPI_H_\r
 #define _PCAT_ISA_ACPI_H_\r
@@ -39,6 +29,8 @@ Revision History
 \r
 #include <Library/UefiLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
 #include <Protocol/IsaAcpi.h>\r
 //\r
@@ -48,9 +40,10 @@ Revision History
 \r
 typedef struct {\r
   UINTN                  Signature;\r
-  EFI_HANDLE             Handle;    \r
+  EFI_HANDLE             Handle;\r
   EFI_ISA_ACPI_PROTOCOL  IsaAcpi;\r
   EFI_PCI_IO_PROTOCOL    *PciIo;\r
+  UINT64                 OriginalAttributes;\r
 } PCAT_ISA_ACPI_DEV;\r
 \r
 #define PCAT_ISA_ACPI_DEV_FROM_THIS(a) BASE_CR(a, PCAT_ISA_ACPI_DEV, IsaAcpi)\r
@@ -68,6 +61,17 @@ extern EFI_COMPONENT_NAME_PROTOCOL  gPcatIsaAcpiComponentName;
 //\r
 // Prototypes for Driver model protocol interface\r
 //\r
+/**\r
+  ControllerDriver Protocol Method\r
+\r
+  @param This                 Driver Binding protocol instance pointer.\r
+  @param Controller           Handle of device to test.\r
+  @param RemainingDevicePath  Optional parameter use to pick a specific child\r
+                              device to start.\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingSupported (\r
@@ -76,6 +80,18 @@ PcatIsaAcpiDriverBindingSupported (
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Install EFI_ISA_ACPI_PROTOCOL.\r
+\r
+  @param  This                 Driver Binding protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
+  @retval other                This driver does not support this device\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingStart (\r
@@ -84,6 +100,20 @@ PcatIsaAcpiDriverBindingStart (
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Stop this driver on ControllerHandle. Support stopping any child handles\r
+  created by this driver.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingStop (\r
@@ -96,6 +126,17 @@ PcatIsaAcpiDriverBindingStop (
 //\r
 // Prototypes for the ISA ACPI protocol interface\r
 //\r
+/**\r
+  Enumerate the ISA devices on the ISA bus\r
+\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+\r
+  @retval EFI_NOT_FOUND Can not found the next Isa device.\r
+  @retval EFI_SUCCESS    Success retrieve the next Isa device for enumration.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaDeviceEnumerate (\r
@@ -103,6 +144,17 @@ IsaDeviceEnumerate (
   OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
   );\r
 \r
+/**\r
+  Set ISA device power\r
+\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+  @param OnOff           TRUE for setting isa device power on,\r
+                         FALSE for setting isa device power off\r
+\r
+  @return EFI_SUCCESS    Success to change power status for isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaDeviceSetPower (\r
@@ -110,7 +162,17 @@ IsaDeviceSetPower (
   IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
   IN BOOLEAN                 OnOff\r
   );\r
-  \r
+\r
+/**\r
+  Get current resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+  @param ResourceList    On return, point to resources instances for given isa device\r
+\r
+  @retval EFI_NOT_FOUND Can not found the resource instance for given isa device\r
+  @retval EFI_SUCCESS   Success to get resource instance for given isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaGetCurrentResource (\r
@@ -118,15 +180,34 @@ IsaGetCurrentResource (
   IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   );\r
-  \r
+\r
+/**\r
+  Get possible resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+  @param ResourceList    On return, point to resources instances for given isa device\r
+\r
+  @retval EFI_SUCCESS   Success to get resource instance for given isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaGetPossibleResource (\r
   IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   );\r
-  \r
+\r
+/**\r
+  Set resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+  @param ResourceList    Point to resources instances for given isa device\r
+\r
+  @return EFI_SUCCESS  Success to set resource.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaSetResource (\r
@@ -134,7 +215,17 @@ IsaSetResource (
   IN EFI_ISA_ACPI_DEVICE_ID      *Device,\r
   IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
   );\r
-  \r
+\r
+/**\r
+  Enable/Disable the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+  @param Enable          Enable/Disable\r
+\r
+  @return EFI_SUCCESS  Success to enable/disable.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaEnableDevice (\r
@@ -143,17 +234,42 @@ IsaEnableDevice (
   IN BOOLEAN                 Enable\r
   );\r
 \r
+/**\r
+  Initialize the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance\r
+\r
+  @return EFI_SUCCESS  Success to initialize.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaInitDevice (\r
   IN EFI_ISA_ACPI_PROTOCOL   *This,\r
   IN EFI_ISA_ACPI_DEVICE_ID  *Device\r
   );\r
-  \r
+\r
+/**\r
+  Initialize the ISA interface.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+\r
+  @return EFI_SUCCESS  Success to initialize ISA interface.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaInterfaceInit (\r
   IN EFI_ISA_ACPI_PROTOCOL  *This\r
-  );  \r
+  );\r
+\r
+/**\r
+  Initialize the ISA device list.\r
+**/\r
+VOID\r
+InitializePcatIsaAcpiDeviceList (\r
+  VOID\r
+  );\r
 \r
 #endif\r