From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=lY0CxKSG; spf=none, err=permanent DNS error (domain: merlin.srs.infradead.org, ip: 205.233.59.134, mailfrom: batv+4a5a9edcbe01b6acb2b7+5785+infradead.org+dwmw2@merlin.srs.infradead.org) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by groups.io with SMTP; Wed, 26 Jun 2019 04:37:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: 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=i5vPt7NEwvKxNNEhehMQnUONDwK3Vm7FRuajMB2pEmY=; b=lY0CxKSGIWqLJNQqG6VyJ+ZKi GUsMLXd98R4FOb/a48Vp2Ah1f6qVEq/s+q9VJsmyiz/2WF5uU5ZRznZx685ObyEAsG6SO8yxB8hku DRaoq7u4TdR5jNe6U5u/RciA1VRRDE34R3g74xzbJUzgyT8/U+HZ7zV3qhUAuhI6Kg9+p18mN4oad sYCCPHH8JJaiElIBBktRBLsW6AGbwggdKkQQieqQM1Njvn5Wc4QWOkQO1VdpJxq2YoV4JpKRl1z2H txkYVwcPbTWa9+l5H1wNg1BA2APk31oXF6gKG5SbPd71ytN/a+MR1A06sZO/V6wYWCFx6ADwF1EW6 wZD5XdbPA==; Received: from [2001:8b0:10b:1::425] (helo=i7.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hg6FD-0006U9-CE; Wed, 26 Jun 2019 11:37:43 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hg6FC-003RK7-JF; Wed, 26 Jun 2019 12:37:42 +0100 From: "David Woodhouse" To: devel@edk2.groups.io Cc: Laszlo Ersek Subject: [PATCH v3 0/4] OvmfPkg: CSM boot fixes Date: Wed, 26 Jun 2019 12:37:38 +0100 Message-Id: <20190626113742.819933-1-dwmw2@infradead.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Content-Transfer-Encoding: 8bit For v3, leaving out the cosmetic parts that touch code outside OvmfPkg. This series is now purely the correctness fixes within OvmfPkg which are required to make CSM boots work properly again. The first two patches allow NVMe and VirtIO disks to be used as Legacy boot targets, since nobody really uses IDE any more. The third avoids using QemuVideoDxe when we have CSM, as the INT 10h shim installed by QemuVideoDxe conflicts with a real legacy video BIOS being installed. Finally, avoid placing PCI BARs above 4GiB. Strictly speaking we only need this for PCI devices which might be natively supported by the CSM BIOS, like NVMe. Devices with an OpRom already get special-cased to stay below 4GiB. But an IncompatiblePciDeviceSupportProtocol implementation doesn't get to see the PCI device class; only the vendor/device IDs so we can't use it for that purpose to downgrade more selectively. Instead, just default to putting everything below 4GiB. David Woodhouse (4): OvmfPkg/LegacyBios: set NumberBbsEntries to the size of BbsTable OvmfPkg/LegacyBbs: Add boot entries for VirtIO and NVME devices OvmfPkg: Don't build in QemuVideoDxe when we have CSM OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled OvmfPkg/Csm/LegacyBiosDxe/LegacyBbs.c | 157 ++++++++++++++++++++++++- OvmfPkg/Csm/LegacyBiosDxe/LegacyBios.c | 7 +- OvmfPkg/OvmfPkgIa32.dsc | 2 + OvmfPkg/OvmfPkgIa32.fdf | 5 +- OvmfPkg/OvmfPkgIa32X64.dsc | 6 + OvmfPkg/OvmfPkgIa32X64.fdf | 5 +- OvmfPkg/OvmfPkgX64.dsc | 6 + OvmfPkg/OvmfPkgX64.fdf | 5 +- 8 files changed, 179 insertions(+), 14 deletions(-) -- 2.21.0