From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in6.apple.com (mail-out6.apple.com [17.151.62.28]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E4CC41A1DF7 for ; Fri, 12 Aug 2016 10:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1471022874; x=2334936474; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=l+ImW0tB2eph2ZDN/FoOs5xdgsHFpUGFgU0LD4ZivzE=; b=vc2/kPgvHtFbrP8AS2Lg2wyDGV2A9yiP8ZSzxprk37U6DfdW6e1j2s6CXMPbafdS 5jhSYjAGVFYrKQiAr27wHKQe4T/6PsHqBcIP8iGk+NV42FjfIZhn7kvwcMJfxDZQ kbXdIFH/eVnvnF/630SoSV8bQ4ttmHYaqzMevwpc5vH64CZs09kEwujt4OD+JtML b13EF3mP6X9woklhfnu9hkNV2RDHk0kEuzMnG2efxegZjX2B2GGJNjYOhO0n7FBQ uYfzGPZvwRxmgS0yuoanp1AY+lTvUVSUo25PZGzCzMMERYjtffFYdSK/JPuTa1ba QiR52X3VaoXmLL+Xmi5ErA==; Received: from relay5.apple.com (relay5.apple.com [17.128.113.88]) by mail-in6.apple.com (Apple Secure Mail Relay) with SMTP id 39.CE.07752.A170EA75; Fri, 12 Aug 2016 10:27:54 -0700 (PDT) X-AuditID: 11973e15-f798f6d000001e48-d3-57ae071a880a Received: from nwk-mmpp-sz11.apple.com (nwk-mmpp-sz11.apple.com [17.128.115.155]) by relay5.apple.com (Apple SCV relay) with SMTP id CF.A9.30701.A170EA75; Fri, 12 Aug 2016 10:27:54 -0700 (PDT) MIME-version: 1.0 Received: from [17.153.71.106] by nwk-mmpp-sz11.apple.com (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPSA id <0OBT007FB4IHT760@nwk-mmpp-sz11.apple.com>; Fri, 12 Aug 2016 10:27:54 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: <1471021908-3509-1-git-send-email-leif.lindholm@linaro.org> Date: Fri, 12 Aug 2016 10:27:52 -0700 Cc: edk2-devel , Feng Tian , Star Zeng , Ard Biesheuvel Message-id: <1533F1AE-CA83-4C22-A2B6-90CD5E9A6CBA@apple.com> References: <1471021908-3509-1-git-send-email-leif.lindholm@linaro.org> To: Leif Lindholm X-Mailer: Apple Mail (2.3112) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsUi2FAYoSvFvi7c4PQ3KYv/H3YzWuw5dJTZ YtJudotPu/ewWOzrtXZg9Vi85yWTx51re9g8umf/YwlgjuKySUnNySxLLdK3S+DKeLZ6OkvB euGKg8dOsTYwfubvYuTkkBAwkZgyfS0LhC0mceHeerYuRi4OIYG9jBIPZv1ihylasPYoC0Ti EKPEoyW/mUESvAKCEj8m3wNKcHAwC8hLHDwvCxJmFtCS+P6oFWyokMA7Ron1/6tAbGEBcYl3 ZzYxQ9h+EsenfGEDsdkElCVWzP8AtotTwENi/64JYHEWAVWJqdN/MoLsZRaYwSjx4n0vK8Re G4nbFw4zQSxwl5j4aCtYXERAR+L013/MEEfLSuzbsADsGwmBy2wSs35dZJvAKDILyd2zEO6e heTuBYzMqxiFchMzc3Qz88z0EgsKclL1kvNzNzGC4mK6negOxjOrrA4xCnAwKvHwcqxYEy7E mlhWXJl7iFGag0VJnFdCfG24kEB6YklqdmpqQWpRfFFpTmrxIUYmDk6pBsZ53+yq7JQ01BKC GY8a3Hqx3GqC+ZU/mht3yDrutvPawng7TV61MX63RvX+RRkieb/yP81Qjru3uC9pCTeHntw7 zdJ9M9X+Z8yZJ1CdrGi3a/vDOWuuv1nVPyus4+jx5VOmPn64ae/PVe+41x7+sujeokflS/9n 75YolJDwZrALaxWWeMlT8LpPiaU4I9FQi7moOBEAi64x82wCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRmVeSWpSXmKPExsUi2FA8W1eKfV24weOZ4hb/P+xmtNhz6Ciz xaTd7Bafdu9hsdjXa+3A6rF4z0smjzvX9rB5dM/+xxLAHMVlk5Kak1mWWqRvl8CV8Wz1dJaC 9cIVB4+dYm1g/MzfxcjJISFgIrFg7VEWCFtM4sK99WxdjFwcQgKHGCUeLfnNDJLgFRCU+DH5 HlARBwezgLzEwfOyIGFmAS2J749awXqFBN4xSqz/XwViCwuIS7w7s4kZwvaTOD7lCxuIzSag LLFi/gd2EJtTwENi/64JYHEWAVWJqdN/MoLsZRaYwSjx4n0vK8ReG4nbFw4zQSxwl5j4aCtY XERAR+L013/MEEfLSuzbsIBtAqPgLCSnzkI4dRaSUxcwMq9iFChKzUmsNNVLLCjISdVLzs/d xAgO48KIHYz/l1kdYhTgYFTi4eVYsSZciDWxrLgyFxgWHMxKIrwy/9aGC/GmJFZWpRblxxeV 5qQWH2JMBnpgIrOUaHI+MMbySuINTUwMTIyNzYyNzU3MSRNWEue1Wwy0VSA9sSQ1OzW1ILUI ZgsTB6dUA+PWNT+qs1UnfU/nDfRk+f9k0Ro+viUtHpIXIqcfmP3hpeHRRY2V5scsHpyYfiR0 Qsgsjz3G80+/19WpZ9/hxbGGTeJfVtmz+wZPv71cYH1B/LD/vslrnToTc0XEGtsXcS7iu7BL Qv1ia9ek1iOXGqrn7jfcV1O7VH1+kCL/m+ZX602viS97vGezEktxRqKhFnNRcSIAXGMu16cC AAA= Subject: Re: [RFC] MdeModulePkg: ARM/AARCH64 requirements added to .dsc 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, 12 Aug 2016 17:27:55 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Aug 12, 2016, at 10:11 AM, Leif Lindholm wrote: > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Leif Lindholm > --- > > This is not a proposed change, but rather a demonstration: > When trying to build HelloWorld standalone for ARM/AARCH64, > with a command line like > build -a AARCH64 -t GCC5 -p MdeModulePkg/MdeModulePkg.dsc \ > -m MdeModulePkg/Application/HelloWorld/HelloWorld.inf > this fails with > > /work/git/edk2/MdeModulePkg/MdeModulePkg.dsc(...): error 4000: Instance of library class [ArmMmuLib] is not found > in [/work/git/edk2/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf] [AARCH64] > consumed by module [/work/git/edk2/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf] > > Adding the below stanzas resolve the issue, but looking > into why other architectures have no issues with this, > I spot a lot of low-level MMU tweakery directly under > DxeIplPeim. > > Would this not be better handled through some standardised > mechanism? > Leif, The DXE IPL containing the paging code predated the edk2. On x86 the common boot flow is IA32 PEI and X64 DXE. To turn on X64 (long mode) paging must be enabled. So the paging code is here since this is the location than needs to transition to long mode. I'm guessing this code did not get turned into a library "back in the day" as it was the only place it was being used. Thanks, Andrew Fish > / > Leif > > MdeModulePkg/MdeModulePkg.dsc | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc > index 05120c7..e9c2866 100644 > --- a/MdeModulePkg/MdeModulePkg.dsc > +++ b/MdeModulePkg/MdeModulePkg.dsc > @@ -24,6 +24,14 @@ [Defines] > BUILD_TARGETS = DEBUG|RELEASE|NOOPT > SKUID_IDENTIFIER = DEFAULT > > +[LibraryClasses.ARM, LibraryClasses.AARCH64] > + ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf > +[LibraryClasses.ARM] > + ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf > + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf > +[LibraryClasses.AARCH64] > + ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf > + > [LibraryClasses] > # > # Entry point > -- > 2.1.4 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel