From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web11.6253.1575590872623161952 for ; Thu, 05 Dec 2019 16:07:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BT93P10G; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575590871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qpfTmhz6ppnJhCtG7ES26F5aKwpt5l17YQovLfPO4co=; b=BT93P10G1BGRDyDfgqMX7woR27Si5xy8TChhjqo3Y/tCNa6jIetUYsbMGCc7obhol/im4j b34FFQpftRAA+RIE+D2pyrTYlTix2WybmjgIFzYDGUsI1Tn+swe6gONaDgFkClzqmn6iED NhjLogatYEMuqd/CgL5RCvXRt7L9Ihg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-loLDtuj6OniVanVe3WY-9Q-1; Thu, 05 Dec 2019 19:07:48 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E3A211005512; Fri, 6 Dec 2019 00:07:46 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 849C060135; Fri, 6 Dec 2019 00:07:45 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v1 1/1] ArmPkg: Dispatch deferred images after EndOfDxe From: "Laszlo Ersek" To: devel@edk2.groups.io, ard.biesheuvel@linaro.org, Sami Mujawar Cc: Leif Lindholm , Matteo Carlini , nd References: <20190501140146.33224-1-sami.mujawar@arm.com> <2689eabf-b2a4-466b-d0cc-f8786e7a35ee@redhat.com> Message-ID: <9889532a-d188-e784-3b00-22631bcdc625@redhat.com> Date: Fri, 6 Dec 2019 01:07:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2689eabf-b2a4-466b-d0cc-f8786e7a35ee@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: loLDtuj6OniVanVe3WY-9Q-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12/06/19 00:54, Laszlo Ersek wrote: > The proper solution would be the following (if I may suggest an idea): > > (1) fix ArmVirtPkg: hoist the following part: > >> // >> // Locate the PCI root bridges and make the PCI bus driver connect each, >> // non-recursively. This will produce a number of child handles with PciIo on >> // them. >> // >> FilterAndProcess (&gEfiPciRootBridgeIoProtocolGuid, NULL, Connect); >> >> // >> // Signal the ACPI platform driver that it can download QEMU ACPI tables. >> // >> EfiEventGroupSignal (&gRootBridgesConnectedEventGroupGuid); > > above this part: > >> // >> // Signal EndOfDxe PI Event >> // >> EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid); >> >> // >> // Dispatch deferred images after EndOfDxe event. >> // >> EfiBootManagerDispatchDeferredImages (); > > This will make: > > - ArmVirtPkg match the order employed in OvmfPkg, > > - EfiBootManagerDispatchDeferredImages() pick up PCI option ROMs, > > - run the ACPI platform driver *before* EndOfDxe; but that's just fine. > (In fact, in OvmfPkg, that's *required*. See the FACS note there.) > > > (2) Port the same fix to ArmPkg: namely move > >> // >> // Locate the PCI root bridges and make the PCI bus driver connect each, >> // non-recursively. This will produce a number of child handles with PciIo on >> // them. >> // >> FilterAndProcess (&gEfiPciRootBridgeIoProtocolGuid, NULL, Connect); > > just above > >> // >> // Signal EndOfDxe PI Event >> // >> EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid); > > > (3) In a separate patch, call EfiBootManagerDispatchDeferredImages() > just after the *new* location of signaling EndOfDxe. So given that commit 0f9395d7c5cc6ae2beaa2d87008fe158d04a8069 exists now, I think we should do (1), and then port it whole-sale to ArmPkg. ... Unless of course my analysis is wrong. :) Thanks Laszlo