]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IsaAcpiDxe: DuetPkg => PcAtChipsetPkg
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 22:30:53 +0000 (22:30 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 22:30:53 +0000 (22:30 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7614 6f19259b-4bc3-4df7-8a09-765794883524

DuetPkg/IsaAcpiDxe/ComponentName.c [deleted file]
DuetPkg/IsaAcpiDxe/IsaAcpi.c [deleted file]
DuetPkg/IsaAcpiDxe/IsaAcpi.inf [deleted file]
DuetPkg/IsaAcpiDxe/PcatIsaAcpi.c [deleted file]
DuetPkg/IsaAcpiDxe/PcatIsaAcpi.h [deleted file]
PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c [new file with mode: 0644]
PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c [new file with mode: 0644]
PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf [new file with mode: 0644]
PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c [new file with mode: 0644]
PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h [new file with mode: 0644]

diff --git a/DuetPkg/IsaAcpiDxe/ComponentName.c b/DuetPkg/IsaAcpiDxe/ComponentName.c
deleted file mode 100644 (file)
index 9b88dcf..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*++\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
-\r
-\r
-Module Name:\r
-\r
-  ComponentName.c\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-#include "PcatIsaAcpi.h"\r
-\r
-//\r
-// EFI Component Name Functions\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiComponentNameGetDriverName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **DriverName\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  EFI_HANDLE                   ControllerHandle,\r
-  IN  EFI_HANDLE                   ChildHandle        OPTIONAL,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **ControllerName\r
-  );\r
-\r
-//\r
-// EFI Component Name Protocol\r
-//\r
-\r
-EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2 = {\r
-  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)     PcatIsaAcpiComponentNameGetDriverName,\r
-  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) PcatIsaAcpiComponentNameGetControllerName,\r
-  "en"\r
-};\r
-\r
-EFI_COMPONENT_NAME_PROTOCOL  gPcatIsaAcpiComponentName = {\r
-  PcatIsaAcpiComponentNameGetDriverName,\r
-  PcatIsaAcpiComponentNameGetControllerName,\r
-  "eng"\r
-};\r
-\r
-\r
-EFI_UNICODE_STRING_TABLE mPcatIsaAcpiDriverNameTable[] = {\r
-  {\r
-    "eng;en",\r
-    L"PC-AT ISA Device Enumeration Driver"\r
-  },\r
-  {\r
-    NULL,\r
-    NULL\r
-  }\r
-};\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiComponentNameGetDriverName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **DriverName\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
-\r
-  Arguments:\r
-    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    Language   - A pointer to a three character ISO 639-2 language identifier.\r
-                 This is the language of the driver name that that the caller \r
-                 is requesting, and it must match one of the languages specified\r
-                 in SupportedLanguages.  The number of languages supported by a \r
-                 driver is up to the driver writer.\r
-    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
-                 is the name of the driver specified by This in the language \r
-                 specified by Language.\r
-\r
-  Returns:\r
-    EFI_SUCCES            - The Unicode string for the Driver specified by This\r
-                            and the language specified by Language was returned \r
-                            in DriverName.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - DriverName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
-{\r
-  return LookupUnicodeString2 (\r
-           Language,\r
-           This->SupportedLanguages,\r
-           mPcatIsaAcpiDriverNameTable, \r
-           DriverName,\r
-           (BOOLEAN)(This == &gPcatIsaAcpiComponentName)\r
-           );\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  EFI_HANDLE                   ControllerHandle,\r
-  IN  EFI_HANDLE                   ChildHandle        OPTIONAL,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **ControllerName\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the controller\r
-    that is being managed by an EFI Driver.\r
-\r
-  Arguments:\r
-    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    ControllerHandle - The handle of a controller that the driver specified by \r
-                       This is managing.  This handle specifies the controller \r
-                       whose name is to be returned.\r
-    ChildHandle      - The handle of the child controller to retrieve the name \r
-                       of.  This is an optional parameter that may be NULL.  It \r
-                       will be NULL for device drivers.  It will also be NULL \r
-                       for a bus drivers that wish to retrieve the name of the \r
-                       bus controller.  It will not be NULL for a bus driver \r
-                       that wishes to retrieve the name of a child controller.\r
-    Language         - A pointer to a three character ISO 639-2 language \r
-                       identifier.  This is the language of the controller name \r
-                       that that the caller is requesting, and it must match one\r
-                       of the languages specified in SupportedLanguages.  The \r
-                       number of languages supported by a driver is up to the \r
-                       driver writer.\r
-    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
-                       string is the name of the controller specified by \r
-                       ControllerHandle and ChildHandle in the language specified\r
-                       by Language from the point of view of the driver specified\r
-                       by This. \r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the user readable name in the \r
-                            language specified by Language for the driver \r
-                            specified by This was returned in DriverName.\r
-    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This is not currently managing \r
-                            the controller specified by ControllerHandle and \r
-                            ChildHandle.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r
diff --git a/DuetPkg/IsaAcpiDxe/IsaAcpi.c b/DuetPkg/IsaAcpiDxe/IsaAcpi.c
deleted file mode 100644 (file)
index 5eba859..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, 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
-\r
-\r
-Module Name:\r
-\r
-  IsaAcpi.c\r
-    \r
-Abstract: \r
-  \r
-    ISA ACPI Protocol Implementation\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-#include "PcatIsaAcpi.h"\r
-\r
-//\r
-// Platform specific data for the ISA devices that are present.in the platform\r
-//\r
-\r
-//\r
-// COM 1 UART Controller\r
-//\r
-EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiCom1DeviceResources[] = {\r
-  {EfiIsaAcpiResourceIo,        0, 0x3f8, 0x3ff},\r
-  {EfiIsaAcpiResourceInterrupt, 0, 4,     0},\r
-  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
-};\r
-\r
-//\r
-// COM 2 UART Controller\r
-//\r
-EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiCom2DeviceResources[] = {\r
-  {EfiIsaAcpiResourceIo,        0, 0x2f8, 0x2ff},\r
-  {EfiIsaAcpiResourceInterrupt, 0, 3,     0},\r
-  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
-};\r
-\r
-//\r
-// PS/2 Keyboard Controller\r
-//\r
-EFI_ISA_ACPI_RESOURCE  mPcatIsaAcpiPs2KeyboardDeviceResources[] = {\r
-  {EfiIsaAcpiResourceIo,        0, 0x60, 0x64},\r
-  {EfiIsaAcpiResourceInterrupt, 0, 1,     0},\r
-  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
-};\r
-\r
-//\r
-// PS/2 Mouse Controller\r
-//\r
-EFI_ISA_ACPI_RESOURCE  mPcatIsaAcpiPs2MouseDeviceResources[] = {\r
-  {EfiIsaAcpiResourceIo,        0, 0x60, 0x64},\r
-  {EfiIsaAcpiResourceInterrupt, 0, 12,     0},\r
-  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
-};\r
-\r
-//\r
-// Floppy Disk Controller\r
-//\r
-EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiFloppyResources[] = {\r
-  {EfiIsaAcpiResourceIo,        0, 0x3f0, 0x3f7},\r
-  {EfiIsaAcpiResourceInterrupt, 0, 6,     0},\r
-  {EfiIsaAcpiResourceDma,       EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE | EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 | EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE, 2,     0},\r
-  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
-};\r
-\r
-//\r
-// Table of ISA Controllers\r
-//\r
-EFI_ISA_ACPI_RESOURCE_LIST gPcatIsaAcpiDeviceList[] = {\r
-  {{EISA_PNP_ID(0x501), 0}, mPcatIsaAcpiCom1DeviceResources        }, // COM 1 UART Controller\r
-  {{EISA_PNP_ID(0x501), 1}, mPcatIsaAcpiCom2DeviceResources        }, // COM 2 UART Controller\r
-  {{EISA_PNP_ID(0x303), 0}, mPcatIsaAcpiPs2KeyboardDeviceResources }, // PS/2 Keyboard Controller\r
-  {{EISA_PNP_ID(0x303), 1}, mPcatIsaAcpiPs2MouseDeviceResources    }, // PS/2 Mouse Controller\r
-  {{EISA_PNP_ID(0x604), 0}, mPcatIsaAcpiFloppyResources            }, // Floppy Disk Controller A:\r
-  {{EISA_PNP_ID(0x604), 1}, mPcatIsaAcpiFloppyResources            }, // Floppy Disk Controller B:\r
-  {{0,                  0}, NULL                                   }  // End if ISA Controllers\r
-};\r
-\r
-//\r
-// ISA ACPI Protocol Functions\r
-//\r
-VOID\r
-IsaDeviceLookup (\r
-  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST  **IsaAcpiDevice,\r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST  **NextIsaAcpiDevice\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Enumerate the ISA devices on the ISA bus\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  UINTN  Index;\r
-\r
-  *IsaAcpiDevice = NULL;\r
-  if (NextIsaAcpiDevice != NULL) {\r
-    *NextIsaAcpiDevice = NULL;\r
-  }\r
-  if (Device == NULL) {\r
-    Index = 0;\r
-  } else {\r
-    for(Index = 0; gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL; Index++) {\r
-      if (Device->HID == gPcatIsaAcpiDeviceList[Index].Device.HID && \r
-          Device->UID == gPcatIsaAcpiDeviceList[Index].Device.UID    ) {\r
-        break;\r
-      }\r
-    }\r
-    if (gPcatIsaAcpiDeviceList[Index].ResourceItem == NULL) {\r
-      return;\r
-    }\r
-    *IsaAcpiDevice = &(gPcatIsaAcpiDeviceList[Index]);\r
-    Index++;\r
-  }\r
-  if (gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL && NextIsaAcpiDevice != NULL) {\r
-    *NextIsaAcpiDevice = &(gPcatIsaAcpiDeviceList[Index]);\r
-  }\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaDeviceEnumerate (\r
-  IN  EFI_ISA_ACPI_PROTOCOL   *This,\r
-  OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Enumerate the ISA devices on the ISA bus\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  EFI_ISA_ACPI_RESOURCE_LIST  *IsaAcpiDevice;\r
-  EFI_ISA_ACPI_RESOURCE_LIST  *NextIsaAcpiDevice;\r
-\r
-  IsaDeviceLookup (*Device, &IsaAcpiDevice, &NextIsaAcpiDevice);\r
-  if (NextIsaAcpiDevice == NULL) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-  *Device = &(NextIsaAcpiDevice->Device);\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaDeviceSetPower (\r
-  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
-  IN BOOLEAN                 OnOff\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Set ISA device power \r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;\r
-} \r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaGetCurrentResource (\r
-  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Get current Resource of the specific ISA device\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  IsaDeviceLookup (Device, ResourceList, NULL);\r
-  if (*ResourceList == NULL) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaGetPossibleResource (\r
-  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/ \r
-{\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaSetResource (\r
-  IN EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
-  IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;\r
-}\r
-        \r
-EFI_STATUS\r
-EFIAPI\r
-IsaEnableDevice (\r
-  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
-  IN BOOLEAN                 Enable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;  \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
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaInterfaceInit (\r
-  IN EFI_ISA_ACPI_PROTOCOL  *This\r
-)  \r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;\r
-}  \r
diff --git a/DuetPkg/IsaAcpiDxe/IsaAcpi.inf b/DuetPkg/IsaAcpiDxe/IsaAcpi.inf
deleted file mode 100644 (file)
index ec01a28..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#/*++\r
-# \r
-# Copyright (c) 2005, 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
-#\r
-#  Module Name:\r
-#   IsaAcpi.inf\r
-#\r
-#  Abstract:\r
-#    Component description file for PCAT ISA ACPI driver\r
-#\r
-#--*/\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = IsaAcpi\r
-  FILE_GUID                      = 38A0EC22-FBE7-4911-8BC1-176E0D6C1DBD\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  EDK_RELEASE_VERSION            = 0x00020000\r
-  EFI_SPECIFICATION_VERSION      = 0x0002000A\r
-\r
-  ENTRY_POINT                    = PcatIsaAcpiDriverEntryPoint\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
-  DuetPkg/DuetPkg.dec\r
-\r
-[LibraryClasses]\r
-  UefiDriverEntryPoint\r
-  UefiBootServicesTableLib\r
-  UefiLib\r
-  \r
-[Sources]\r
-  PcatIsaAcpi.h\r
-  PcatIsaAcpi.c\r
-  IsaAcpi.c\r
-  ComponentName.c\r
-\r
-[Protocols]\r
-  gEfiPciIoProtocolGuid\r
-  gEfiIsaAcpiProtocolGuid\r
diff --git a/DuetPkg/IsaAcpiDxe/PcatIsaAcpi.c b/DuetPkg/IsaAcpiDxe/PcatIsaAcpi.c
deleted file mode 100644 (file)
index a0f4cdf..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, 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
-\r
-\r
-Module Name:\r
-\r
-    PcatIsaAcpi.c\r
-    \r
-Abstract:\r
-\r
-    EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-#include "PcatIsaAcpi.h"\r
-\r
-//\r
-//  PcatIsaAcpi Driver Binding Protocol\r
-//\r
-EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding = {\r
-  PcatIsaAcpiDriverBindingSupported,\r
-  PcatIsaAcpiDriverBindingStart,\r
-  PcatIsaAcpiDriverBindingStop,\r
-  0xa,\r
-  NULL,\r
-  NULL\r
-};\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverEntryPoint (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-/*++\r
-  \r
-  Routine Description:\r
-    the entry point of the PcatIsaAcpi driver\r
-  \r
-  Arguments:\r
-  \r
-  Returns:\r
-    \r
---*/                \r
-{\r
-  return EfiLibInstallDriverBindingComponentName2 (\r
-           ImageHandle, \r
-           SystemTable, \r
-           &gPcatIsaAcpiDriverBinding,\r
-           ImageHandle,\r
-           &gPcatIsaAcpiComponentName,\r
-           &gPcatIsaAcpiComponentName2\r
-           );\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverBindingSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  ControllerDriver Protocol Method\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  EFI_STATUS           Status;\r
-  EFI_PCI_IO_PROTOCOL  *PciIo;\r
-  PCI_TYPE00           Pci;\r
-\r
-  //\r
-  // Get PciIo protocol instance\r
-  //              \r
-  Status = gBS->OpenProtocol (\r
-                  Controller,  \r
-                  &gEfiPciIoProtocolGuid, \r
-                  (VOID**)&PciIo,\r
-                  This->DriverBindingHandle,\r
-                  Controller,\r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
-                  );\r
-  if (EFI_ERROR(Status)) {\r
-    return Status;\r
-  }\r
-\r
-  Status = PciIo->Pci.Read (\r
-                    PciIo,\r
-                    EfiPciIoWidthUint32,\r
-                    0,\r
-                    sizeof(Pci) / sizeof(UINT32), \r
-                    &Pci);\r
-  \r
-  if (!EFI_ERROR (Status)) {\r
-    Status = EFI_UNSUPPORTED;\r
-    if ((Pci.Hdr.Command & 0x03) == 0x03) {\r
-      if (Pci.Hdr.ClassCode[2] == PCI_CLASS_BRIDGE) {\r
-        //\r
-        // See if this is a standard PCI to ISA Bridge from the Base Code and Class Code\r
-        //\r
-        if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA) {\r
-          Status = EFI_SUCCESS;\r
-        } \r
-\r
-        //\r
-        // See if this is an Intel PCI to ISA bridge in Positive Decode Mode\r
-        //\r
-        if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE &&\r
-            Pci.Hdr.VendorId == 0x8086 && \r
-            Pci.Hdr.DeviceId == 0x7110) {\r
-          Status = EFI_SUCCESS;\r
-        }\r
-      } \r
-    }\r
-  }\r
-\r
-  gBS->CloseProtocol (\r
-         Controller,       \r
-         &gEfiPciIoProtocolGuid, \r
-         This->DriverBindingHandle,   \r
-         Controller   \r
-         );\r
-  \r
-  return Status;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverBindingStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Install EFI_ISA_ACPI_PROTOCOL\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  EFI_STATUS           Status;\r
-  EFI_PCI_IO_PROTOCOL  *PciIo;\r
-  PCAT_ISA_ACPI_DEV    *PcatIsaAcpiDev;\r
-    \r
-  PcatIsaAcpiDev = NULL;\r
-  //\r
-  // Open the PCI I/O Protocol Interface\r
-  //\r
-  PciIo = NULL;\r
-  Status = gBS->OpenProtocol (\r
-                  Controller,       \r
-                  &gEfiPciIoProtocolGuid, \r
-                  (VOID**)&PciIo,\r
-                  This->DriverBindingHandle,   \r
-                  Controller,   \r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER \r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    goto Done;\r
-  }\r
-\r
-  Status = PciIo->Attributes (\r
-                    PciIo, \r
-                    EfiPciIoAttributeOperationEnable, \r
-                    EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, \r
-                    NULL \r
-                    );\r
-  if (EFI_ERROR (Status)) {\r
-    goto Done;\r
-  }\r
-  \r
-  //\r
-  // Allocate memory for the PCAT ISA ACPI Device structure\r
-  //\r
-  PcatIsaAcpiDev = NULL;\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof(PCAT_ISA_ACPI_DEV),\r
-                  (VOID**)&PcatIsaAcpiDev\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    goto Done;\r
-  }\r
-\r
-  //\r
-  // Initialize the PCAT ISA ACPI Device structure\r
-  //\r
-  PcatIsaAcpiDev->Signature = PCAT_ISA_ACPI_DEV_SIGNATURE;\r
-  PcatIsaAcpiDev->Handle    = Controller;\r
-  PcatIsaAcpiDev->PciIo     = PciIo;\r
-  \r
-  //\r
-  // IsaAcpi interface\r
-  //\r
-  (PcatIsaAcpiDev->IsaAcpi).DeviceEnumerate  = IsaDeviceEnumerate;\r
-  (PcatIsaAcpiDev->IsaAcpi).SetPower         = IsaDeviceSetPower;\r
-  (PcatIsaAcpiDev->IsaAcpi).GetCurResource   = IsaGetCurrentResource;\r
-  (PcatIsaAcpiDev->IsaAcpi).GetPosResource   = IsaGetPossibleResource;\r
-  (PcatIsaAcpiDev->IsaAcpi).SetResource      = IsaSetResource;\r
-  (PcatIsaAcpiDev->IsaAcpi).EnableDevice     = IsaEnableDevice;\r
-  (PcatIsaAcpiDev->IsaAcpi).InitDevice       = IsaInitDevice;\r
-  (PcatIsaAcpiDev->IsaAcpi).InterfaceInit    = IsaInterfaceInit;\r
-    \r
-  //\r
-  // Install the ISA ACPI Protocol interface\r
-  //\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &Controller,\r
-                  &gEfiIsaAcpiProtocolGuid, &PcatIsaAcpiDev->IsaAcpi,\r
-                  NULL\r
-                  );\r
-\r
-Done:\r
-  if (EFI_ERROR (Status)) {\r
-    if (PciIo) {\r
-      PciIo->Attributes (\r
-               PciIo, \r
-               EfiPciIoAttributeOperationDisable, \r
-               EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO,\r
-               NULL \r
-               );\r
-    }\r
-    gBS->CloseProtocol (\r
-           Controller, \r
-           &gEfiPciIoProtocolGuid, \r
-           This->DriverBindingHandle, \r
-           Controller\r
-           );\r
-    if (PcatIsaAcpiDev != NULL) {\r
-      gBS->FreePool (PcatIsaAcpiDev);\r
-    }\r
-    return Status;\r
-  }\r
-          \r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverBindingStop (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   Controller,\r
-  IN UINTN                        NumberOfChildren,\r
-  IN EFI_HANDLE                   *ChildHandleBuffer\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-\r
-  Arguments:\r
-\r
-  Returns:\r
-\r
---*/\r
-{\r
-  EFI_STATUS             Status;\r
-  EFI_ISA_ACPI_PROTOCOL  *IsaAcpi;\r
-  PCAT_ISA_ACPI_DEV      *PcatIsaAcpiDev;\r
-  \r
-  //\r
-  // Get the ISA ACPI Protocol Interface\r
-  // \r
-  Status = gBS->OpenProtocol (\r
-                  Controller, \r
-                  &gEfiIsaAcpiProtocolGuid, \r
-                  (VOID**)&IsaAcpi,\r
-                  This->DriverBindingHandle,   \r
-                  Controller,   \r
-                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Get the PCAT ISA ACPI Device structure from the ISA ACPI Protocol\r
-  //\r
-  PcatIsaAcpiDev = PCAT_ISA_ACPI_DEV_FROM_THIS (IsaAcpi);\r
-\r
-  PcatIsaAcpiDev->PciIo->Attributes (\r
-                           PcatIsaAcpiDev->PciIo, \r
-                           EfiPciIoAttributeOperationDisable, \r
-                           EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO,\r
-                           NULL \r
-                           );\r
\r
-  //\r
-  // Uninstall protocol interface: EFI_ISA_ACPI_PROTOCOL\r
-  //\r
-  Status = gBS->UninstallProtocolInterface (\r
-                  Controller,\r
-                  &gEfiIsaAcpiProtocolGuid, &PcatIsaAcpiDev->IsaAcpi\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  gBS->CloseProtocol (\r
-         Controller, \r
-         &gEfiPciIoProtocolGuid, \r
-         This->DriverBindingHandle, \r
-         Controller\r
-         );\r
-  \r
-  gBS->FreePool (PcatIsaAcpiDev);\r
-  \r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/DuetPkg/IsaAcpiDxe/PcatIsaAcpi.h b/DuetPkg/IsaAcpiDxe/PcatIsaAcpi.h
deleted file mode 100644 (file)
index 8608156..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*++\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
-\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
-#ifndef _PCAT_ISA_ACPI_H_\r
-#define _PCAT_ISA_ACPI_H_\r
-\r
-#include <PiDxe.h>\r
-\r
-#include <IndustryStandard/Pci.h>\r
-\r
-#include <Protocol/DevicePath.h>\r
-#include <Protocol/PciIo.h>\r
-#include <Protocol/IsaIo.h>\r
-#include <Protocol/DriverBinding.h>\r
-#include <Protocol/ComponentName.h>\r
-#include <Protocol/ComponentName2.h>\r
-\r
-\r
-#include <Library/UefiLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-\r
-#include <Protocol/IsaAcpi.h>\r
-//\r
-// PCAT ISA ACPI device private data structure\r
-//\r
-#define PCAT_ISA_ACPI_DEV_SIGNATURE  SIGNATURE_32('L','P','C','D')\r
-\r
-typedef struct {\r
-  UINTN                  Signature;\r
-  EFI_HANDLE             Handle;    \r
-  EFI_ISA_ACPI_PROTOCOL  IsaAcpi;\r
-  EFI_PCI_IO_PROTOCOL    *PciIo;\r
-} PCAT_ISA_ACPI_DEV;\r
-\r
-#define PCAT_ISA_ACPI_DEV_FROM_THIS(a) BASE_CR(a, PCAT_ISA_ACPI_DEV, IsaAcpi)\r
-\r
-//\r
-// Global Variables\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding;\r
-\r
-extern EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2;\r
-\r
-extern EFI_COMPONENT_NAME_PROTOCOL  gPcatIsaAcpiComponentName;\r
-\r
-\r
-//\r
-// Prototypes for Driver model protocol interface\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverBindingSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverBindingStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcatIsaAcpiDriverBindingStop (\r
-  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN  EFI_HANDLE                   Controller,\r
-  IN  UINTN                        NumberOfChildren,\r
-  IN  EFI_HANDLE                   *ChildHandleBuffer\r
-  );\r
-\r
-//\r
-// Prototypes for the ISA ACPI protocol interface\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-IsaDeviceEnumerate (\r
-  IN  EFI_ISA_ACPI_PROTOCOL   *This,\r
-  OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-IsaDeviceSetPower (\r
-  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
-  IN BOOLEAN                 OnOff\r
-  );\r
-  \r
-EFI_STATUS\r
-EFIAPI\r
-IsaGetCurrentResource (\r
-  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
-  );\r
-  \r
-EFI_STATUS\r
-EFIAPI\r
-IsaGetPossibleResource (\r
-  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
-  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
-  );\r
-  \r
-EFI_STATUS\r
-EFIAPI\r
-IsaSetResource (\r
-  IN EFI_ISA_ACPI_PROTOCOL       *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID      *Device,\r
-  IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
-  );\r
-  \r
-EFI_STATUS\r
-EFIAPI\r
-IsaEnableDevice (\r
-  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
-  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
-  IN BOOLEAN                 Enable\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
-EFI_STATUS\r
-EFIAPI\r
-IsaInterfaceInit (\r
-  IN EFI_ISA_ACPI_PROTOCOL  *This\r
-  );  \r
-\r
-#endif\r
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c b/PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c
new file mode 100644 (file)
index 0000000..9b88dcf
--- /dev/null
@@ -0,0 +1,170 @@
+/*++\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
+\r
+\r
+Module Name:\r
+\r
+  ComponentName.c\r
+\r
+Abstract:\r
+\r
+--*/\r
+\r
+#include "PcatIsaAcpi.h"\r
+\r
+//\r
+// EFI Component Name Functions\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_HANDLE                   ChildHandle        OPTIONAL,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **ControllerName\r
+  );\r
+\r
+//\r
+// EFI Component Name Protocol\r
+//\r
+\r
+EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2 = {\r
+  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)     PcatIsaAcpiComponentNameGetDriverName,\r
+  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) PcatIsaAcpiComponentNameGetControllerName,\r
+  "en"\r
+};\r
+\r
+EFI_COMPONENT_NAME_PROTOCOL  gPcatIsaAcpiComponentName = {\r
+  PcatIsaAcpiComponentNameGetDriverName,\r
+  PcatIsaAcpiComponentNameGetControllerName,\r
+  "eng"\r
+};\r
+\r
+\r
+EFI_UNICODE_STRING_TABLE mPcatIsaAcpiDriverNameTable[] = {\r
+  {\r
+    "eng;en",\r
+    L"PC-AT ISA Device Enumeration Driver"\r
+  },\r
+  {\r
+    NULL,\r
+    NULL\r
+  }\r
+};\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
+\r
+  Arguments:\r
+    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+    Language   - A pointer to a three character ISO 639-2 language identifier.\r
+                 This is the language of the driver name that that the caller \r
+                 is requesting, and it must match one of the languages specified\r
+                 in SupportedLanguages.  The number of languages supported by a \r
+                 driver is up to the driver writer.\r
+    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
+                 is the name of the driver specified by This in the language \r
+                 specified by Language.\r
+\r
+  Returns:\r
+    EFI_SUCCES            - The Unicode string for the Driver specified by This\r
+                            and the language specified by Language was returned \r
+                            in DriverName.\r
+    EFI_INVALID_PARAMETER - Language is NULL.\r
+    EFI_INVALID_PARAMETER - DriverName is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
+                            language specified by Language.\r
+\r
+--*/\r
+{\r
+  return LookupUnicodeString2 (\r
+           Language,\r
+           This->SupportedLanguages,\r
+           mPcatIsaAcpiDriverNameTable, \r
+           DriverName,\r
+           (BOOLEAN)(This == &gPcatIsaAcpiComponentName)\r
+           );\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_HANDLE                   ChildHandle        OPTIONAL,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **ControllerName\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Retrieves a Unicode string that is the user readable name of the controller\r
+    that is being managed by an EFI Driver.\r
+\r
+  Arguments:\r
+    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+    ControllerHandle - The handle of a controller that the driver specified by \r
+                       This is managing.  This handle specifies the controller \r
+                       whose name is to be returned.\r
+    ChildHandle      - The handle of the child controller to retrieve the name \r
+                       of.  This is an optional parameter that may be NULL.  It \r
+                       will be NULL for device drivers.  It will also be NULL \r
+                       for a bus drivers that wish to retrieve the name of the \r
+                       bus controller.  It will not be NULL for a bus driver \r
+                       that wishes to retrieve the name of a child controller.\r
+    Language         - A pointer to a three character ISO 639-2 language \r
+                       identifier.  This is the language of the controller name \r
+                       that that the caller is requesting, and it must match one\r
+                       of the languages specified in SupportedLanguages.  The \r
+                       number of languages supported by a driver is up to the \r
+                       driver writer.\r
+    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
+                       string is the name of the controller specified by \r
+                       ControllerHandle and ChildHandle in the language specified\r
+                       by Language from the point of view of the driver specified\r
+                       by This. \r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The Unicode string for the user readable name in the \r
+                            language specified by Language for the driver \r
+                            specified by This was returned in DriverName.\r
+    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - Language is NULL.\r
+    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This is not currently managing \r
+                            the controller specified by ControllerHandle and \r
+                            ChildHandle.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
+                            language specified by Language.\r
+\r
+--*/\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
new file mode 100644 (file)
index 0000000..5eba859
--- /dev/null
@@ -0,0 +1,306 @@
+/*++\r
+\r
+Copyright (c) 2006, 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
+\r
+\r
+Module Name:\r
+\r
+  IsaAcpi.c\r
+    \r
+Abstract: \r
+  \r
+    ISA ACPI Protocol Implementation\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#include "PcatIsaAcpi.h"\r
+\r
+//\r
+// Platform specific data for the ISA devices that are present.in the platform\r
+//\r
+\r
+//\r
+// COM 1 UART Controller\r
+//\r
+EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiCom1DeviceResources[] = {\r
+  {EfiIsaAcpiResourceIo,        0, 0x3f8, 0x3ff},\r
+  {EfiIsaAcpiResourceInterrupt, 0, 4,     0},\r
+  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
+};\r
+\r
+//\r
+// COM 2 UART Controller\r
+//\r
+EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiCom2DeviceResources[] = {\r
+  {EfiIsaAcpiResourceIo,        0, 0x2f8, 0x2ff},\r
+  {EfiIsaAcpiResourceInterrupt, 0, 3,     0},\r
+  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
+};\r
+\r
+//\r
+// PS/2 Keyboard Controller\r
+//\r
+EFI_ISA_ACPI_RESOURCE  mPcatIsaAcpiPs2KeyboardDeviceResources[] = {\r
+  {EfiIsaAcpiResourceIo,        0, 0x60, 0x64},\r
+  {EfiIsaAcpiResourceInterrupt, 0, 1,     0},\r
+  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
+};\r
+\r
+//\r
+// PS/2 Mouse Controller\r
+//\r
+EFI_ISA_ACPI_RESOURCE  mPcatIsaAcpiPs2MouseDeviceResources[] = {\r
+  {EfiIsaAcpiResourceIo,        0, 0x60, 0x64},\r
+  {EfiIsaAcpiResourceInterrupt, 0, 12,     0},\r
+  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
+};\r
+\r
+//\r
+// Floppy Disk Controller\r
+//\r
+EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiFloppyResources[] = {\r
+  {EfiIsaAcpiResourceIo,        0, 0x3f0, 0x3f7},\r
+  {EfiIsaAcpiResourceInterrupt, 0, 6,     0},\r
+  {EfiIsaAcpiResourceDma,       EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE | EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 | EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE, 2,     0},\r
+  {EfiIsaAcpiResourceEndOfList, 0, 0,     0}\r
+};\r
+\r
+//\r
+// Table of ISA Controllers\r
+//\r
+EFI_ISA_ACPI_RESOURCE_LIST gPcatIsaAcpiDeviceList[] = {\r
+  {{EISA_PNP_ID(0x501), 0}, mPcatIsaAcpiCom1DeviceResources        }, // COM 1 UART Controller\r
+  {{EISA_PNP_ID(0x501), 1}, mPcatIsaAcpiCom2DeviceResources        }, // COM 2 UART Controller\r
+  {{EISA_PNP_ID(0x303), 0}, mPcatIsaAcpiPs2KeyboardDeviceResources }, // PS/2 Keyboard Controller\r
+  {{EISA_PNP_ID(0x303), 1}, mPcatIsaAcpiPs2MouseDeviceResources    }, // PS/2 Mouse Controller\r
+  {{EISA_PNP_ID(0x604), 0}, mPcatIsaAcpiFloppyResources            }, // Floppy Disk Controller A:\r
+  {{EISA_PNP_ID(0x604), 1}, mPcatIsaAcpiFloppyResources            }, // Floppy Disk Controller B:\r
+  {{0,                  0}, NULL                                   }  // End if ISA Controllers\r
+};\r
+\r
+//\r
+// ISA ACPI Protocol Functions\r
+//\r
+VOID\r
+IsaDeviceLookup (\r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **IsaAcpiDevice,\r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **NextIsaAcpiDevice\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Enumerate the ISA devices on the ISA bus\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  UINTN  Index;\r
+\r
+  *IsaAcpiDevice = NULL;\r
+  if (NextIsaAcpiDevice != NULL) {\r
+    *NextIsaAcpiDevice = NULL;\r
+  }\r
+  if (Device == NULL) {\r
+    Index = 0;\r
+  } else {\r
+    for(Index = 0; gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL; Index++) {\r
+      if (Device->HID == gPcatIsaAcpiDeviceList[Index].Device.HID && \r
+          Device->UID == gPcatIsaAcpiDeviceList[Index].Device.UID    ) {\r
+        break;\r
+      }\r
+    }\r
+    if (gPcatIsaAcpiDeviceList[Index].ResourceItem == NULL) {\r
+      return;\r
+    }\r
+    *IsaAcpiDevice = &(gPcatIsaAcpiDeviceList[Index]);\r
+    Index++;\r
+  }\r
+  if (gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL && NextIsaAcpiDevice != NULL) {\r
+    *NextIsaAcpiDevice = &(gPcatIsaAcpiDeviceList[Index]);\r
+  }\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaDeviceEnumerate (\r
+  IN  EFI_ISA_ACPI_PROTOCOL   *This,\r
+  OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Enumerate the ISA devices on the ISA bus\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  EFI_ISA_ACPI_RESOURCE_LIST  *IsaAcpiDevice;\r
+  EFI_ISA_ACPI_RESOURCE_LIST  *NextIsaAcpiDevice;\r
+\r
+  IsaDeviceLookup (*Device, &IsaAcpiDevice, &NextIsaAcpiDevice);\r
+  if (NextIsaAcpiDevice == NULL) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
+  *Device = &(NextIsaAcpiDevice->Device);\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaDeviceSetPower (\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
+  IN BOOLEAN                 OnOff\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Set ISA device power \r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  return EFI_SUCCESS;\r
+} \r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaGetCurrentResource (\r
+  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Get current Resource of the specific ISA device\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  IsaDeviceLookup (Device, ResourceList, NULL);\r
+  if (*ResourceList == NULL) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaGetPossibleResource (\r
+  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/ \r
+{\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaSetResource (\r
+  IN EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
+  IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
+        \r
+EFI_STATUS\r
+EFIAPI\r
+IsaEnableDevice (\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
+  IN BOOLEAN                 Enable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  return EFI_SUCCESS;  \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
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaInterfaceInit (\r
+  IN EFI_ISA_ACPI_PROTOCOL  *This\r
+)  \r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  return EFI_SUCCESS;\r
+}  \r
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
new file mode 100644 (file)
index 0000000..ec01a28
--- /dev/null
@@ -0,0 +1,50 @@
+#/*++\r
+# \r
+# Copyright (c) 2005, 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
+#\r
+#  Module Name:\r
+#   IsaAcpi.inf\r
+#\r
+#  Abstract:\r
+#    Component description file for PCAT ISA ACPI driver\r
+#\r
+#--*/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = IsaAcpi\r
+  FILE_GUID                      = 38A0EC22-FBE7-4911-8BC1-176E0D6C1DBD\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x0002000A\r
+\r
+  ENTRY_POINT                    = PcatIsaAcpiDriverEntryPoint\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
+  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+  DuetPkg/DuetPkg.dec\r
+\r
+[LibraryClasses]\r
+  UefiDriverEntryPoint\r
+  UefiBootServicesTableLib\r
+  UefiLib\r
+  \r
+[Sources]\r
+  PcatIsaAcpi.h\r
+  PcatIsaAcpi.c\r
+  IsaAcpi.c\r
+  ComponentName.c\r
+\r
+[Protocols]\r
+  gEfiPciIoProtocolGuid\r
+  gEfiIsaAcpiProtocolGuid\r
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
new file mode 100644 (file)
index 0000000..a0f4cdf
--- /dev/null
@@ -0,0 +1,329 @@
+/*++\r
+\r
+Copyright (c) 2006, 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
+\r
+\r
+Module Name:\r
+\r
+    PcatIsaAcpi.c\r
+    \r
+Abstract:\r
+\r
+    EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#include "PcatIsaAcpi.h"\r
+\r
+//\r
+//  PcatIsaAcpi Driver Binding Protocol\r
+//\r
+EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding = {\r
+  PcatIsaAcpiDriverBindingSupported,\r
+  PcatIsaAcpiDriverBindingStart,\r
+  PcatIsaAcpiDriverBindingStop,\r
+  0xa,\r
+  NULL,\r
+  NULL\r
+};\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverEntryPoint (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+/*++\r
+  \r
+  Routine Description:\r
+    the entry point of the PcatIsaAcpi driver\r
+  \r
+  Arguments:\r
+  \r
+  Returns:\r
+    \r
+--*/                \r
+{\r
+  return EfiLibInstallDriverBindingComponentName2 (\r
+           ImageHandle, \r
+           SystemTable, \r
+           &gPcatIsaAcpiDriverBinding,\r
+           ImageHandle,\r
+           &gPcatIsaAcpiComponentName,\r
+           &gPcatIsaAcpiComponentName2\r
+           );\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverBindingSupported (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  ControllerDriver Protocol Method\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  EFI_STATUS           Status;\r
+  EFI_PCI_IO_PROTOCOL  *PciIo;\r
+  PCI_TYPE00           Pci;\r
+\r
+  //\r
+  // Get PciIo protocol instance\r
+  //              \r
+  Status = gBS->OpenProtocol (\r
+                  Controller,  \r
+                  &gEfiPciIoProtocolGuid, \r
+                  (VOID**)&PciIo,\r
+                  This->DriverBindingHandle,\r
+                  Controller,\r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  );\r
+  if (EFI_ERROR(Status)) {\r
+    return Status;\r
+  }\r
+\r
+  Status = PciIo->Pci.Read (\r
+                    PciIo,\r
+                    EfiPciIoWidthUint32,\r
+                    0,\r
+                    sizeof(Pci) / sizeof(UINT32), \r
+                    &Pci);\r
+  \r
+  if (!EFI_ERROR (Status)) {\r
+    Status = EFI_UNSUPPORTED;\r
+    if ((Pci.Hdr.Command & 0x03) == 0x03) {\r
+      if (Pci.Hdr.ClassCode[2] == PCI_CLASS_BRIDGE) {\r
+        //\r
+        // See if this is a standard PCI to ISA Bridge from the Base Code and Class Code\r
+        //\r
+        if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA) {\r
+          Status = EFI_SUCCESS;\r
+        } \r
+\r
+        //\r
+        // See if this is an Intel PCI to ISA bridge in Positive Decode Mode\r
+        //\r
+        if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE &&\r
+            Pci.Hdr.VendorId == 0x8086 && \r
+            Pci.Hdr.DeviceId == 0x7110) {\r
+          Status = EFI_SUCCESS;\r
+        }\r
+      } \r
+    }\r
+  }\r
+\r
+  gBS->CloseProtocol (\r
+         Controller,       \r
+         &gEfiPciIoProtocolGuid, \r
+         This->DriverBindingHandle,   \r
+         Controller   \r
+         );\r
+  \r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverBindingStart (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Install EFI_ISA_ACPI_PROTOCOL\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  EFI_STATUS           Status;\r
+  EFI_PCI_IO_PROTOCOL  *PciIo;\r
+  PCAT_ISA_ACPI_DEV    *PcatIsaAcpiDev;\r
+    \r
+  PcatIsaAcpiDev = NULL;\r
+  //\r
+  // Open the PCI I/O Protocol Interface\r
+  //\r
+  PciIo = NULL;\r
+  Status = gBS->OpenProtocol (\r
+                  Controller,       \r
+                  &gEfiPciIoProtocolGuid, \r
+                  (VOID**)&PciIo,\r
+                  This->DriverBindingHandle,   \r
+                  Controller,   \r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER \r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    goto Done;\r
+  }\r
+\r
+  Status = PciIo->Attributes (\r
+                    PciIo, \r
+                    EfiPciIoAttributeOperationEnable, \r
+                    EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, \r
+                    NULL \r
+                    );\r
+  if (EFI_ERROR (Status)) {\r
+    goto Done;\r
+  }\r
+  \r
+  //\r
+  // Allocate memory for the PCAT ISA ACPI Device structure\r
+  //\r
+  PcatIsaAcpiDev = NULL;\r
+  Status = gBS->AllocatePool (\r
+                  EfiBootServicesData,\r
+                  sizeof(PCAT_ISA_ACPI_DEV),\r
+                  (VOID**)&PcatIsaAcpiDev\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    goto Done;\r
+  }\r
+\r
+  //\r
+  // Initialize the PCAT ISA ACPI Device structure\r
+  //\r
+  PcatIsaAcpiDev->Signature = PCAT_ISA_ACPI_DEV_SIGNATURE;\r
+  PcatIsaAcpiDev->Handle    = Controller;\r
+  PcatIsaAcpiDev->PciIo     = PciIo;\r
+  \r
+  //\r
+  // IsaAcpi interface\r
+  //\r
+  (PcatIsaAcpiDev->IsaAcpi).DeviceEnumerate  = IsaDeviceEnumerate;\r
+  (PcatIsaAcpiDev->IsaAcpi).SetPower         = IsaDeviceSetPower;\r
+  (PcatIsaAcpiDev->IsaAcpi).GetCurResource   = IsaGetCurrentResource;\r
+  (PcatIsaAcpiDev->IsaAcpi).GetPosResource   = IsaGetPossibleResource;\r
+  (PcatIsaAcpiDev->IsaAcpi).SetResource      = IsaSetResource;\r
+  (PcatIsaAcpiDev->IsaAcpi).EnableDevice     = IsaEnableDevice;\r
+  (PcatIsaAcpiDev->IsaAcpi).InitDevice       = IsaInitDevice;\r
+  (PcatIsaAcpiDev->IsaAcpi).InterfaceInit    = IsaInterfaceInit;\r
+    \r
+  //\r
+  // Install the ISA ACPI Protocol interface\r
+  //\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &Controller,\r
+                  &gEfiIsaAcpiProtocolGuid, &PcatIsaAcpiDev->IsaAcpi,\r
+                  NULL\r
+                  );\r
+\r
+Done:\r
+  if (EFI_ERROR (Status)) {\r
+    if (PciIo) {\r
+      PciIo->Attributes (\r
+               PciIo, \r
+               EfiPciIoAttributeOperationDisable, \r
+               EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO,\r
+               NULL \r
+               );\r
+    }\r
+    gBS->CloseProtocol (\r
+           Controller, \r
+           &gEfiPciIoProtocolGuid, \r
+           This->DriverBindingHandle, \r
+           Controller\r
+           );\r
+    if (PcatIsaAcpiDev != NULL) {\r
+      gBS->FreePool (PcatIsaAcpiDev);\r
+    }\r
+    return Status;\r
+  }\r
+          \r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverBindingStop (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   Controller,\r
+  IN UINTN                        NumberOfChildren,\r
+  IN EFI_HANDLE                   *ChildHandleBuffer\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+\r
+  Arguments:\r
+\r
+  Returns:\r
+\r
+--*/\r
+{\r
+  EFI_STATUS             Status;\r
+  EFI_ISA_ACPI_PROTOCOL  *IsaAcpi;\r
+  PCAT_ISA_ACPI_DEV      *PcatIsaAcpiDev;\r
+  \r
+  //\r
+  // Get the ISA ACPI Protocol Interface\r
+  // \r
+  Status = gBS->OpenProtocol (\r
+                  Controller, \r
+                  &gEfiIsaAcpiProtocolGuid, \r
+                  (VOID**)&IsaAcpi,\r
+                  This->DriverBindingHandle,   \r
+                  Controller,   \r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Get the PCAT ISA ACPI Device structure from the ISA ACPI Protocol\r
+  //\r
+  PcatIsaAcpiDev = PCAT_ISA_ACPI_DEV_FROM_THIS (IsaAcpi);\r
+\r
+  PcatIsaAcpiDev->PciIo->Attributes (\r
+                           PcatIsaAcpiDev->PciIo, \r
+                           EfiPciIoAttributeOperationDisable, \r
+                           EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO,\r
+                           NULL \r
+                           );\r
\r
+  //\r
+  // Uninstall protocol interface: EFI_ISA_ACPI_PROTOCOL\r
+  //\r
+  Status = gBS->UninstallProtocolInterface (\r
+                  Controller,\r
+                  &gEfiIsaAcpiProtocolGuid, &PcatIsaAcpiDev->IsaAcpi\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  gBS->CloseProtocol (\r
+         Controller, \r
+         &gEfiPciIoProtocolGuid, \r
+         This->DriverBindingHandle, \r
+         Controller\r
+         );\r
+  \r
+  gBS->FreePool (PcatIsaAcpiDev);\r
+  \r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h
new file mode 100644 (file)
index 0000000..8608156
--- /dev/null
@@ -0,0 +1,159 @@
+/*++\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
+\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
+#ifndef _PCAT_ISA_ACPI_H_\r
+#define _PCAT_ISA_ACPI_H_\r
+\r
+#include <PiDxe.h>\r
+\r
+#include <IndustryStandard/Pci.h>\r
+\r
+#include <Protocol/DevicePath.h>\r
+#include <Protocol/PciIo.h>\r
+#include <Protocol/IsaIo.h>\r
+#include <Protocol/DriverBinding.h>\r
+#include <Protocol/ComponentName.h>\r
+#include <Protocol/ComponentName2.h>\r
+\r
+\r
+#include <Library/UefiLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+\r
+#include <Protocol/IsaAcpi.h>\r
+//\r
+// PCAT ISA ACPI device private data structure\r
+//\r
+#define PCAT_ISA_ACPI_DEV_SIGNATURE  SIGNATURE_32('L','P','C','D')\r
+\r
+typedef struct {\r
+  UINTN                  Signature;\r
+  EFI_HANDLE             Handle;    \r
+  EFI_ISA_ACPI_PROTOCOL  IsaAcpi;\r
+  EFI_PCI_IO_PROTOCOL    *PciIo;\r
+} PCAT_ISA_ACPI_DEV;\r
+\r
+#define PCAT_ISA_ACPI_DEV_FROM_THIS(a) BASE_CR(a, PCAT_ISA_ACPI_DEV, IsaAcpi)\r
+\r
+//\r
+// Global Variables\r
+//\r
+extern EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding;\r
+\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2;\r
+\r
+extern EFI_COMPONENT_NAME_PROTOCOL  gPcatIsaAcpiComponentName;\r
+\r
+\r
+//\r
+// Prototypes for Driver model protocol interface\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverBindingSupported (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverBindingStart (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatIsaAcpiDriverBindingStop (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Controller,\r
+  IN  UINTN                        NumberOfChildren,\r
+  IN  EFI_HANDLE                   *ChildHandleBuffer\r
+  );\r
+\r
+//\r
+// Prototypes for the ISA ACPI protocol interface\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+IsaDeviceEnumerate (\r
+  IN  EFI_ISA_ACPI_PROTOCOL   *This,\r
+  OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IsaDeviceSetPower (\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
+  IN BOOLEAN                 OnOff\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI\r
+IsaGetCurrentResource (\r
+  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI\r
+IsaGetPossibleResource (\r
+  IN  EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
+  OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI\r
+IsaSetResource (\r
+  IN EFI_ISA_ACPI_PROTOCOL       *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID      *Device,\r
+  IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI\r
+IsaEnableDevice (\r
+  IN EFI_ISA_ACPI_PROTOCOL   *This,\r
+  IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
+  IN BOOLEAN                 Enable\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
+EFI_STATUS\r
+EFIAPI\r
+IsaInterfaceInit (\r
+  IN EFI_ISA_ACPI_PROTOCOL  *This\r
+  );  \r
+\r
+#endif\r