From e91c0ca4b6447092d3874bc907753ced79ac6af0 Mon Sep 17 00:00:00 2001 From: vasilito Date: Thu, 23 Jul 2026 20:14:43 +0900 Subject: [PATCH] pcid/base bump + redox-driver-pci: 64-byte header reads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - base bump (b0e76065): pcid PCI 3.0 fallback no longer panics on extended config reads (returns 0xFFFFFFFF, drops writes). - redox-driver-pci PciBus reads only the 64-byte standard header it consumes (vendor/device/class/subsystem), instead of the whole 4 KiB config file per device per poll cycle — safe on MCFG-less machines and cheaper everywhere. --- .../drivers/redox-driver-pci/source/src/bus.rs | 16 ++++++++++++++-- local/sources/base | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/local/recipes/drivers/redox-driver-pci/source/src/bus.rs b/local/recipes/drivers/redox-driver-pci/source/src/bus.rs index 77b788fa66..ff3d184436 100644 --- a/local/recipes/drivers/redox-driver-pci/source/src/bus.rs +++ b/local/recipes/drivers/redox-driver-pci/source/src/bus.rs @@ -50,8 +50,20 @@ impl Bus for PciBus { } let config_path = path.join("config"); - let config_data = match fs::read(&config_path) { - Ok(d) => d, + // Read only the 64-byte standard header: everything PciBus + // consumes (vendor/device at 0x00, class block at 0x08-0x0B, + // subsystem IDs at 0x2C-0x2F) lives there, and larger reads + // cross into PCIe extended space which does not exist on + // MCFG-less (PCI 3.0 I/O-port fallback) machines. + let config_data = match std::fs::File::open(&config_path) { + Ok(file) => { + use std::io::Read; + let mut buf = Vec::new(); + match file.take(64).read_to_end(&mut buf) { + Ok(_) => buf, + Err(_) => continue, + } + } Err(_) => continue, }; diff --git a/local/sources/base b/local/sources/base index c72d4247a6..b0e760659c 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit c72d4247a66a764b0f06fe62d661ced415538ae2 +Subproject commit b0e760659c4c951381e8916dc64dca8a53af584f