]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[undi] Drag in PCI-specific configuration 1657/head
authorMichael Brown <mcb30@ipxe.org>
Wed, 18 Mar 2026 15:12:11 +0000 (15:12 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 18 Mar 2026 15:12:11 +0000 (15:12 +0000)
The undionly.kpxe binary does not need the full PCI bus support.
However, the overwhelming majority of UNDI devices are PCI-based and
we already end up dragging in PCI configuration space support in order
to be able to test for devices with broken interrupts.

Dragging in the PCI configuration allows the PCI settings mechanism to
also be present, which is often useful for end users.  The total cost
is around 200 bytes in the final binary, which is acceptable for a
generally very useful feature.

Users wanting to minimise the binary size can choose to explicitly
disable PCI_SETTINGS via config/settings.h.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/drivers/net/undinet.c

index f4f78432a0a3923d7106c13f69bd36e640884c2e..6fdc568f3a03eaed8a6e59170f2bfc0bb88d56a6 100644 (file)
@@ -1126,3 +1126,21 @@ void undinet_remove ( struct undi_device *undi ) {
 
        DBGC ( undinic, "UNDINIC %p removed\n", undinic );
 }
+
+/* Drag in objects via undinet_probe() */
+REQUIRING_SYMBOL ( undinet_probe );
+
+/* Drag in PCI configuration
+ *
+ * We don't need the full PCI bus support.  However, the overwhelming
+ * majority of UNDI devices are PCI-based and we already end up
+ * dragging in PCI configuration space support in order to be able to
+ * test for devices with broken interrupts.
+ *
+ * Dragging in the PCI configuration allows the PCI settings mechanism
+ * to also be present, which is often useful for end users.  The total
+ * cost is around 200 bytes in the final binary, which is acceptable
+ * for a generally very useful feature.  Users wanting to minimise the
+ * binary size can choose to explicitly disable PCI_SETTINGS.
+ */
+REQUIRE_OBJECT ( config_pci );