summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/PeiMemoryLib
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-05 06:59:50 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-05 06:59:50 +0000
commitbad463843cc0ccef85901fa5f08ea498994f3c5f (patch)
treea97a2d43130bbacb52d41e856687ac4f19a1e8b6 /MdePkg/Library/PeiMemoryLib
parentaf05f8b667db383a68e7d37ae502755b662bdd70 (diff)
downloadedk2-bad463843cc0ccef85901fa5f08ea498994f3c5f.tar.gz
edk2-bad463843cc0ccef85901fa5f08ea498994f3c5f.tar.bz2
edk2-bad463843cc0ccef85901fa5f08ea498994f3c5f.zip
Add inf files for PeiSmbusLibSmbus2, PeiDxePostCodeLibReportStatusCode, PeiMemoryLib and DxeSmbusLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3066 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiMemoryLib')
-rw-r--r--MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLibGuid.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLibInternals.h12
-rw-r--r--MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf86
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/SetMemWrapper.c2
10 files changed, 111 insertions, 11 deletions
diff --git a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
index 4c0d3eaadb..9bcdc52ae7 100644
--- a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
@@ -34,8 +34,8 @@
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
- If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
- If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@param DestinationBuffer Pointer to the destination buffer to compare.
diff --git a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
index 9e620e2200..32c9db7d97 100644
--- a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
@@ -31,8 +31,8 @@
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
DestinationBuffer. The implementation must be reentrant, and it must handle the case
where SourceBuffer overlaps DestinationBuffer.
- If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
- If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@param DestinationBuffer Pointer to the destination buffer of the memory copy.
@param SourceBuffer Pointer to the source buffer of the memory copy.
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
index 36da5b7424..a2f0850c75 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
@@ -23,6 +23,8 @@
**/
+#include "MemLibInternals.h"
+
/**
Copies a source GUID to a destination GUID.
@@ -102,7 +104,7 @@ CompareGuid (
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 128-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
index 8646b24e79..0bccb2bb86 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
@@ -26,6 +26,18 @@
#ifndef __MEM_LIB_INTERNALS__
#define __MEM_LIB_INTERNALS__
+//
+// The package level header files this module uses
+//
+#include <PiPei.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/BaseMemoryLib.h>
+#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+
/**
Copy Length bytes from Source to Destination.
diff --git a/MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf b/MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf
new file mode 100644
index 0000000000..2966e44989
--- /dev/null
+++ b/MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf
@@ -0,0 +1,86 @@
+#/** @file
+# Component description file for Pei Memory Library
+#
+# Base Memory Library implementation that uses PEI Services
+# where possible for size reduction.
+# Copyright (c) 2006, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PeiMemoryLib
+ FILE_GUID = 3a9759d2-53bc-4eb2-abcd-c93099419063
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = BaseMemoryLib|PEIM
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC
+#
+
+################################################################################
+#
+# Sources Section - list of files that are required for the build to succeed.
+#
+################################################################################
+
+[Sources.common]
+ ScanMem64Wrapper.c
+ ScanMem32Wrapper.c
+ ScanMem16Wrapper.c
+ ScanMem8Wrapper.c
+ ZeroMemWrapper.c
+ CompareMemWrapper.c
+ SetMem64Wrapper.c
+ SetMem32Wrapper.c
+ SetMem16Wrapper.c
+ SetMemWrapper.c
+ CopyMemWrapper.c
+ MemLibGeneric.c
+ MemLibGuid.c
+ MemLib.c
+ MemLibInternals.h
+
+
+################################################################################
+#
+# Package Dependency Section - list of Package files that are required for
+# this module.
+#
+################################################################################
+
+[Packages]
+ MdePkg/MdePkg.dec
+
+
+################################################################################
+#
+# Library Class Section - list of Library Classes that are required for
+# this module.
+#
+################################################################################
+
+[LibraryClasses]
+ BaseLib
+ DebugLib
+ PeiServicesTablePointerLib
+
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
index 95f134bbda..761b95fb33 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
@@ -36,7 +36,7 @@
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
index 6a3dcd7ad2..3a11fc2821 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
@@ -36,7 +36,7 @@
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
index b355fe647c..e460c88d26 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
@@ -36,7 +36,7 @@
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
- If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
index 2b21b22166..df0edec92a 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
@@ -34,7 +34,7 @@
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
- If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
@@ -56,6 +56,6 @@ ScanMem8 (
}
ASSERT (Buffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
-
+
return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
}
diff --git a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
index e74ce8d65b..2ad6209c26 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
@@ -29,7 +29,7 @@
Fills a target buffer with a byte value, and returns the target buffer.
This function fills Length bytes of Buffer with Value, and returns Buffer.
- If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
@param Buffer Memory to set.
@param Length Number of bytes to set.