From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web12.42770.1584284389086298846 for ; Sun, 15 Mar 2020 07:59:49 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0343f545cb=abner.chang@hpe.com) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02FEsOpI032659; Sun, 15 Mar 2020 14:59:47 GMT Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0a-002e3701.pphosted.com with ESMTP id 2yrqbb7ynp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 15 Mar 2020 14:59:47 +0000 Received: from G9W8454.americas.hpqcorp.net (g9w8454.houston.hp.com [16.216.161.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5008.houston.hpe.com (Postfix) with ESMTPS id EAD6960; Sun, 15 Mar 2020 14:59:45 +0000 (UTC) Received: from G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) by G9W8454.americas.hpqcorp.net (2002:10d8:a104::10d8:a104) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 15 Mar 2020 14:59:45 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (15.241.52.10) by G4W9120.americas.hpqcorp.net (16.210.21.15) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 15 Mar 2020 14:59:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KBimhclprjXyPvW0DFydxIL2dsiogx+Y9BHXFWDAdvB0N+ryXV0RgfUOckVr28sQz1dbBdHT8XLKAyvRr/VaKidbOiMg60qA7jcxLsks1GqiLmLnCypwO5jMXprL+DVjf8Q+3dmYYl41nG/4lwBCCxKJdMExtMqfw6Yza44DhrER+/U/zav9jN5rw0QNSykxlnGmK1NlyV2nuweHuoQtYLEGPIzh0TDTDvBGt+u22j/ZTED24xKKaMx+XOl5vI6ZpY3KsGdvdWfRdB0QhMKSZiNur36Z+PoBEg0GC3/eklvc77eMozDaBC+Hwg7PM7zPmUy9JWcFCJQKfJ0ozOk5gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HQNjtoNSfaUSeDA2ZJ6vMsXC06zDmM7xOfBySihJZ3M=; b=AuYkfjkYiIlPxtx6c77O3BFXnjuZPVBL96D+P7DXkDZwx8h1gqXWjTSZhwapKC7RkTaL2l4e1QrbtzOnVe9sKC9TrhJn2R2MW29k2FaftBdp+nI3pzrUwPFCGBWIewuov7gL5KFU7cuFVAZMkTK0S371Ry9CeEIQsoYuT0Hv126c9Gz2aZb5fXUzbGWsFxCqFYdkNGKmhkFKuj7SL/+4yDJ0d1spFqf+GdUeoRI1w3tSgLeGvihNZWdoGP+v2peQN0FU5GUc5lrV1SdCDkMB67PEZPsebsh142yhaHcvCCP3a+cXOLN+1qAV9Mm3fcM0oZCyJDogXytrW2UA1bV3Cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from TU4PR8401MB0429.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:770a::14) by TU4PR8401MB0704.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:770d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.22; Sun, 15 Mar 2020 14:59:43 +0000 Received: from TU4PR8401MB0429.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b0b5:c067:8f22:a402]) by TU4PR8401MB0429.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b0b5:c067:8f22:a402%6]) with mapi id 15.20.2814.021; Sun, 15 Mar 2020 14:59:43 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "leif@nuviainc.com" CC: "lersek@redhat.com" , "Schaefer, Daniel (DualStudy)" , "Chen, Gilbert" , "afish@apple.com" , "michael.d.kinney@intel.com" , "pete@akeo.ie" , Ard Biesheuvel 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: AQHV8H3y8ONhWG4a20uPbA3rSjizB6hE2H8AgAAppACAAArJAIAAAoZwgAAJJQCAAFNDAIAAGxuAgABut4CAAGipgIADcVDA Date: Sun, 15 Mar 2020 14:59:42 +0000 Message-ID: References: <20200302103238.25726-1-daniel.schaefer@hpe.com> <20200302103238.25726-4-daniel.schaefer@hpe.com> <20200312105528.GC23627@bivouac.eciton.net> <539c8673-786c-9c58-98cc-ab470b345740@hpe.com> <20200312140304.GF23627@bivouac.eciton.net> <20200312144452.GI23627@bivouac.eciton.net> <20200312211953.GL23627@bivouac.eciton.net> <20200313101045.GN23627@bivouac.eciton.net> In-Reply-To: <20200313101045.GN23627@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.242.247.131] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: df8cc763-00bd-4a7c-3c97-08d7c8f17e8e x-ms-traffictypediagnostic: TU4PR8401MB0704: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1443; x-forefront-prvs: 0343AC1D30 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(39860400002)(376002)(396003)(346002)(199004)(8676002)(81166006)(33656002)(66574012)(8936002)(9686003)(2906002)(55016002)(4326008)(53546011)(6506007)(186003)(26005)(81156014)(7696005)(76116006)(478600001)(66946007)(66476007)(66446008)(64756008)(86362001)(66556008)(110136005)(54906003)(52536014)(71200400001)(19627235002)(5660300002)(316002)(966005);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR8401MB0704;H:TU4PR8401MB0429.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rz/TO7Y6O/ze9YQhxiuKBU6rLGfijBnwRTPk+4r6xGE+Yfv8GOjz6vqQj7VqZO/eZ95AMvxaykI0GsBhIyXV38TApRnpDn/Y11bZ4G+C+ms1Ct7Ig0y/OmyiG4PvuevWrg0KtOoo4twQMU/P43mAB7PkZ+l9fMKLALWMc9oaxu42c8pAA4X6xM1BftexZ9dBz2pMvnSjVW5OgbFMST79HLyzSWbyjzd//ZbVt+NtzD0drWFeLSdLmow9GypCvFwvZxTWaXE9PiJG5ucbfbRd2BTam9p6UDLdL+efUP9mfsac3ZoCWg0igiE5Hq+AWBZcxqhOeWOg9VMdlA1R27Z4U+KFhv1aM5Gmz7IZ0VcrK/FV4h0Qm3WKA+b61e7fg3ac6GgCfzZgK7mqYarsjy5P9KHSz2U9r9ZyDNinqKbAOzPaWTehPvHmvZFivh/tKadeWqZNO7+jAquEXbyJ+5QlxABwyrByA5Kla+7nwAGwP5NU5MVhakZSxeW2XrI7+BNwXIb7WY32VZZWftN+epAz3g== x-ms-exchange-antispam-messagedata: BAFwtgPplmb7LF5TdEAyFBuinH+MkdzRkAgSUdzMSm6TsIAYhaj5qErLeqkMDnjAGVvji9z2OFXIPjBQ5NIJ44WZ1S7ju8h8TeJYAzZQHGarUC/q0+8UUQlGs+utTfyekBBD9PWfT9fSpMkNxpKH7Q== X-MS-Exchange-CrossTenant-Network-Message-Id: df8cc763-00bd-4a7c-3c97-08d7c8f17e8e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2020 14:59:43.0719 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bNcpxwS0d1CkUCLrzB2Q/ZXuygANhXK/LWJXUeXc+sxc9PLmvItS7B1y1y6gFDf+YcvaUirKlcP3dxlNCDiptw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR8401MB0704 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-15_01:2020-03-12,2020-03-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 impostorscore=0 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003150083 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Leif Lindholm > Sent: Friday, March 13, 2020 6:11 PM > To: Chang, Abner (HPS SW/FW Technologist) > Cc: devel@edk2.groups.io; lersek@redhat.com; Schaefer, Daniel (DualStudy= ) > ; Chen, Gilbert ; > afish@apple.com; michael.d.kinney@intel.com; pete@akeo.ie; Ard > Biesheuvel > Subject: Re: [edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem > instead of GUID assignment >=20 > On Fri, Mar 13, 2020 at 04:08:12 +0000, Chang, Abner (HPS SW/FW > Technologist) wrote: > > > -----Original Message----- > > > From: Leif Lindholm [mailto:leif@nuviainc.com] > > > Sent: Friday, March 13, 2020 5:20 AM > > > To: devel@edk2.groups.io; lersek@redhat.com > > > Cc: Chang, Abner (HPS SW/FW Technologist) ; > > > Schaefer, Daniel (DualStudy) ; Chen, > > > Gilbert ; afish@apple.com; > > > michael.d.kinney@intel.com; pete@akeo.ie; Ard Biesheuvel > > > > > > Subject: Re: [edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use > CopyMem > > > instead of GUID assignment > > > > The current NULL instance of CompilerIntrinsicsLib is applied on every > > modules, this means it's not flexible for overwriting memcpy (for > > example) with the faster algorithm (such as SSEx instructions) for the > > specific module in the same DSC, right? That says we can't assign a > > special version of memcpy to just one particular module. >=20 > All true. > But ... are you planning to contribute lots of code that performs large > (certainly larger than GUIDs in order for effects to be > noticeable) struct assignments on critical paths? A huge block of memory copy or set indeed a requirement of HPE server BIOS= for graphic mode BIOS setup without VGA H/W accelerator and others such as= memory test, but it is x86 system though. . Respond to your feedback below= , that should be fine if new code just use CopyMem for the high performance= memory operations. RISC-V has no problem with using intrinsic memcpy, ther= e is no strong performance requirements for memory operations so far...mayb= e later.=20 >=20 > Even if that is the case, as commented on the other fork of this > thread: if we add the -O3 jiggle, GCC will automatically insert what it > considers to be the optimal implementation for the specified target when > encountering the na=EFve implementation. >=20 > > > On Thu, Mar 12, 2020 at 20:42:52 +0100, Laszlo Ersek wrote: > > > > On 03/12/20 15:44, Leif Lindholm wrote: > > > > > And what would you propose we do the next time the RISC-V > > > > > toolchain generates a memcpy call based on some other completely > > > > > valid change to core code? > > > > > > > > We could choose to enable the intrinsics library for RISC-V at tha= t point. > > > > and I would like to see the flexibility of overwriting memory library > > functions for particular modules. There is no special algorithm of > > memory manipulation so far in RISC-V spec, however, the working group > > of Vector extension does propose the new instruction sets. >=20 > Use of CompilerIntrinsicsLib has no effect on explicit CopyMem & co > operations, only on memcpy/memset generated by the compiler. Which will > generate build failures if not handled. >=20 > / > Leif >=20 >=20