/** @file\r
ISA ACPI Protocol Implementation\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, 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
//\r
// COM 1 UART Controller\r
//\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiCom1DeviceResources[] = {\r
{EfiIsaAcpiResourceIo, 0, 0x3f8, 0x3ff},\r
{EfiIsaAcpiResourceInterrupt, 0, 4, 0},\r
//\r
// COM 2 UART Controller\r
//\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiCom2DeviceResources[] = {\r
{EfiIsaAcpiResourceIo, 0, 0x2f8, 0x2ff},\r
{EfiIsaAcpiResourceInterrupt, 0, 3, 0},\r
//\r
// PS/2 Keyboard Controller\r
//\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiPs2KeyboardDeviceResources[] = {\r
{EfiIsaAcpiResourceIo, 0, 0x60, 0x64},\r
{EfiIsaAcpiResourceInterrupt, 0, 1, 0},\r
//\r
// PS/2 Mouse Controller\r
//\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiPs2MouseDeviceResources[] = {\r
{EfiIsaAcpiResourceIo, 0, 0x60, 0x64},\r
{EfiIsaAcpiResourceInterrupt, 0, 12, 0},\r
//\r
// Floppy Disk Controller\r
//\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_ISA_ACPI_RESOURCE mPcatIsaAcpiFloppyResources[] = {\r
{EfiIsaAcpiResourceIo, 0, 0x3f0, 0x3f7},\r
{EfiIsaAcpiResourceInterrupt, 0, 6, 0},\r
{EfiIsaAcpiResourceEndOfList, 0, 0, 0}\r
};\r
\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+EFI_ISA_ACPI_RESOURCE_LIST mPcatIsaAcpiCom1Device = {\r
+ {EISA_PNP_ID(0x501), 0}, mPcatIsaAcpiCom1DeviceResources\r
+}; // COM 1 UART Controller\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+EFI_ISA_ACPI_RESOURCE_LIST mPcatIsaAcpiCom2Device = {\r
+ {EISA_PNP_ID(0x501), 1}, mPcatIsaAcpiCom2DeviceResources\r
+}; // COM 2 UART Controller\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+EFI_ISA_ACPI_RESOURCE_LIST mPcatIsaAcpiPs2KeyboardDevice = {\r
+ {EISA_PNP_ID(0x303), 0}, mPcatIsaAcpiPs2KeyboardDeviceResources\r
+}; // PS/2 Keyboard Controller\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+EFI_ISA_ACPI_RESOURCE_LIST mPcatIsaAcpiPs2MouseDevice = {\r
+ {EISA_PNP_ID(0x303), 1}, mPcatIsaAcpiPs2MouseDeviceResources\r
+}; // PS/2 Mouse Controller\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+EFI_ISA_ACPI_RESOURCE_LIST mPcatIsaAcpiFloppyADevice = {\r
+ {EISA_PNP_ID(0x604), 0}, mPcatIsaAcpiFloppyResources\r
+}; // Floppy Disk Controller A:\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+EFI_ISA_ACPI_RESOURCE_LIST mPcatIsaAcpiFloppyBDevice = {\r
+ {EISA_PNP_ID(0x604), 1}, mPcatIsaAcpiFloppyResources\r
+}; // Floppy Disk Controller B:\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
+EFI_ISA_ACPI_RESOURCE_LIST gPcatIsaAcpiDeviceList[7] = {0};\r
+\r
+/**\r
+ Initialize gPcatIsaAcpiDeviceList.\r
+**/\r
+VOID\r
+InitializePcatIsaAcpiDeviceList (\r
+ VOID\r
+ )\r
+{\r
+ UINTN Index;\r
+\r
+ Index = 0;\r
+ if (PcdGetBool (PcdIsaAcpiCom1Enable)) {\r
+ CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom1Device, sizeof(mPcatIsaAcpiCom1Device));\r
+ Index++;\r
+ }\r
+ if (PcdGetBool (PcdIsaAcpiCom2Enable)) {\r
+ CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom2Device, sizeof(mPcatIsaAcpiCom2Device));\r
+ Index++;\r
+ }\r
+ if (PcdGetBool (PcdIsaAcpiPs2KeyboardEnable)) {\r
+ CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2KeyboardDevice, sizeof(mPcatIsaAcpiPs2KeyboardDevice));\r
+ Index++;\r
+ }\r
+ if (PcdGetBool (PcdIsaAcpiPs2MouseEnable)) {\r
+ CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2MouseDevice, sizeof(mPcatIsaAcpiPs2MouseDevice));\r
+ Index++;\r
+ }\r
+ if (PcdGetBool (PcdIsaAcpiFloppyAEnable)) {\r
+ CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyADevice, sizeof(mPcatIsaAcpiFloppyADevice));\r
+ Index++;\r
+ }\r
+ if (PcdGetBool (PcdIsaAcpiFloppyBEnable)) {\r
+ CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyBDevice, sizeof(mPcatIsaAcpiFloppyBDevice));\r
+ Index++;\r
+ }\r
+}\r
\r
//\r
// ISA ACPI Protocol Functions\r
# This package is designed to public interfaces and implementation which follows\r
# PcAt defacto standard.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
## Pcd8259LegacyModeEdgeLevel defines the default edge level for legacy mode's interrrupt controller.\r
gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0000|UINT16|0x00000002\r
- \r
+\r
+[PcdsFixedAtBuild, PcdsDynamic, PcdsPatchableInModule]\r
+ ## This PCD specifies whether we need enable IsaAcpiCom1 device.\r
+ gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom1Enable|TRUE|BOOLEAN|0x00000003\r
+\r
+ ## This PCD specifies whether we need enable IsaAcpiCom2 device.\r
+ gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom2Enable|TRUE|BOOLEAN|0x00000004\r
+\r
+ ## This PCD specifies whether we need enable IsaAcpiPs2Keyboard device.\r
+ gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2KeyboardEnable|TRUE|BOOLEAN|0x00000005\r
+\r
+ ## This PCD specifies whether we need enable IsaAcpiPs2Mouse device.\r
+ gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2MouseEnable|TRUE|BOOLEAN|0x00000006\r
+\r
+ ## This PCD specifies whether we need enable IsaAcpiFloppyA device.\r
+ gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyAEnable|TRUE|BOOLEAN|0x00000007\r
+\r
+ ## This PCD specifies whether we need enable IsaAcpiFloppyB device.\r
+ gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyBEnable|TRUE|BOOLEAN|0x00000008\r
+\r
[Guids]\r
gPcAtChipsetPkgTokenSpaceGuid = { 0x326ae723, 0xae32, 0x4589, { 0x98, 0xb8, 0xca, 0xc2, 0x3c, 0xdc, 0xc1, 0xb1 } }\r
\r