Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160804229
D57694.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
821 B
Referenced Files
None
Subscribers
None
D57694.diff
View Options
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -463,6 +463,20 @@
if (size == 0)
continue; /* empty range element */
+ /* Truncate large memory windows to avoid system RAM overlap */
+ uint32_t r_type = FLAG_TYPE(sc->ranges[tuple].flags);
+ if (r_type == FLAG_TYPE_MEM || r_type == FLAG_TYPE_PMEM) {
+ uint64_t max_addr = 0x480000000ULL; /* 18 GB */
+ if (phys_base + size > max_addr) {
+ if (phys_base < max_addr) {
+ size = max_addr - phys_base;
+ sc->ranges[tuple].size = size;
+ device_printf(dev, "Truncating range %d to size %#jx to avoid RAM overlap\n",
+ tuple, (uintmax_t)size);
+ }
+ }
+ }
+
if (start < pci_base || end >= pci_base + size)
continue;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 29, 1:37 AM (10 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34136562
Default Alt Text
D57694.diff (821 B)
Attached To
Mode
D57694: pci: Truncate MMIO windows exceeding 18GB to avoid conflicts
Attached
Detach File
Event Timeline
Log In to Comment