From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 B54C820954B95 for ; Fri, 16 Mar 2018 06:38:36 -0700 (PDT) Received: by mail-io0-x243.google.com with SMTP id d21so12713408ioc.5 for ; Fri, 16 Mar 2018 06:45:01 -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=2yVW9zWDrXUiKN0u4QTNOgJrk37zfNERQkkBMtjOScQ=; b=RzLJ2gAPLFXhfD3OYJbaatYenBqKrcViLIXzI0QZrLx3uyGNMN8ckrtfcP6Sgy9dyO 7YafmIyWn5Dd71FytXY+J20z7kc0FY6PFwTe2v+YI14BnU6YFdo00avwuwRwAVpbcRDd JbNslewZh+wP7zgChk/OfV/k2hal5AF//hOyA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2yVW9zWDrXUiKN0u4QTNOgJrk37zfNERQkkBMtjOScQ=; b=P02smOeK0G2vqrOppn5S1tAoKps9sFT/Yb8Ybpb6TisX4OVTUYFGzhHATy3gg22niz C8+261s21E6rIS/YQ5mmSsp++o3Z8moefMIFi0U07wrTGA1mZ2fKZChvyoFePTNb0ZmW cRMktkFmXmZhen3bRn83YHF2PpCb99HZRRL1BJtqAxO77GO6zZqNhfAn9VCEbt4pKJXo HP4u1+1bz5TPIRlGtux6hFDNC7OdUgnH8eZk8XKxM7abaend6pzkMgG1kJrh/Aghih4X AowBlUT1+ilo9RE1TEoynsXzAbEli//5xnWtmdL8uClWItb1C5T3IXZKBGZPelw1D/MC uaEw== X-Gm-Message-State: AElRT7EYAnluZwGqdmwvpPUL0ibVik5JqkNXfajhHws7VqK6t1pa1XB+ fQ1GipcIblqvLOVQagB1D2IijpWG3YFKan1u9Rb6cQ== X-Google-Smtp-Source: AG47ELuLZ4FWFX7CBh/Dh5CQC5pw4Bj418xseEubybe4/ApL8zTy4PD+ZlOVWjc5FhI6TZ/ch7vWS3EtzaPp3+Vy6co= X-Received: by 10.107.213.72 with SMTP id x8mr2044915ioc.60.1521207901012; Fri, 16 Mar 2018 06:45:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Fri, 16 Mar 2018 06:45:00 -0700 (PDT) In-Reply-To: <4ebe3836-3e6c-2801-89aa-2a2b15d57541@redhat.com> References: <20180315190258.6580-1-lersek@redhat.com> <20180315190258.6580-2-lersek@redhat.com> <4ebe3836-3e6c-2801-89aa-2a2b15d57541@redhat.com> From: Ard Biesheuvel Date: Fri, 16 Mar 2018 13:45:00 +0000 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Xiang Zheng 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:38:37 -0000 Content-Type: text/plain; charset="UTF-8" On 16 March 2018 at 13:40, Laszlo Ersek wrote: > 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 see. But in this case, I think it is rather obvious that when you move something back to where it was moved away from earlier, you have to justify why the original reason for moving it no longer applies, or is overruled by something more important. > 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. > I looked at those commit logs but it wasn't obvious to me. > 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 for clearing that up.