]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Merge 3 PCDs for the ISA Bus Driver to a single PCD that is a bitmask of features.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 Jul 2009 07:01:42 +0000 (07:01 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 Jul 2009 07:01:42 +0000 (07:01 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8861 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc

index 9a711a58603796ec70a4880e85ac449636587932..25427b4329903aad4d756136ae6e2b19896cc020 100644 (file)
@@ -17,6 +17,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "InternalIsaBus.h"\r
 \r
+//\r
+// Bits definition of PcdIsaBusSupportedFeatures\r
+//\r
+#define PCD_ISA_BUS_SUPPORT_DMA                  BIT0\r
+#define PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA       BIT1\r
+#define PCD_ISA_BUS_SUPPORT_ISA_MEMORY           BIT2\r
+\r
 //\r
 // ISA I/O Support Function Prototypes\r
 //\r
index 7f06f7fe1c9d540dcbe1ab901f7434968806494b..1405c41a9c6a9e9d292e98ca2f022cdc1d40e583 100644 (file)
@@ -65,9 +65,7 @@
   gEfiDevicePathProtocolGuid                    # PROTOCOL TO_START\r
   gEfiGenericMemTestProtocolGuid                # PROTOCOL TO_START\r
 \r
-[FeaturePcd.common]\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusOnlySupportSlaveDma\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportDma\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportIsaMemory\r
+[Pcd.common]\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportedFeatures\r
 \r
 \r
index 4673d8379a3c4012f493c3fab89d4fe5d844f7a8..228daf13fb4a2c86cd4b8ba4f22d6354f4d00682 100644 (file)
@@ -353,9 +353,9 @@ IsaIoUnmap (
   ISA_MAP_INFO  *IsaMapInfo;\r
 \r
   //\r
-  // Unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.\r
+  // Check if DMA is supported.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportDma)) {\r
+  if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -512,10 +512,9 @@ IsaIoMemRead (
   ISA_IO_DEVICE *IsaIoDevice;\r
 \r
   //\r
-  // Set Feature Flag PcdIsaBusSupportIsaMemory to FALSE to disable support for\r
-  // ISA bus memory read/write operations.\r
+  // Check if ISA memory is supported.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportIsaMemory)) {\r
+  if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_ISA_MEMORY) == 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -579,10 +578,9 @@ IsaIoMemWrite (
   ISA_IO_DEVICE *IsaIoDevice;\r
 \r
   //\r
-  // Set Feature Flag PcdIsaBusSupportIsaMemory to FALSE to disable support for\r
-  // ISA bus memory read/write operations.\r
+  // Check if ISA memory is supported.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportIsaMemory)) {\r
+  if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_ISA_MEMORY) == 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -646,10 +644,9 @@ IsaIoCopyMem (
   ISA_IO_DEVICE *IsaIoDevice;\r
 \r
   //\r
-  // Set Feature Flag PcdIsaBusSupportIsaMemory to FALSE to disable support for\r
-  // ISA bus memory read/write operations.\r
+  // Check if ISA memory is supported.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportIsaMemory)) {\r
+  if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_ISA_MEMORY) == 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -1297,9 +1294,9 @@ IsaIoMap (
   )\r
 {\r
   //\r
-  // Set Feature Flag PcdIsaBusSupportDma to FALSE to disable support for ISA DMA.\r
+  // Check if DMA is supported.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportDma)) {\r
+  if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
   //\r
@@ -1308,7 +1305,7 @@ IsaIoMap (
   //\r
   // So we just return EFI_UNSUPPORTED for these functions.\r
   //\r
-  if (FeaturePcdGet (PcdIsaBusOnlySupportSlaveDma)) {\r
+  if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA) != 0) {\r
     return IsaIoMapOnlySupportSlaveReadWrite (\r
              This,\r
              Operation,\r
@@ -1369,7 +1366,8 @@ IsaIoAllocateBuffer (
   // ISA Bus Master.\r
   // Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportDma) || FeaturePcdGet (PcdIsaBusOnlySupportSlaveDma)) {\r
+  if (((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) ||\r
+      ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA) != 0)) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -1439,7 +1437,8 @@ IsaIoFreeBuffer (
   // ISA Bus Master.\r
   // Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.\r
   //\r
-  if (!FeaturePcdGet (PcdIsaBusSupportDma) || FeaturePcdGet (PcdIsaBusOnlySupportSlaveDma)) {\r
+  if (((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) ||\r
+      ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA) != 0)) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
index 7e3349a5135051c7d01c8945e5b70ac88c846372..0bb6cacff1fae18f97540978f66a7f17b6828a52 100644 (file)
   ## This PCD specifies whether PciBus supports the hot plug device.\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|TRUE|BOOLEAN|0x0001003d\r
   \r
-  ## ISA bus related PCDs to support DMA, SlaveDMA and Memory feature.\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportDma|TRUE|BOOLEAN|0x00010040\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusOnlySupportSlaveDma|FALSE|BOOLEAN|0x00010041\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportIsaMemory|TRUE|BOOLEAN|0x00010042\r
-\r
 [PcdsFixedAtBuild]\r
   ## FFS filename to find the default BMP Logo file.\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile |{ 0x99, 0x8b, 0xB2, 0x7B, 0xBB, 0x61, 0xD5, 0x11, 0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }|VOID*|16\r
   ## FFS filename to find the shell application.\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7A, 0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, 0x37 }|VOID*|16\r
 \r
+  ## ISA bus related PCD to support DMA, SlaveDMA and ISA Memory features.\r
+  #  BIT0 indicates if DMA is supported\r
+  #  BIT1 indicates if only slave DMA is supported\r
+  #  BIT2 indicates if ISA memory is supported\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportedFeatures|0x05|UINT8|0x00010040\r
+\r
 [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]\r
   ## PcdStatusCodeMemorySize is used when PcdStatusCodeUseMemory is set to true\r
   #  (PcdStatusCodeMemorySize * KBytes) is the total taken memory size.\r
index a91034450434807303cb62cbc57a427b2ddbb858..f821d69e9f83757f7ef84c694dac08edd058b7a4 100644 (file)
   gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|FALSE\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|TRUE\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportDma|TRUE\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusOnlySupportSlaveDma|FALSE\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportIsaMemory|TRUE\r
 \r
 [PcdsFixedAtBuild.common]\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000\r