summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
diff options
context:
space:
mode:
authorVitaly Cheptsov <cheptsov@ispras.ru>2020-12-02 02:26:51 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-12-04 02:59:38 +0000
commit31e8a47b62a4f3dc45d8f9bbf3529a188e867a87 (patch)
tree38570155c683032a5592a5fa347ca66d62a1c45a /MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
parent6af76adbbfccd31f4f8753fb0ddbbd9f4372f572 (diff)
downloadedk2-31e8a47b62a4f3dc45d8f9bbf3529a188e867a87.zip
edk2-31e8a47b62a4f3dc45d8f9bbf3529a188e867a87.tar.gz
edk2-31e8a47b62a4f3dc45d8f9bbf3529a188e867a87.tar.bz2
MdeModulePkg: Fix undefined reference to memcpy with XCODE5
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3098 XCODE5 toolchain in NOOPT mode generates memcpy when trying to copy PEI_CORE_FV_HANDLE structure. This breaks OVMF compilation with XCODE5. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Vitaly Cheptsov <cheptsov@ispras.ru> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c')
-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 b9a279e..3369585 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -1256,13 +1256,13 @@ EvacuateTempRam (
}
for (FvIndex = 0; FvIndex < Private->FvCount; FvIndex++) {
if (Private->Fv[FvIndex].FvHandle == PeiCoreFvHandle.FvHandle) {
- PeiCoreFvHandle = Private->Fv[FvIndex];
+ CopyMem (&PeiCoreFvHandle, &Private->Fv[FvIndex], sizeof (PEI_CORE_FV_HANDLE));
break;
}
}
Status = EFI_SUCCESS;
- ConvertPeiCorePpiPointers (Private, PeiCoreFvHandle);
+ ConvertPeiCorePpiPointers (Private, &PeiCoreFvHandle);
for (FvIndex = 0; FvIndex < Private->FvCount; FvIndex++) {
FvHeader = Private->Fv[FvIndex].FvHeader;