diff options
| author | Michael Brown | 2011-02-23 18:52:13 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-03-03 03:40:11 +0100 |
| commit | d157e249f3bf816c7d69441686fb548632693104 (patch) | |
| tree | 9de22d776799a2d7586f315be1e92906d51ae31e /src/include | |
| parent | [bofm] Add support for BOFM under EFI (diff) | |
| download | ipxe-d157e249f3bf816c7d69441686fb548632693104.tar.gz ipxe-d157e249f3bf816c7d69441686fb548632693104.tar.xz ipxe-d157e249f3bf816c7d69441686fb548632693104.zip | |
[bofm] Allow garbage collection of BOFM code in non-BOFM builds
Most builds will not have BOFM enabled. In these builds, allow all
BOFM code (including BOFM-only code within the individual drivers) to
be garbage-collected at link time in order to save space in the final
binary.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/bofm.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/ipxe/bofm.h b/src/include/ipxe/bofm.h index cc57e1e6d..1da47f651 100644 --- a/src/include/ipxe/bofm.h +++ b/src/include/ipxe/bofm.h @@ -13,6 +13,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <stdint.h> #include <ipxe/list.h> #include <ipxe/pci.h> +#include <config/sideband.h> /** 'IBM ' signature * @@ -316,8 +317,16 @@ struct bofm_operations { /** BOFM driver table */ #define BOFM_DRIVERS __table ( struct pci_driver, "bofm_drivers" ) -/** Declare a BOFM driver */ +/** Declare a BOFM driver + * + * In the common case of non-BOFM-enabled builds, allow any BOFM code + * to be garbage-collected at link time to save space. + */ +#ifdef CONFIG_BOFM #define __bofm_driver __table_entry ( BOFM_DRIVERS, 01 ) +#else +#define __bofm_driver +#endif /** * Initialise BOFM device |
