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 04E6F2034D8C8 for ; Fri, 16 Mar 2018 06:34:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7D2C640201A3; Fri, 16 Mar 2018 13:40:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-123-79.rdu2.redhat.com [10.10.123.79]) by smtp.corp.redhat.com (Postfix) with ESMTP id 352892166BAE; Fri, 16 Mar 2018 13:40:29 +0000 (UTC) To: Ard Biesheuvel Cc: edk2-devel-01 , Xiang Zheng References: <20180315190258.6580-1-lersek@redhat.com> <20180315190258.6580-2-lersek@redhat.com> From: Laszlo Ersek Message-ID: <4ebe3836-3e6c-2801-89aa-2a2b15d57541@redhat.com> Date: Fri, 16 Mar 2018 14:40:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 16 Mar 2018 13:40:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 16 Mar 2018 13:40:30 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH 1/5] ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 13:34:07 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 03/16/18 10:58, Ard Biesheuvel wrote: > On 15 March 2018 at 19:02, Laszlo Ersek wrote: >> Move the TryRunningQemuKernel() call back to its original place. > > When was it moved and why? See, I'm at a loss about the detail you expect in commit messages. :) I had spent 10 minutes on wording this commit message. Near the end of my struggle, I had exactly one sentence on each of those three commits that I listed at the bottom (23d04b58e27b, a78c4836ea0b, 158990b941e4). Those three sentences were going to give the answer to your question. I still worried you might file them under "personal journey" or "stream of consciousness", and I cut them; I only left the three commit hashes at the end as pointers. So, the executive summary is: "TryRunningQemuKernel() was moved in a78c4836ea0b, because the guest kernel depended on ACPI tables, which depended on our ACPI platform driver, which at the time depended on PciBusDxe itself reporting 'enumeration complete', which at the time depended on our BdsLibConnectAll() call". The somewhat expanded answer is, from scratch: (1) in commit 23d04b58e27b, we introduced TryRunningQemuKernel() in the right spot (for boot performance), between PlatformBdsConnectConsole() and BdsLibConnectAll(); (2) in commit a78c4836ea0b, we moved TryRunningQemuKernel() after BdsLibConnectAll(): the direct-booted kernel needed ACPI tables (reflecting PCI resources correctly), and at that time, we only connected the root bridges to PciBusDxe as part of BdsLibConnectAll() (which signaled the ACPI platform driver via "gEfiPciEnumerationCompleteProtocolGuid"); (3) in commit 60dc18a17c516 and (more importantly) 158990b941e4, connecting the root bridges and cueing the ACPI platform driver were finally separated from BdsLibConnectAll(), but we didn't realize we could move TryRunningQemuKernel() back above BdsLibConnectAll(). So, after 158990b941e4, we can do it now. Thanks, Laszlo