]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Coding style clean-up.
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 Jun 2009 08:40:09 +0000 (08:40 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 Jun 2009 08:40:09 +0000 (08:40 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8670 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/ComponentName.c
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/ComponentName.h
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.c
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c

index bbf262d5177b80c835816e3139f402cbba872ed8..c525af7bc00392417129f86a5adbbd2a1f7db6ca 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   UEFI Component Name(2) protocol implementation for IsaBus driver.\r
 \r
 Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
   UEFI Component Name(2) protocol implementation for IsaBus driver.\r
 \r
 Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
index 301142698b782c81d672c9e72bdef3a59d97b06d..3a42e027f4738b5b97d37cb342644550b9f37483 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   Header file for implementation of UEFI Component Name(2) protocol.\r
 \r
 Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
   Header file for implementation of UEFI Component Name(2) protocol.\r
 \r
 Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
index 672e449cf9228ee8520b1043a596ae07a47dc523..0a7831d233a1fa63a69837076290d2173d91cc63 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   The header file for ISA bus driver\r
   \r
 Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
   The header file for ISA bus driver\r
   \r
 Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
@@ -178,9 +178,9 @@ typedef struct {
 EFI_STATUS\r
 EFIAPI\r
 IsaBusControllerDriverSupported (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaBusControllerDriverSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  * This,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   Controller,\r
   IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
@@ -213,9 +213,9 @@ IsaBusControllerDriverSupported (
 EFI_STATUS\r
 EFIAPI\r
 IsaBusControllerDriverStart (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaBusControllerDriverStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  * This,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   Controller,\r
   IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
@@ -264,7 +264,7 @@ IsaBusControllerDriverStop (
   @param[in] PciIo                  The Pointer to the PCI protocol \r
   @param[in] ParentDevicePath       Device path of the ISA bus controller\r
   @param[in] IsaDeviceResourceList  The resource list of the ISA device\r
   @param[in] PciIo                  The Pointer to the PCI protocol \r
   @param[in] ParentDevicePath       Device path of the ISA bus controller\r
   @param[in] IsaDeviceResourceList  The resource list of the ISA device\r
-  @param[in] ChildDevicePath        The pointer to the child device.\r
+  @param[out] ChildDevicePath       The pointer to the child device.\r
 \r
   @retval EFI_SUCCESS               The handle for the child device was created.\r
   @retval EFI_OUT_OF_RESOURCES      The request could not be completed due to a lack of resources.\r
 \r
   @retval EFI_SUCCESS               The handle for the child device was created.\r
   @retval EFI_OUT_OF_RESOURCES      The request could not be completed due to a lack of resources.\r
@@ -286,7 +286,6 @@ IsaCreateDevice (
   @param[in] IsaIoDevice            The iso device to be initialized.\r
   @param[in] IsaDeviceResourceList  The resource list.\r
   \r
   @param[in] IsaIoDevice            The iso device to be initialized.\r
   @param[in] IsaDeviceResourceList  The resource list.\r
   \r
-  @retval None\r
 **/\r
 VOID\r
 InitializeIsaIoInstance (\r
 **/\r
 VOID\r
 InitializeIsaIoInstance (\r
index b5e6694ca22fd42f5d24fb72a67e1d627ff93404..9a711a58603796ec70a4880e85ac449636587932 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   The header file for EFI_ISA_IO protocol implementation.\r
   \r
 Copyright (c) 2006 - 2009, Intel Corporation.<BR>\r
   The header file for EFI_ISA_IO protocol implementation.\r
   \r
 Copyright (c) 2006 - 2009, Intel Corporation.<BR>\r
@@ -21,6 +21,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 // ISA I/O Support Function Prototypes\r
 //\r
 \r
 // ISA I/O Support Function Prototypes\r
 //\r
 \r
+/**\r
+  Verifies access to an ISA device\r
+\r
+  @param[in] IsaIoDevice         The ISA device to be verified.\r
+  @param[in] Type                The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.\r
+  @param[in] Width               The width of the memory operation.\r
+  @param[in] Count               The number of memory operations to perform. \r
+  @param[in] Offset              The offset in ISA memory space to start the memory operation.  \r
+  \r
+  @retval EFI_SUCCESS            Verify success.\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
+  @retval EFI_UNSUPPORTED        The device ont support the access type.\r
+**/\r
 EFI_STATUS\r
 IsaIoVerifyAccess (\r
   IN ISA_IO_DEVICE              *IsaIoDevice,\r
 EFI_STATUS\r
 IsaIoVerifyAccess (\r
   IN ISA_IO_DEVICE              *IsaIoDevice,\r
@@ -30,6 +43,20 @@ IsaIoVerifyAccess (
   IN UINT32                     Offset\r
   );\r
   \r
   IN UINT32                     Offset\r
   );\r
   \r
+/**\r
+  Performs an ISA I/O Read Cycle\r
+\r
+  @param[in]  This              A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in]  Width             Specifies the width of the I/O operation.\r
+  @param[in]  Offset            The offset in ISA I/O space to start the I/O operation.  \r
+  @param[in]  Count             The number of I/O operations to perform. \r
+  @param[out] Buffer            The destination buffer to store the results\r
+\r
+  @retval EFI_SUCCESS           The data was read from the device sucessfully.\r
+  @retval EFI_UNSUPPORTED       The Offset is not valid for this device.\r
+  @retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoIoRead (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoIoRead (\r
@@ -40,6 +67,20 @@ IsaIoIoRead (
   OUT VOID                       *Buffer\r
   );\r
 \r
   OUT VOID                       *Buffer\r
   );\r
 \r
+/**\r
+  Performs an ISA I/O Write Cycle\r
+\r
+  @param[in] This                A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Width               Specifies the width of the I/O operation.\r
+  @param[in] Offset              The offset in ISA I/O space to start the I/O operation.  \r
+  @param[in] Count               The number of I/O operations to perform. \r
+  @param[in] Buffer              The source buffer to write data from\r
+\r
+  @retval EFI_SUCCESS            The data was writen to the device sucessfully.\r
+  @retval EFI_UNSUPPORTED        The Offset is not valid for this device.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoIoWrite (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoIoWrite (\r
@@ -50,6 +91,30 @@ IsaIoIoWrite (
   IN VOID                       *Buffer\r
   );\r
 \r
   IN VOID                       *Buffer\r
   );\r
 \r
+/**\r
+  Maps a memory region for DMA\r
+\r
+  @param This                    A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param Operation               Indicates the type of DMA (slave or bus master), and if \r
+                                 the DMA operation is going to read or write to system memory. \r
+  @param ChannelNumber           The slave channel number to use for this DMA operation. \r
+                                 If Operation and ChannelAttributes shows that this device \r
+                                 performs bus mastering DMA, then this field is ignored.  \r
+                                 The legal range for this field is 0..7.  \r
+  @param ChannelAttributes       The attributes of the DMA channel to use for this DMA operation\r
+  @param HostAddress             The system memory address to map to the device.  \r
+  @param NumberOfBytes           On input the number of bytes to map.  On output the number \r
+                                 of bytes that were mapped.\r
+  @param DeviceAddress           The resulting map address for the bus master device to use \r
+                                 to access the hosts HostAddress.  \r
+  @param Mapping                 A resulting value to pass to EFI_ISA_IO.Unmap().\r
+\r
+  @retval EFI_SUCCESS            The range was mapped for the returned NumberOfBytes.\r
+  @retval EFI_INVALID_PARAMETER  The Operation or HostAddress is undefined.\r
+  @retval EFI_UNSUPPORTED        The HostAddress can not be mapped as a common buffer.\r
+  @retval EFI_DEVICE_ERROR       The system hardware could not map the requested address.\r
+  @retval EFI_OUT_OF_RESOURCES   The memory pages could not be allocated.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoMap (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoMap (\r
@@ -63,6 +128,15 @@ IsaIoMap (
   OUT    VOID                           **Mapping\r
   );\r
 \r
   OUT    VOID                           **Mapping\r
   );\r
 \r
+/**\r
+  Unmaps a memory region for DMA\r
+\r
+  @param[in] This           A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Mapping        The mapping value returned from EFI_ISA_IO.Map().\r
+\r
+  @retval EFI_SUCCESS       The range was unmapped.\r
+  @retval EFI_DEVICE_ERROR  The data was not committed to the target system memory.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoUnmap (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoUnmap (\r
@@ -70,17 +144,47 @@ IsaIoUnmap (
   IN VOID                 *Mapping\r
   );\r
 \r
   IN VOID                 *Mapping\r
   );\r
 \r
+/**\r
+  Flushes any posted write data to the system memory.\r
+\r
+  @param[in] This             A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+\r
+  @retval  EFI_SUCCESS        The buffers were flushed.\r
+  @retval  EFI_DEVICE_ERROR   The buffers were not flushed due to a hardware error.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoFlush (\r
   IN EFI_ISA_IO_PROTOCOL  *This\r
   );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoFlush (\r
   IN EFI_ISA_IO_PROTOCOL  *This\r
   );\r
 \r
+/**\r
+  report a error Status code\r
+\r
+  @param Code          The error status code.\r
+  \r
+  @return EFI_SUCCESS  Success to report status code.\r
+**/\r
 EFI_STATUS\r
 ReportErrorStatusCode (\r
 EFI_STATUS\r
 ReportErrorStatusCode (\r
-  EFI_STATUS_CODE_VALUE code\r
+  EFI_STATUS_CODE_VALUE Code\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Writes I/O operation base address and count number to a 8 bit I/O Port.\r
+\r
+  @param[in] This                A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] AddrOffset          The address' offset.\r
+  @param[in] PageOffset          The page's offest.\r
+  @param[in] CountOffset         The count's offset.\r
+  @param[in] BaseAddress         The base address.\r
+  @param[in] Count               The number of I/O operations to perform. \r
+  \r
+  @retval EFI_SUCCESS            Success.\r
+  @retval EFI_INVALID_PARAMETER  Parameter is invalid.\r
+  @retval EFI_UNSUPPORTED        The address range specified by these Offsets and Count is not valid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 WriteDmaPort (\r
   IN EFI_ISA_IO_PROTOCOL  *This,\r
 EFI_STATUS\r
 WriteDmaPort (\r
   IN EFI_ISA_IO_PROTOCOL  *This,\r
@@ -91,6 +195,18 @@ WriteDmaPort (
   IN UINT16               Count\r
   );\r
 \r
   IN UINT16               Count\r
   );\r
 \r
+/**\r
+  Writes an 8-bit I/O Port\r
+\r
+  @param[in] This                A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Offset              The offset in ISA IO space to start the IO operation.  \r
+  @param[in] Value               The data to write port.\r
+\r
+  @retval EFI_SUCCESS            Success.\r
+  @retval EFI_INVALID_PARAMETER  Parameter is invalid.\r
+  @retval EFI_UNSUPPORTED        The address range specified by Offset is not valid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 WritePort (\r
   IN EFI_ISA_IO_PROTOCOL  *This,\r
 EFI_STATUS\r
 WritePort (\r
   IN EFI_ISA_IO_PROTOCOL  *This,\r
@@ -98,6 +214,20 @@ WritePort (
   IN UINT8                Value\r
   );    \r
 \r
   IN UINT8                Value\r
   );    \r
 \r
+/**\r
+  Performs an ISA Memory Read Cycle\r
+\r
+  @param[in]  This               A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in]  Width              Specifies the width of the memory operation.\r
+  @param[in]  Offset             The offset in ISA memory space to start the memory operation.  \r
+  @param[in]  Count              The number of memory operations to perform. \r
+  @param[out] Buffer             The destination buffer to store the results\r
\r
+  @retval EFI_SUCCESS            The data was read from the device successfully.\r
+  @retval EFI_UNSUPPORTED        The Offset is not valid for this device.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoMemRead (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoMemRead (\r
@@ -109,6 +239,20 @@ IsaIoMemRead (
   );\r
 \r
 \r
   );\r
 \r
 \r
+/**\r
+  Performs an ISA Memory Write Cycle\r
+\r
+  @param[in] This                A pointer to the EFI_ISA_IO_PROTOCOL instance.  \r
+  @param[in] Width               Specifies the width of the memory operation.\r
+  @param[in] Offset              The offset in ISA memory space to start the memory operation.  \r
+  @param[in] Count               The number of memory operations to perform. \r
+  @param[in] Buffer              The source buffer to write data from\r
+\r
+  @retval EFI_SUCCESS            The data was written to the device sucessfully.\r
+  @retval EFI_UNSUPPORTED        The Offset is not valid for this device.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoMemWrite (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoMemWrite (\r
@@ -119,6 +263,20 @@ IsaIoMemWrite (
   IN VOID                       *Buffer\r
   );\r
 \r
   IN VOID                       *Buffer\r
   );\r
 \r
+/**\r
+  Copy one region of ISA memory space to another region of ISA memory space on the ISA controller.\r
+\r
+  @param[in]  This               A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in]  Width              Specifies the width of the memory copy operation.\r
+  @param[in]  DestOffset         The offset of the destination \r
+  @param[in]  SrcOffset          The offset of the source\r
+  @param[in]  Count              The number of memory copy  operations to perform\r
+\r
+  @retval EFI_SUCCESS            The data was copied sucessfully.\r
+  @retval EFI_UNSUPPORTED        The DestOffset or SrcOffset is not valid for this device.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoCopyMem (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoCopyMem (\r
@@ -129,6 +287,22 @@ IsaIoCopyMem (
   IN UINTN                      Count\r
   );\r
 \r
   IN UINTN                      Count\r
   );\r
 \r
+/**\r
+  Allocates pages that are suitable for an EfiIsaIoOperationBusMasterCommonBuffer mapping.\r
+\r
+  @param[in]  This               A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in]  Type               The type allocation to perform.\r
+  @param[in]  MemoryType         The type of memory to allocate.\r
+  @param[in]  Pages              The number of pages to allocate.\r
+  @param[out] HostAddress        A pointer to store the base address of the allocated range.\r
+  @param[in]  Attributes         The requested bit mask of attributes for the allocated range.\r
+\r
+  @retval EFI_SUCCESS            The requested memory pages were allocated.\r
+  @retval EFI_INVALID_PARAMETER  Type is invalid or MemoryType is invalid or HostAddress is NULL\r
+  @retval EFI_UNSUPPORTED        Attributes is unsupported or the memory range specified \r
+                                 by HostAddress, Pages, and Type is not available for common buffer use.\r
+  @retval EFI_OUT_OF_RESOURCES   The memory pages could not be allocated.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoAllocateBuffer (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoAllocateBuffer (\r
@@ -140,6 +314,16 @@ IsaIoAllocateBuffer (
   IN  UINT64               Attributes\r
   );\r
 \r
   IN  UINT64               Attributes\r
   );\r
 \r
+/**\r
+  Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). \r
+\r
+  @param[in] This                A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
+  @param[in] Pages               The number of pages to free.\r
+  @param[in] HostAddress         The base address of the allocated range.\r
+\r
+  @retval EFI_SUCCESS            The requested memory pages were freed.\r
+  @retval EFI_INVALID_PARAMETER  The memory was not allocated with EFI_ISA_IO.AllocateBufer().\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoFreeBuffer (\r
 EFI_STATUS\r
 EFIAPI\r
 IsaIoFreeBuffer (\r
index 8cf9ac9c2cfc0f2ace0b1572cfe5f921cce20500..c90b4cdb439acd88262fff6eb12fbea8914227d2 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   ISA Bus UEFI driver.\r
 \r
   Discovers all the ISA Controllers and their resources by using the ISA ACPI \r
   ISA Bus UEFI driver.\r
 \r
   Discovers all the ISA Controllers and their resources by using the ISA ACPI \r
@@ -564,7 +564,7 @@ IsaBusControllerDriverStop (
   @param[in] PciIo                  The Pointer to the PCI protocol \r
   @param[in] ParentDevicePath       Device path of the ISA bus controller\r
   @param[in] IsaDeviceResourceList  The resource list of the ISA device\r
   @param[in] PciIo                  The Pointer to the PCI protocol \r
   @param[in] ParentDevicePath       Device path of the ISA bus controller\r
   @param[in] IsaDeviceResourceList  The resource list of the ISA device\r
-  @param[in] ChildDevicePath        The pointer to the child device.\r
+  @param[out] ChildDevicePath       The pointer to the child device.\r
 \r
   @retval EFI_SUCCESS               The handle for the child device was created.\r
   @retval EFI_OUT_OF_RESOURCES      The request could not be completed due to a lack of resources.\r
 \r
   @retval EFI_SUCCESS               The handle for the child device was created.\r
   @retval EFI_OUT_OF_RESOURCES      The request could not be completed due to a lack of resources.\r
index 815fa6bcab900f53fbfbc5458771f3d3f265cab8..4673d8379a3c4012f493c3fab89d4fe5d844f7a8 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   The implementation for EFI_ISA_IO_PROTOCOL. \r
   \r
 Copyright (c) 2006 - 2009, Intel Corporation.<BR>\r
   The implementation for EFI_ISA_IO_PROTOCOL. \r
   \r
 Copyright (c) 2006 - 2009, Intel Corporation.<BR>\r
@@ -104,7 +104,6 @@ ReportErrorStatusCode (
   @param[in] IsaIoDevice            The iso device to be initialized.\r
   @param[in] IsaDeviceResourceList  The resource list.\r
   \r
   @param[in] IsaIoDevice            The iso device to be initialized.\r
   @param[in] IsaDeviceResourceList  The resource list.\r
   \r
-  @retval None\r
 **/\r
 VOID\r
 InitializeIsaIoInstance (\r
 **/\r
 VOID\r
 InitializeIsaIoInstance (\r
@@ -624,7 +623,7 @@ IsaIoMemWrite (
 \r
   @param[in]  This               A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
   @param[in]  Width              Specifies the width of the memory copy operation.\r
 \r
   @param[in]  This               A pointer to the EFI_ISA_IO_PROTOCOL instance.\r
   @param[in]  Width              Specifies the width of the memory copy operation.\r
-  @param[out] DestOffset         The offset of the destination \r
+  @param[in]  DestOffset         The offset of the destination \r
   @param[in]  SrcOffset          The offset of the source\r
   @param[in]  Count              The number of memory copy  operations to perform\r
 \r
   @param[in]  SrcOffset          The offset of the source\r
   @param[in]  Count              The number of memory copy  operations to perform\r
 \r
@@ -1037,17 +1036,14 @@ IsaIoMapFullSupport (
     //\r
     // This implementation only support COMPATIBLE DMA Transfers\r
     //\r
     //\r
     // This implementation only support COMPATIBLE DMA Transfers\r
     //\r
-    if (!(ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE)) {\r
+    if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE) == 0) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
-    if (ChannelAttributes &\r
-       (\r
-         EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A |\r
-         EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B |\r
-         EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C\r
-       )\r
-       ) {\r
+    if ((ChannelAttributes &\r
+         (EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A |\r
+          EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B |\r
+          EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C)) != 0) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
@@ -1055,8 +1051,8 @@ IsaIoMapFullSupport (
       //\r
       // If this is Channel 0..3, then the width must be 8 bit\r
       //\r
       //\r
       // If this is Channel 0..3, then the width must be 8 bit\r
       //\r
-      if (!(ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8) ||\r
-          (ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16)\r
+      if (((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8) == 0) ||\r
+          ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16) != 0)\r
           ) {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
           ) {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
@@ -1064,21 +1060,20 @@ IsaIoMapFullSupport (
       //\r
       // If this is Channel 4..7, then the width must be 16 bit\r
       //\r
       //\r
       // If this is Channel 4..7, then the width must be 16 bit\r
       //\r
-      if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8) ||\r
-          (!(ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16))\r
-          ) {\r
+      if (((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8) != 0) ||\r
+          ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16) == 0)) {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r
     //\r
     // Either Demand Mode or Single Mode must be selected, but not both\r
     //\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r
     //\r
     // Either Demand Mode or Single Mode must be selected, but not both\r
     //\r
-    if (ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE) {\r
-      if (ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE) {\r
+    if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE) != 0) {\r
+      if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE) != 0) {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     } else {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     } else {\r
-      if (!(ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE)) {\r
+      if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE) == 0) {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r
@@ -1173,15 +1168,15 @@ IsaIoMapFullSupport (
     DmaMode |= V_8237_DMA_CHMODE_IO2MEM;\r
   }\r
 \r
     DmaMode |= V_8237_DMA_CHMODE_IO2MEM;\r
   }\r
 \r
-  if (ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE) {\r
+  if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE) != 0) {\r
     DmaMode |= B_8237_DMA_CHMODE_AE;\r
   }\r
 \r
     DmaMode |= B_8237_DMA_CHMODE_AE;\r
   }\r
 \r
-  if (ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE) {\r
+  if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE) != 0) {\r
     DmaMode |= V_8237_DMA_CHMODE_DEMAND;\r
   }\r
 \r
     DmaMode |= V_8237_DMA_CHMODE_DEMAND;\r
   }\r
 \r
-  if (ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE) {\r
+  if ((ChannelAttributes & EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE) != 0) {\r
     DmaMode |= V_8237_DMA_CHMODE_SINGLE;\r
   }\r
   //\r
     DmaMode |= V_8237_DMA_CHMODE_SINGLE;\r
   }\r
   //\r
@@ -1392,7 +1387,7 @@ IsaIoAllocateBuffer (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Attributes & ~(EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED)) {\r
+  if ((Attributes & ~(EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED)) != 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
     return EFI_UNSUPPORTED;\r
   }\r
 \r