From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DCD801A1DE9 for ; Tue, 13 Sep 2016 07:49:49 -0700 (PDT) Received: by mail-it0-x232.google.com with SMTP id 15so8292391ita.1 for ; Tue, 13 Sep 2016 07:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UwFo2IaRh2ZSo7eQkDiZU6dd6cqJg+MLdS3Wz0AyY9U=; b=as/21qOMcSOe7RnkcTzIy+8XypCShJlPhmY/qV+pdVbX4PnXkW5bg9Y/RITI2c1tah /uLgD6NWmnlpxtrGr5qMdDjFl6rP8jL8f0BmHtCIX5dS6g8rBFpyLIH9Y4YOlQLXKBpY 3xYrDIiAy7FfzbscEcsz1coW2GNRTTNXb57qU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UwFo2IaRh2ZSo7eQkDiZU6dd6cqJg+MLdS3Wz0AyY9U=; b=XIp8x8Poo/J36qQhak9PyzhXrqojwIA1MwAQWwa+FnCacs5hNiOmBBP3W1LQjEZR7X ZGLsTT3Pjvahogda+iyLq5+4G9qYQ0W6LSubybd+862lfQ9bDcNvgQDKhMwtKS4Bhhox 7rHOy7TTm3Z4TNlYosoCHqgrwwE0zqlFUSqZBPi9bYWmmsNLTVldR5ySnOJxKAw/GnkY +2V/KUg4eRzNlPf24Rbu78Nyo2pP/eX7VcOH5hlSJ/yVYPnLX3wYN21P15J7VYKnmSLa 0tvaEuaUPBbchZymeV7EJc4m5bV7pUuWUTuz8sL8urV55rCCwONG1kvKsXOLg0V3YgCR +KOQ== X-Gm-Message-State: AE9vXwOfC1WRdOtkr9IMmMSGJBXs226u/LtJdApiBvXfoch1H0Ry5cyMp5FOQ8Dm+xvTeOzlI5L56dH/2UTJlfN7 X-Received: by 10.107.175.133 with SMTP id p5mr2085111ioo.80.1473778188957; Tue, 13 Sep 2016 07:49:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Tue, 13 Sep 2016 07:49:48 -0700 (PDT) In-Reply-To: <1473429644-13480-5-git-send-email-ard.biesheuvel@linaro.org> References: <1473429644-13480-1-git-send-email-ard.biesheuvel@linaro.org> <1473429644-13480-5-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Tue, 13 Sep 2016 15:49:48 +0100 Message-ID: To: edk2-devel-01 , "Gao, Liming" , Leif Lindholm , "Kinney, Michael D" Cc: Ard Biesheuvel Subject: Re: [PATCH v5 4/4] MdePkg/BaseMemoryLibOptDxe ARM|AARCH64: disallow use in SEC & PEI phases 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: Tue, 13 Sep 2016 14:49:50 -0000 Content-Type: text/plain; charset=UTF-8 Liming: do you have any comments on this patch? On 9 September 2016 at 15:00, Ard Biesheuvel wrote: > The new accelerated ARM and AARCH64 implementations take advantage of > features that are only available when the MMU and Dcache are on. So > restrict the use of this library to the DXE phase or later. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf b/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf > index 64d11b09ef06..5ddc0cbc2d77 100644 > --- a/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf > +++ b/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf > @@ -116,6 +116,15 @@ [Sources.X64] > X64/CopyMem.S > X64/IsZeroBuffer.nasm > > +[Defines.ARM, Defines.AARCH64] > + # > + # The ARM implementations of this library may perform unaligned accesses, and > + # may use DC ZVA instructions that are only allowed when the MMU and D-cache > + # are on. Since SEC, PEI_CORE and PEIM modules may execute with the MMU off, > + # omit them from the supported module types list for this library. > + # > + LIBRARY_CLASS = BaseMemoryLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_DRIVER UEFI_APPLICATION > + > [Sources.ARM] > Arm/ScanMem.S |GCC > Arm/SetMem.S |GCC > -- > 2.7.4 >