From nobody Wed May 1 23:18:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68145+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68145+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=ispras.ru ARC-Seal: i=1; a=rsa-sha256; t=1606847271; cv=none; d=zohomail.com; s=zohoarc; b=edGnX/7r3d3ZrmyJ/wFOIyiBzMGhP9eRnckJDA3B3YG/Qp9gdTtdycSaiylbY4DE0iFjrIouiSe2TwQyWtbQL4X/g1YVV5n/3JLeUoFuFtbBS6qIo8Ddqc4raETvuFH+AQA/Jy9O94sHSPVh5dhiyYxVYTzrz+LXdcqxu1+CG8A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606847271; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=tgbr0KcldbHLYfPThiQQJ6gcI+mZanyYMUvXpEfPXPU=; b=MRXKdyz9GlnZn/rB8eGJ8A7HRDbgeUz1oGy+oz6jVCuL1Z/BjoijpQnqjIxL9QrugBBbVTNEnRVYY0VjjccvpUUda1arAW6YUXsYB7bnPEoQiLeXsVKBrqykvlPxQS6r8/aKWpRNoHmuLRKWnDfvQ0zQw87fKiqNdjvtGU7PrWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68145+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16068472714931006.4407190685002; Tue, 1 Dec 2020 10:27:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id qRvFYY1788612xd18glUW2OU; Tue, 01 Dec 2020 10:27:51 -0800 X-Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by mx.groups.io with SMTP id smtpd.web08.93.1606847262790986683 for ; Tue, 01 Dec 2020 10:27:43 -0800 X-Received: from localhost.localdomain (unknown [77.232.9.83]) by mail.ispras.ru (Postfix) with ESMTPSA id 7631940D4004; Tue, 1 Dec 2020 18:27:39 +0000 (UTC) From: "Vitaly Cheptsov" To: devel@edk2.groups.io Cc: Vitaly Cheptsov , Jian J Wang , Hao A Wu , Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix undefined reference to memcpy with XCODE5 Date: Tue, 1 Dec 2020 21:26:51 +0300 Message-Id: <20201201182651.32218-1-cheptsov@ispras.ru> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,cheptsov@ispras.ru X-Gm-Message-State: 2Vtj8ECzisWP8VNUofjvtoTDx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606847271; bh=2esYbMcrbrQHnuh4VlyRJ9Deiyo4MRc4EELMf4K/kVM=; h=Cc:Date:From:Reply-To:Subject:To; b=McRq6uBxTHmYwbF0DxCANhYZVq/Npvy8Wb9smSK0VcHka7cTw8gLXfZsX4cE5b9ihKF P/Xe31A075eKOramJafqZnhv3EpueaBPza8app6icV33huzMwNOPCIdQ6k6epfCrzCEPE xlkTZaqEmU/zClKEz8ReeVMKX1z/b+fIluA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3098 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 CC: Hao A Wu CC: Jordan Justen CC: Laszlo Ersek CC: Ard Biesheuvel Signed-off-by: Vitaly Cheptsov Reviewed-by: Liming Gao Reviewed-by: Michael D Kinney --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 4 ++-- MdeModulePkg/Core/Pei/PeiMain.h | 2 +- MdeModulePkg/Core/Pei/Ppi/Ppi.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/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 =3D 0; FvIndex < Private->FvCount; FvIndex++) { if (Private->Fv[FvIndex].FvHandle =3D=3D PeiCoreFvHandle.FvHandle) { - PeiCoreFvHandle =3D Private->Fv[FvIndex]; + CopyMem (&PeiCoreFvHandle, &Private->Fv[FvIndex], sizeof (PEI_CORE_F= V_HANDLE)); break; } } Status =3D EFI_SUCCESS; =20 - ConvertPeiCorePpiPointers (Private, PeiCoreFvHandle); + ConvertPeiCorePpiPointers (Private, &PeiCoreFvHandle); =20 for (FvIndex =3D 0; FvIndex < Private->FvCount; FvIndex++) { FvHeader =3D Private->Fv[FvIndex].FvHeader; diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMai= n.h index c27e8fc..daa48b4 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -542,7 +542,7 @@ ConvertPpiPointersFv ( VOID ConvertPeiCorePpiPointers ( IN PEI_CORE_INSTANCE *PrivateData, - PEI_CORE_FV_HANDLE CoreFvHandle + IN PEI_CORE_FV_HANDLE *CoreFvHandle ); =20 /** diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Pp= i.c index 541047d..0ad71d1 100644 --- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c +++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c @@ -1062,7 +1062,7 @@ ProcessPpiListFromSec ( VOID ConvertPeiCorePpiPointers ( IN PEI_CORE_INSTANCE *PrivateData, - PEI_CORE_FV_HANDLE CoreFvHandle + IN PEI_CORE_FV_HANDLE *CoreFvHandle ) { EFI_FV_FILE_INFO FileInfo; @@ -1079,16 +1079,16 @@ ConvertPeiCorePpiPointers ( // // Find the PEI Core in the BFV in temporary memory. // - Status =3D CoreFvHandle.FvPpi->FindFileByType ( - CoreFvHandle.FvPpi, + Status =3D CoreFvHandle->FvPpi->FindFileByType ( + CoreFvHandle->FvPpi, EFI_FV_FILETYPE_PEI_CORE, - CoreFvHandle.FvHandle, + CoreFvHandle->FvHandle, &PeiCoreFileHandle ); ASSERT_EFI_ERROR (Status); =20 if (!EFI_ERROR (Status)) { - Status =3D CoreFvHandle.FvPpi->GetFileInfo (CoreFvHandle.FvPpi, PeiCor= eFileHandle, &FileInfo); + Status =3D CoreFvHandle->FvPpi->GetFileInfo (CoreFvHandle->FvPpi, PeiC= oreFileHandle, &FileInfo); ASSERT_EFI_ERROR (Status); =20 Status =3D PeiGetPe32Data (PeiCoreFileHandle, &PeiCoreImageBase); --=20 2.24.3 (Apple Git-128) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68145): https://edk2.groups.io/g/devel/message/68145 Mute This Topic: https://groups.io/mt/78640848/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-