From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web09.14140.1583156336199404916 for ; Mon, 02 Mar 2020 05:38:56 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2020 05:38:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,507,1574150400"; d="scan'208";a="233157558" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga008.jf.intel.com with ESMTP; 02 Mar 2020 05:38:55 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Mar 2020 05:38:55 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 2 Mar 2020 21:38:52 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Mon, 2 Mar 2020 21:38:52 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "daniel.schaefer@hpe.com" CC: Abner Chang , Gilbert Chen , Leif Lindholm , "Bi, Dandan" , "Dong, Eric" Subject: Re: [edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID assignment Thread-Topic: [edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID assignment Thread-Index: AQHV8H4LQg9Vu3hwc0a0jyaEjhm4vqg1SblA Date: Mon, 2 Mar 2020 13:38:52 +0000 Message-ID: <9aaacf548dd249a782e36f8be32d1ffb@intel.com> References: <20200302103238.25726-1-daniel.schaefer@hpe.com> <20200302103238.25726-4-daniel.schaefer@hpe.com> In-Reply-To: <20200302103238.25726-4-daniel.schaefer@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Daniel: I agree this fix. But, I don't meet with this failure with GCC on IA32/X= 64 arch. So, I don't fix it early. Reviewed-by: Liming Gao Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Daniel Sc= haefer > Sent: Monday, March 2, 2020 6:33 PM > To: devel@edk2.groups.io > Cc: Abner Chang ; Gilbert Chen ; Leif Lindholm ; Bi, Dandan > ; Dong, Eric > Subject: [edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead o= f GUID assignment >=20 > GCC translates a simple assignment to memcpy, which EDKII doesn't provid= e. > See: https://www.mail-archive.com/edk2-devel@lists.01.org/msg11928.html >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2547 >=20 > Signed-off-by: Daniel Schaefer > Cc: Abner Chang > Cc: Gilbert Chen > Cc: Leif Lindholm > Cc: Dandan Bi > Cc: Eric Dong > --- >=20 > Notes: > v2: > - Use CopyMem instead of CopyGuid [Dandan] >=20 > MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > index 5cc527679a78..0540e6fa8a44 100644 > --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > @@ -619,7 +619,7 @@ CreateDeviceManagerForm( > TokenHelp =3D HiiSetString (HiiHandle, 0, String, NULL); >=20 >=20 > FreePool (String); >=20 >=20 >=20 >=20 >=20 > - FormSetGuid =3D ((EFI_IFR_FORM_SET *)Ptr)->Guid; >=20 >=20 > + CopyMem (&FormSetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeo= f (EFI_GUID)); >=20 >=20 >=20 >=20 >=20 > // >=20 >=20 > // Network device process >=20 >=20 > -- > 2.25.0 >=20 >=20 >=20