From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E8CB1A2060 for ; Thu, 22 Sep 2016 22:01:41 -0700 (PDT) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D15E33F212; Fri, 23 Sep 2016 05:01:40 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-4.phx2.redhat.com [10.3.116.4]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8N51dRN031762; Fri, 23 Sep 2016 01:01:39 -0400 To: Ard Biesheuvel , edk2-devel@ml01.01.org, liming.gao@intel.com References: <1474534469-18442-1-git-send-email-ard.biesheuvel@linaro.org> Cc: leif.lindholm@linaro.org From: Laszlo Ersek Message-ID: Date: Fri, 23 Sep 2016 07:01:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1474534469-18442-1-git-send-email-ard.biesheuvel@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 23 Sep 2016 05:01:40 +0000 (UTC) Subject: Re: [PATCH] MdePkg/BaseMemoryLibOptDxe ARM AARCH64: fix thinko in SetMem## X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 05:01:41 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 09/22/16 10:54, Ard Biesheuvel wrote: > The new InternalMemSetMem##() implementations for ARM and AARCH64 in > BaseMemoryLibOptDxe fail to take into account that the 'length' argument > is not in bytes, but in number of items to be copied. So multiply by the > item size before proceeding. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > MdePkg/Library/BaseMemoryLibOptDxe/AArch64/SetMem.S | 3 ++ > MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S | 32 +++++++++++++------- > MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.asm | 28 ++++++++++++----- > 3 files changed, 44 insertions(+), 19 deletions(-) I tested it with the AARCH64 build of ArmVirtQemu. It works fine, thanks. Reported-by: Laszlo Ersek Tested-by: Laszlo Ersek Cheers! Laszlo