diff options
author | Yao, Jiewen <jiewen.yao@intel.com> | 2015-02-02 14:42:22 +0000 |
---|---|---|
committer | jyao1 <jyao1@Edk2> | 2015-02-02 14:42:22 +0000 |
commit | 842b1242d19225bb6d6146861d3418a5c9549175 (patch) | |
tree | 36474e4579659ccdda856567ea91f4e0f37f4352 /MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c | |
parent | d425764e3f55f949e17daa42aaf0b8c2c2ad4046 (diff) | |
download | edk2-platforms-842b1242d19225bb6d6146861d3418a5c9549175.tar.xz |
Use SmmMemLib to check communication buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Gao, Liming" <liming.gao@intel.com>
Reviewed-by: "Fan, Jeff" <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16694 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c')
-rw-r--r-- | MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c index f0f48438f4..e4f7756f72 100644 --- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c @@ -1,7 +1,7 @@ /** @file
Support routines for memory allocation routines based on SMM Core internal functions.
- Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
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
@@ -936,3 +936,28 @@ FreePool ( ASSERT_EFI_ERROR (Status);
}
+/**
+ The constructor function calls SmmInitializeMemoryServices to initialize memory in SMRAM.
+
+ @param ImageHandle The firmware allocated handle for the EFI image.
+ @param SystemTable A pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
+
+**/
+EFI_STATUS
+EFIAPI
+PiSmmCoreMemoryAllocationLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ SMM_CORE_PRIVATE_DATA *SmmCorePrivate;
+
+ SmmCorePrivate = (SMM_CORE_PRIVATE_DATA *)ImageHandle;
+ //
+ // Initialize memory service using free SMRAM
+ //
+ SmmInitializeMemoryServices (SmmCorePrivate->SmramRangeCount, SmmCorePrivate->SmramRanges);
+ return EFI_SUCCESS;
+}
|