From 7b3eb3c86a94f71676f650164705ddf8460936fd Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 18 Mar 2026 15:12:11 +0000 Subject: [PATCH] [undi] Drag in PCI-specific configuration 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 --- src/arch/x86/drivers/net/undinet.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/arch/x86/drivers/net/undinet.c b/src/arch/x86/drivers/net/undinet.c index f4f78432a..6fdc568f3 100644 --- a/src/arch/x86/drivers/net/undinet.c +++ b/src/arch/x86/drivers/net/undinet.c @@ -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 );