summaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-09-28 06:00:39 +0000
committerWarner Losh <imp@FreeBSD.org>2020-09-28 06:00:39 +0000
commitd53ed7359028caa01cbf60a819abd0e0b0da7a57 (patch)
treef79cb417be5d98503c2abe8c6135208ac6da09b2 /stand
parent5e8221100a2db96e41eb23ae692b22e2124db3c6 (diff)
downloadsrc-test-d53ed7359028caa01cbf60a819abd0e0b0da7a57.tar.gz
src-test-d53ed7359028caa01cbf60a819abd0e0b0da7a57.zip
Fix video on PCI heuristic
The video on PCI heuristic was broken. It was supposed to infer a video device when the last element of the path was a PCI DEVICE PATH node. However, the last node in the device path is an END node, so this heuristic never fired. This leads, among other things, to bhyve only producing output in the serial connection once we leave the boot loader. This restores the dual headed boot on bhyve + UEFI (as we did in 11.2), but will favor serial in the absence of other config which may be a change from 11.2. MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D26572
Notes
Notes: svn path=/head/; revision=366216
Diffstat (limited to 'stand')
-rw-r--r--stand/efi/loader/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 06e517ba76d1e..d0d09ebd6a752 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -739,6 +739,10 @@ parse_uefi_con_out(void)
ep = buf + sz;
node = (EFI_DEVICE_PATH *)buf;
while ((char *)node < ep) {
+ if (IsDevicePathEndType(node)) {
+ if (pci_pending && vid_seen == 0)
+ vid_seen = ++seen;
+ }
pci_pending = false;
if (DevicePathType(node) == ACPI_DEVICE_PATH &&
(DevicePathSubType(node) == ACPI_DP ||
@@ -772,8 +776,6 @@ parse_uefi_con_out(void)
}
node = NextDevicePathNode(node);
}
- if (pci_pending && vid_seen == 0)
- vid_seen = ++seen;
/*
* Truth table for RB_MULTIPLE | RB_SERIAL