Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P629
Command-Line Input
Active
Public
Actions
Authored by
jhb
on Feb 9 2024, 1:37 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F76628438: Command-Line Input
Feb 9 2024, 1:37 AM
2024-02-09 01:37:52 (UTC+0)
Subscribers
None
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 6ef04251cd74..a6035b8cd8b6 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -436,6 +436,20 @@ pcib_alloc_window(struct pcib_softc *sc, struct pcib_window *w, int type,
if (!pcib_is_window_open(w))
return;
+ /*
+ * Assume that a window where both the base and limit read as
+ * zero is not really open, or at least not assigned a valid
+ * range by the firmware. If devices behind this bridge have
+ * firmware-assigned resources in this range then the window
+ * will be allocated on-demand.
+ */
+ if (w->base == 0 && w->limit == (pci_addr_t)1 << w->step) {
+ w->base = max_address;
+ w->limit = 0;
+ pcib_write_windows(sc, w->mask);
+ return;
+ }
+
if (w->base > max_address || w->limit > max_address) {
device_printf(sc->dev,
"initial %s window has too many bits, ignoring\n", w->name);
Event Timeline
jhb
created this paste.
Feb 9 2024, 1:37 AM
2024-02-09 01:37:52 (UTC+0)
Log In to Comment