diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-10 07:01:42 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-10 07:01:42 +0000 |
commit | 10c1a4ca0c7190e724b5850d7d2e98605618e32a (patch) | |
tree | 0cd8855b1f0603f92ea7cfc57a40edef32ac6559 /IntelFrameworkModulePkg/Bus/Isa | |
parent | a4df47f1090a723108cdd7ae45c9adce8ab5bcca (diff) | |
download | edk2-platforms-10c1a4ca0c7190e724b5850d7d2e98605618e32a.tar.xz |
Merge 3 PCDs for the ISA Bus Driver to a single PCD that is a bitmask of features.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8861 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Bus/Isa')
-rw-r--r-- | IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h | 7 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf | 6 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c | 31 |
3 files changed, 24 insertions, 20 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h index 9a711a5860..25427b4329 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h @@ -18,6 +18,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "InternalIsaBus.h"
//
+// Bits definition of PcdIsaBusSupportedFeatures
+//
+#define PCD_ISA_BUS_SUPPORT_DMA BIT0
+#define PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA BIT1
+#define PCD_ISA_BUS_SUPPORT_ISA_MEMORY BIT2
+
+//
// ISA I/O Support Function Prototypes
//
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf index 7f06f7fe1c..1405c41a9c 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf @@ -65,9 +65,7 @@ gEfiDevicePathProtocolGuid # PROTOCOL TO_START
gEfiGenericMemTestProtocolGuid # PROTOCOL TO_START
-[FeaturePcd.common]
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusOnlySupportSlaveDma
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportDma
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportIsaMemory
+[Pcd.common]
+ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportedFeatures
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c index 4673d8379a..228daf13fb 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c @@ -353,9 +353,9 @@ IsaIoUnmap ( ISA_MAP_INFO *IsaMapInfo;
//
- // Unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
+ // Check if DMA is supported.
//
- if (!FeaturePcdGet (PcdIsaBusSupportDma)) {
+ if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) {
return EFI_UNSUPPORTED;
}
@@ -512,10 +512,9 @@ IsaIoMemRead ( ISA_IO_DEVICE *IsaIoDevice;
//
- // Set Feature Flag PcdIsaBusSupportIsaMemory to FALSE to disable support for
- // ISA bus memory read/write operations.
+ // Check if ISA memory is supported.
//
- if (!FeaturePcdGet (PcdIsaBusSupportIsaMemory)) {
+ if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_ISA_MEMORY) == 0) {
return EFI_UNSUPPORTED;
}
@@ -579,10 +578,9 @@ IsaIoMemWrite ( ISA_IO_DEVICE *IsaIoDevice;
//
- // Set Feature Flag PcdIsaBusSupportIsaMemory to FALSE to disable support for
- // ISA bus memory read/write operations.
+ // Check if ISA memory is supported.
//
- if (!FeaturePcdGet (PcdIsaBusSupportIsaMemory)) {
+ if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_ISA_MEMORY) == 0) {
return EFI_UNSUPPORTED;
}
@@ -646,10 +644,9 @@ IsaIoCopyMem ( ISA_IO_DEVICE *IsaIoDevice;
//
- // Set Feature Flag PcdIsaBusSupportIsaMemory to FALSE to disable support for
- // ISA bus memory read/write operations.
+ // Check if ISA memory is supported.
//
- if (!FeaturePcdGet (PcdIsaBusSupportIsaMemory)) {
+ if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_ISA_MEMORY) == 0) {
return EFI_UNSUPPORTED;
}
@@ -1297,9 +1294,9 @@ IsaIoMap ( )
{
//
- // Set Feature Flag PcdIsaBusSupportDma to FALSE to disable support for ISA DMA.
+ // Check if DMA is supported.
//
- if (!FeaturePcdGet (PcdIsaBusSupportDma)) {
+ if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) {
return EFI_UNSUPPORTED;
}
//
@@ -1308,7 +1305,7 @@ IsaIoMap ( //
// So we just return EFI_UNSUPPORTED for these functions.
//
- if (FeaturePcdGet (PcdIsaBusOnlySupportSlaveDma)) {
+ if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA) != 0) {
return IsaIoMapOnlySupportSlaveReadWrite (
This,
Operation,
@@ -1369,7 +1366,8 @@ IsaIoAllocateBuffer ( // ISA Bus Master.
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
//
- if (!FeaturePcdGet (PcdIsaBusSupportDma) || FeaturePcdGet (PcdIsaBusOnlySupportSlaveDma)) {
+ if (((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) ||
+ ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA) != 0)) {
return EFI_UNSUPPORTED;
}
@@ -1439,7 +1437,8 @@ IsaIoFreeBuffer ( // ISA Bus Master.
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
//
- if (!FeaturePcdGet (PcdIsaBusSupportDma) || FeaturePcdGet (PcdIsaBusOnlySupportSlaveDma)) {
+ if (((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) ||
+ ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_ONLY_SUPPORT_SLAVE_DMA) != 0)) {
return EFI_UNSUPPORTED;
}
|