summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-25 05:36:08 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-25 05:36:08 +0000
commit4ca0802e08133ada71511b70704922d94c439ea4 (patch)
treeed3de03640a4b7a2330a3fe8869e2417f9b5ebd8 /MdePkg
parent340499ce6e66cf17c2cd31e37e453ce67777f12d (diff)
downloadedk2-platforms-4ca0802e08133ada71511b70704922d94c439ea4.tar.xz
Refine the code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5729 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c6
-rw-r--r--MdePkg/Library/PeiIoLibCpuIo/IoLib.c4
-rw-r--r--MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c25
3 files changed, 15 insertions, 20 deletions
diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c b/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
index 75dc1f8aa4..134aae01bb 100644
--- a/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
+++ b/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
@@ -13,12 +13,6 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- The following IoLib instances share the same version of this file:
-
- BaseIoLibIntrinsic
- DxeIoLibCpuIo
- PeiIoLibCpuIo
-
**/
diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
index e3622e6329..9130921937 100644
--- a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
+++ b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
@@ -1,5 +1,5 @@
/** @file
- I/O Library.
+ I/O Library. The implementations are based on EFI_PEI_SERVICE->CpuIo interface.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
@@ -521,7 +521,7 @@ MmioRead64 (
//
// Make sure Address is aligned on a 64-bit boundary.
//
- ASSERT ((Address & 7) == 0);
+ ASSERT ((Address & 7) == (sizeof (UINT64) - 1));
return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64) Address);
}
diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c
index bc81ca2243..20d926f9f0 100644
--- a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c
+++ b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c
@@ -1,5 +1,6 @@
/** @file
I/O Library MMIO Buffer Functions.
+ The implementations are based on EFI_PEI_SERVICE->CpuIo interface.
Copyright (c) 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
@@ -35,7 +36,7 @@
@param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer receiving the data read.
- @return Buffer
+ @return Pointer to a system memory buffer receiving the data read.
**/
UINT8 *
@@ -79,7 +80,7 @@ MmioReadBuffer8 (
@param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer receiving the data read.
- @return Buffer
+ @return Pointer to a system memory buffer receiving the data read.
**/
UINT16 *
@@ -130,7 +131,7 @@ MmioReadBuffer16 (
@param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer receiving the data read.
- @return Buffer
+ @return Pointer to a system memory buffer receiving the data read.
**/
UINT32 *
@@ -181,7 +182,7 @@ MmioReadBuffer32 (
@param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer receiving the data read.
- @return Buffer
+ @return Pointer to a system memory buffer receiving the data read.
**/
UINT64 *
@@ -226,10 +227,10 @@ MmioReadBuffer64 (
@param StartAddress Starting address for the MMIO region to be copied to.
- @param Length Size in bytes of the copy.
+ @param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer containing the data to write.
- @return Size in bytes of the copy.
+ @return Pointer to a system memory buffer containing the data to write.
**/
UINT8 *
@@ -272,10 +273,10 @@ MmioWriteBuffer8 (
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied to.
- @param Length Size in bytes of the copy.
+ @param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer containing the data to write.
- @return Size in bytes of the copy.
+ @return Pointer to a system memory buffer containing the data to write.
**/
UINT16 *
@@ -326,10 +327,10 @@ MmioWriteBuffer16 (
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied to.
- @param Length Size in bytes of the copy.
+ @param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer containing the data to write.
- @return Size in bytes of the copy.
+ @return Pointer to a system memory buffer containing the data to write.
**/
UINT32 *
@@ -379,10 +380,10 @@ MmioWriteBuffer32 (
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied to.
- @param Length Size in bytes of the copy.
+ @param Length Size in bytes of the copy.
@param Buffer Pointer to a system memory buffer containing the data to write.
- @return Size in bytes of the copy.
+ @return Pointer to a system memory buffer containing the data to write.
**/
UINT64 *