summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg
diff options
context:
space:
mode:
authorSatya Yarlagadda <satya.p.yarlagadda@intel.com>2016-07-13 21:02:46 +0800
committerLiming Gao <liming.gao@intel.com>2016-07-18 13:17:23 +0800
commit35126af96ce8dcb184aba5caf87f476bf20790dc (patch)
treece22bc24624452c705c2d713c0523e2f2d715128 /IntelFsp2Pkg
parente7a5a238c32f62441ed5a156525b9db96f0892da (diff)
downloadedk2-35126af96ce8dcb184aba5caf87f476bf20790dc.tar.gz
edk2-35126af96ce8dcb184aba5caf87f476bf20790dc.tar.bz2
edk2-35126af96ce8dcb184aba5caf87f476bf20790dc.zip
IntelFsp2Pkg BaseFspPlatformLib: Remove Boot Loader tempram Migration
In FSP2.0, Boot loader should migrate its temp ram before calling the tempramexit API to tear down the tempram. so, we don't need the function to migrate the BL TempRam in the IntelFsp2Pkg. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'IntelFsp2Pkg')
-rw-r--r--IntelFsp2Pkg/Include/Library/FspPlatformLib.h9
-rw-r--r--IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c67
2 files changed, 0 insertions, 76 deletions
diff --git a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
index 9247bd5221..61e77bdda1 100644
--- a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
+++ b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
@@ -38,15 +38,6 @@ FspGetSystemMemorySize (
IN OUT UINT64 *HighMemoryLength
);
-/**
- Migrate BootLoader data before destroying CAR.
-
-**/
-VOID
-EFIAPI
-FspMigrateTemporaryMemory (
- VOID
- );
/**
Set a new stack frame for the continuation function.
diff --git a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
index d6684f3b06..edb8d67223 100644
--- a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
+++ b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
@@ -120,70 +120,3 @@ FspGetSystemMemorySize (
Hob.Raw = GET_NEXT_HOB (Hob);
}
}
-
-/**
- Migrate BootLoader data before destroying CAR.
-
-**/
-VOID
-EFIAPI
-FspMigrateTemporaryMemory (
- VOID
- )
-{
- UINT32 BootLoaderTempRamStart;
- UINT32 BootLoaderTempRamEnd;
- UINT32 BootLoaderTempRamSize;
- UINT32 OffsetGap;
- UINT32 FspParamPtr;
- VOID *BootLoaderTempRamHob;
- UINT32 MemoryInitUpdPtr;
- VOID *PlatformDataPtr;
-
- //
- // Get the temporary memory range used by the BootLoader
- //
- BootLoaderTempRamStart = GetFspCarBase ();
- BootLoaderTempRamSize = GetFspCarSize () - PcdGet32(PcdFspTemporaryRamSize);
-
- BootLoaderTempRamEnd = BootLoaderTempRamStart + BootLoaderTempRamSize;
-
- //
- // Build a Boot Loader Temporary Memory GUID HOB
- //
- BootLoaderTempRamHob = (VOID *)AllocatePages (EFI_SIZE_TO_PAGES (BootLoaderTempRamSize));
- ASSERT(BootLoaderTempRamHob != NULL);
-
- DEBUG ((DEBUG_INFO, "FSP_BOOT_LOADER_TEMPORARY_MEMORY_HOB\n"));
- DEBUG ((DEBUG_INFO, "FspBootLoaderTemporaryMemory Base : %x\n", BootLoaderTempRamStart));
- DEBUG ((DEBUG_INFO, "FspBootLoaderTemporaryMemory Size : %x\n", BootLoaderTempRamSize));
-
- CopyMem (BootLoaderTempRamHob, (VOID *)BootLoaderTempRamStart, BootLoaderTempRamSize);
- OffsetGap = (UINT32)BootLoaderTempRamHob - BootLoaderTempRamStart;
-
- //
- // Fix the FspMemoryinit Parameter Pointers to the new location.
- //
- FspParamPtr = GetFspApiParameter ();
- if ((VOID *)FspParamPtr != NULL && FspParamPtr >= BootLoaderTempRamStart &&
- FspParamPtr < BootLoaderTempRamEnd) {
- SetFspApiParameter (FspParamPtr + OffsetGap);
- }
-
- //
- // Update UPD pointer in FSP Global Data
- //
- MemoryInitUpdPtr = (UINT32)((UINT32 *)GetFspMemoryInitUpdDataPointer ());
- if (MemoryInitUpdPtr >= BootLoaderTempRamStart && MemoryInitUpdPtr < BootLoaderTempRamEnd) {
- SetFspMemoryInitUpdDataPointer ((VOID *)(MemoryInitUpdPtr + OffsetGap));
- }
-
- //
- // Update Platform data pointer in FSP Global Data
- //
- PlatformDataPtr = GetFspPlatformDataPointer ();
- if (((UINT32)PlatformDataPtr >= BootLoaderTempRamStart) &&
- ((UINT32)PlatformDataPtr < BootLoaderTempRamEnd)) {
- SetFspPlatformDataPointer ((UINT8 *)PlatformDataPtr + OffsetGap);
- }
-}