From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (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 317652041B266 for ; Tue, 24 Apr 2018 02:52:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B606B406F96F; Tue, 24 Apr 2018 09:52:01 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-175.rdu2.redhat.com [10.10.120.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26B8F2024CA1; Tue, 24 Apr 2018 09:52:00 +0000 (UTC) To: Ard Biesheuvel , Julien Grall Cc: "edk2-devel@lists.01.org" References: <20180424005048.26291-1-lersek@redhat.com> From: Laszlo Ersek Message-ID: Date: Tue, 24 Apr 2018 11:52:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 24 Apr 2018 09:52:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 24 Apr 2018 09:52:01 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH] ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2018 09:52:03 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/24/18 08:16, Ard Biesheuvel wrote: > On 24 April 2018 at 02:50, Laszlo Ersek wrote: >> Port OvmfPkg commit 5c3481b0b611e to ArmVirtPkg. Some explanation should >> be in order (because 5c3481b0b611e doesn't offer any): >> >> - The UefiDevicePathLibDevicePathProtocol instance uses the Device Path >> Utilities Protocol, produced by DevicePathDxe, for formatting and >> parsing the textual device path representation. This allows for a >> lighter weight lib instance that gets linked into several DXE modules. >> In comparison, the more standalone UefiDevicePathLib instance includes >> the formatting and parsing routines in every client module. >> >> - The DXE core needs DevicePathLib before it dispatches DevicePathDxe, so >> it needs to stick with the standalone instance. >> >> - DevicePathDxe itself also needs the standalone instance, for >> implementing the protocol. >> >> - The DXE-phase PCD driver, "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf", >> depends on DevicePathLib via UefiLib and DxeServicesLib at the least; so >> with this update, it inherits a dependency on the protocol. In reverse, >> DevicePathDxe depends on the PCD Protocol, via PcdLib. The cycle is >> broken by using BasePcdLibNull in DevicePathDxe. That restricts it to >> FixedAtBuild, Patch, and FeatureFlag PCDs, but that's fine. >> >> Example space savings (using ArmVirtQemu and the GCC5 toolchain): >> - NOOPT: 187KB in FVMAIN, 12KB in FVMAIN_COMPACT >> - DEBUG: 147KB in FVMAIN, 20KB in FVMAIN_COMPACT >> - RELEASE: 123KB in FVMAIN, 17KB in FVMAIN_COMPACT >> >> Cc: Ard Biesheuvel >> Cc: Julien Grall >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=940 >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Laszlo Ersek > > Reviewed-by: Ard Biesheuvel Thanks, Ard! Julien, can you please fetch the patch: >> Notes: >> Repo: https://github.com/lersek/edk2.git >> Branch: armvirt_devpathlib and regression-test it on Xen? I'd prefer to push the patch with your T-b. Thanks! Laszlo