X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFsp2Pkg%2FLibrary%2FBaseFspPlatformLib%2FFspPlatformMemory.c;h=edb8d67223824fbcee1b43bf4225ade643a7772e;hp=d6684f3b06a240cece8687698a8352f540845ce5;hb=35126af96ce8dcb184aba5caf87f476bf20790dc;hpb=cf1d454983fb4fd3b580a92bd242310467a5eaef 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); - } -}