summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorLi, Zhihao <zhihao.li@intel.com>2024-03-01 15:11:47 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-03-01 18:47:27 +0000
commit371940932d2931493cdf25076ce84c117679eb88 (patch)
tree3c8942a82ec62806fc5276789f027601eb9ae67d /MdeModulePkg
parent2ec8f0c6407f062441b205b900038933865c7b3c (diff)
downloadedk2-371940932d2931493cdf25076ce84c117679eb88.tar.gz
edk2-371940932d2931493cdf25076ce84c117679eb88.tar.bz2
edk2-371940932d2931493cdf25076ce84c117679eb88.zip
MdeModulePkg/Core/Pei: Improve the copy performance
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4697 EvacuateTempRam function will copy the temporary memory context to the rebased pages and the raw pages. Migrations of rebased PEIMs is from cache to memory, while raw PEIMs is from memory to memory. So the migrations of raw PEIMs is slower than rebased PEIMs. Experimental data indicates that changing the source address of raw PEIMs migration will improve performance by 35%. Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Zhihao Li <zhihao.li@intel.com> Message-Id: <20240301071147.519-1-zhihao.li@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 4cd8c843cd..ca37bde482 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -1,7 +1,7 @@
/** @file
EFI PEI Core dispatch services
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -1305,7 +1305,7 @@ EvacuateTempRam (
);
ASSERT_EFI_ERROR (Status);
RawDataFvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FvHeaderAddress;
- CopyMem (RawDataFvHeader, MigratedFvHeader, (UINTN)FvHeader->FvLength);
+ CopyMem (RawDataFvHeader, FvHeader, (UINTN)FvHeader->FvLength);
MigratedFvInfo.FvDataBase = (UINT32)(UINTN)RawDataFvHeader;
}