summaryrefslogtreecommitdiffstats
path: root/src/include/nic.h
Commit message (Collapse)AuthorAgeFilesLines
* [legacy] Allocate legacy driver .bss-like segments at probe timeMichael Brown2025-06-241-7/+20
| | | | | | | | | | | | | Some legacy drivers use large static allocations for transmit and receive buffers. To avoid bloating the .bss segment, we currently implement these as a single common symbol named "_shared_bss" (which is permissible since only one legacy driver may be active at any one time). Switch to dynamic allocation of these .bss-like segments, to avoid the requirement for using common symbols. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legacy] Rename the global legacy NIC to "legacy_nic"Michael Brown2025-06-241-3/+5
| | | | | | | | | | | | We currently have contexts in which the local variable "nic" is a pointer to the global variable also called "nic". This complicates the creation of macros. Rename the global variable to "legacy_nic" to reduce pollution of the global namespace and to allow for the creation of macros referring to fields within this global variable. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove unsafe disable function wrapper from legacy NIC driversMichael Brown2025-04-271-2/+1Star
| | | | | | | | | | | | | The legacy NIC drivers do not consistently take a second parameter in their disable function. We currently use an unsafe function wrapper that declares no parameters, and rely on the ABI allowing a second parameter to be silently ignored if not expected by the caller. As of GCC 15, this hack results in an incompatible pointer type warning. Fix by removing the hack, and instead updating all relevant legacy NIC drivers to take an unused second parameter in their disable function. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legacy] Fix building with GCC 6Michael Brown2016-05-041-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix the REQUIRE_SYMBOL mechanismMichael Brown2015-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | At some point in the past few years, binutils became more aggressive at removing unused symbols. To function as a symbol requirement, a relocation record must now be in a section marked with @progbits and must not be in a section which gets discarded during the link (either via --gc-sections or via /DISCARD/). Update REQUIRE_SYMBOL() to generate relocation records meeting these criteria. To minimise the impact upon the final binary size, we use existing symbols (specified via the REQUIRING_SYMBOL() macro) as the relocation targets where possible. We use R_386_NONE or R_X86_64_NONE relocation types to prevent any actual unwanted relocation taking place. Where no suitable symbol exists for REQUIRING_SYMBOL() (such as in config.c), the macro PROVIDE_REQUIRING_SYMBOL() can be used to generate a one-byte-long symbol to act as the relocation target. If there are versions of binutils for which this approach fails, then the fallback will probably involve killing off REQUEST_SYMBOL(), redefining REQUIRE_SYMBOL() to use the current definition of REQUEST_SYMBOL(), and postprocessing the linked ELF file with something along the lines of "nm -u | wc -l" to check that there are no undefined symbols remaining. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Include full licence text for all GPL2_OR_LATER filesMichael Brown2015-02-261-3/+13
| | | | | | | | Add the standard warranty disclaimer and Free Software Foundation address paragraphs to the licence text where these are not currently present. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Make driver PCI ID a property of the PCI deviceMichael Brown2011-02-171-4/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-6/+6
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [legacy] Remove long-obsolete old dhcp.h fileMichael Brown2009-05-181-2/+0Star
|
* [legacy] Add missing #include <gpxe/io.h>Michael Brown2008-10-121-0/+1
|
* Kill off the now-obsolete *_fill_nic() functions.Michael Brown2007-12-151-31/+0Star
|
* Include errno.h in the few drivers which use it, rather than in nic.hMichael Brown2007-07-241-1/+0Star
|
* Updated ISAPnP, EISA, MCA and ISA buses to current device model.Michael Brown2007-03-101-26/+231
| | | | | | | ISA 3c509 is currently non-functional, although the EISA (3c509-eisa) and MCA (3c529) variants should build OK. None of this code is yet tested.
* Added a very quick and dirty compatibility layer, to allowMichael Brown2006-06-051-27/+37
| | | | not-yet-updated drivers to at least function.
* Created a bus/device API that allows for the ROM prefix to specify anMichael Brown2005-04-211-28/+24Star
| | | | | initial device, and will also allow for e.g. a device menu to be presented to the user.
* Fix type of dummy_irq()Michael Brown2005-04-131-1/+1
|
* Add mbps and duplex to struct nic, since some drivers (e.g. rtl8139)Michael Brown2005-04-131-0/+7
| | | | can fill them in.
* Add dummy_connect and dummy_irqMichael Brown2005-04-121-0/+2
|
* Cope with nic.h being included before (or without) dev.hMichael Brown2005-04-121-4/+3Star
|
* Include dev.h, since several drivers just include nic.hMichael Brown2005-04-121-0/+3
|
* Tie into new boot device framework.Michael Brown2005-04-121-17/+50
|
* Initial revisionMichael Brown2005-03-081-0/+49