]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine the code.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 25 Aug 2008 05:36:08 +0000 (05:36 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 25 Aug 2008 05:36:08 +0000 (05:36 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5729 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
MdePkg/Library/PeiIoLibCpuIo/IoLib.c
MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c

index 75dc1f8aa417f05ec2fb333e66f535ec4a6230a7..134aae01bb72799a9de61f5b2475266284e8c87c 100644 (file)
   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
-  The following IoLib instances share the same version of this file:\r
-\r
-    BaseIoLibIntrinsic\r
-    DxeIoLibCpuIo\r
-    PeiIoLibCpuIo\r
-\r
 **/\r
 \r
 \r
index e3622e632970119e8c6984cb5639e81ea2fc9623..913092193787fe6e883df0cf8c9e3fd1f2546218 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  I/O Library.\r
+  I/O Library. The implementations are based on EFI_PEI_SERVICE->CpuIo interface.\r
 \r
   Copyright (c) 2006, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
@@ -521,7 +521,7 @@ MmioRead64 (
   //\r
   // Make sure Address is aligned on a 64-bit boundary.\r
   //\r
-  ASSERT ((Address & 7) == 0);\r
+  ASSERT ((Address & 7) == (sizeof (UINT64) - 1));\r
   return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64) Address);\r
 \r
 }\r
index bc81ca2243a9d81cf2524820e13ddcfdeaa561f8..20d926f9f0855fe331bd5c8358a0cfc877f305b6 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
   I/O Library MMIO Buffer Functions.\r
+  The implementations are based on EFI_PEI_SERVICE->CpuIo interface.\r
 \r
   Copyright (c) 2007, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
@@ -35,7 +36,7 @@
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT8 *\r
@@ -79,7 +80,7 @@ MmioReadBuffer8 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT16 *\r
@@ -130,7 +131,7 @@ MmioReadBuffer16 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT32 *\r
@@ -181,7 +182,7 @@ MmioReadBuffer32 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT64 *\r
@@ -226,10 +227,10 @@ MmioReadBuffer64 (
 \r
 \r
   @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
+  @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT8 *\r
@@ -272,10 +273,10 @@ MmioWriteBuffer8 (
   If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
   @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
+  @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT16 *\r
@@ -326,10 +327,10 @@ MmioWriteBuffer16 (
   If Buffer is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
   @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
+  @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT32 *\r
@@ -379,10 +380,10 @@ MmioWriteBuffer32 (
   If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
   @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
+  @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT64 *\r