git: 653c5d3b5f9f - main - bhyve: fix bootorder for PCI slots >= 10
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Nov 2026 17:07:35 UTC
The branch main has been updated by novel:
URL: https://cgit.FreeBSD.org/src/commit/?id=653c5d3b5f9f3f157c043c0acdcfc2ba85718016
commit 653c5d3b5f9f3f157c043c0acdcfc2ba85718016
Author: Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2026-11-24 17:47:52 +0000
Commit: Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-11-26 17:03:16 +0000
bhyve: fix bootorder for PCI slots >= 10
Currently, bhyve writes slots as decimals. Firmware such as EDK2
interprets them as hexadecimals, so slot 10 becomes 16, breaking
the configured boot order.
Reviewed by: markj
Fixes: 6632a0a4e3ab ("bhyve: add helper to create a bootorder")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61997
---
usr.sbin/bhyve/pci_emul.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c
index d9a0ef0ce3ee..2216d2c3f750 100644
--- a/usr.sbin/bhyve/pci_emul.c
+++ b/usr.sbin/bhyve/pci_emul.c
@@ -1527,7 +1527,7 @@ init_bootorder(void)
fp = open_memstream(&bootorder, &bootorder_len);
TAILQ_FOREACH(device, &boot_devices, boot_device_chain) {
- fprintf(fp, "/pci@i0cf8/pci@%d,%d\n",
+ fprintf(fp, "/pci@i0cf8/pci@%x,%x\n",
device->pdi->pi_slot, device->pdi->pi_func);
}
fclose(fp);