summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
Commit message (Collapse)AuthorAgeFilesLines
...
* [pci] Standardise debug message formatMichael Brown2010-11-241-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [script] Allow "exit" to exit a scriptMichael Brown2010-11-221-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [gdb] Use generic option-parsing libraryMichael Brown2010-11-221-0/+1
| | | | | | Total saving: 42 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Use generic option-parsing libraryMichael Brown2010-11-221-0/+1
| | | | | | Total saving: 111 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ifmgmt] Use generic option-parsing libraryMichael Brown2010-11-221-0/+1
| | | | | | Total cost: 66 bytes Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use generic option-parsing libraryMichael Brown2010-11-211-0/+1
| | | | | | Total cost: 75 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Add generic option-parsing libraryMichael Brown2010-11-212-0/+128
| | | | | | | | | | | | | | | | Command implementations tend to include a substantial amount of common boilerplate code revolving around the parsing of command-line options and arguments. This increases the size cost of each command. Introduce an option-parsing library that abstracts out the common operations involved in command implementations. This enables the size of each individual command to be reduced, and also enhances consistency between commands. Total size of the library is 704 bytes, to be amortised across all command implementations. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Add support for IEEE 802.1Q VLANsMichael Brown2010-11-205-5/+75
| | | | | Originally-implemented-by: michael-dev@fami-braun.de Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow per-device receive queue processing to be frozenMichael Brown2010-11-201-2/+37
| | | | | | | | | | | | | | Several use cases (e.g. the UNDI API and the EFI SNP API) require access to the raw network device receive queue, and so currently use manual calls to netdev_poll() on a specific network device in order to prevent received packets from being processed by the network stack. As an alternative, provide a flag that allows receive queue processing to be frozen on a per-device basis. When receive queue processing is frozen, packets will be enqueued as normal, but will not be automatically dequeued and passed up the network stack. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Remove obsolete constantsMichael Brown2010-11-191-4/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Use MAX_LL_NET_HEADER_LEN instead of defining our own MAX_HDR_LENMichael Brown2010-11-191-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [udp] Remove obsolete constantsMichael Brown2010-11-191-3/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [udp] Use MAX_LL_NET_HEADER_LEN instead of defining our own UDP_MAX_HLENMichael Brown2010-11-191-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add MAX_NET_HEADER_LEN and MAX_LL_NET_HEADER_LENMichael Brown2010-11-191-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Add support for Fibre Channel name server lookupsMichael Brown2010-11-083-0/+225
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Support Fibre Channel ECHOMichael Brown2010-11-081-22/+15Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [refcnt] Check reference validity on each use of ref_get() and ref_put()Michael Brown2010-11-081-3/+35
| | | | | | | | Check that the reference count is valid (i.e. non-negative) on each call to ref_get() and ref_put(), using an assert() at the point of use. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list_first_entry()Michael Brown2010-11-081-0/+13
| | | | | | | | | There are several points in the iPXE codebase where list_for_each_entry() is (ab)used to extract only the first entry from a list. Add a macro list_first_entry() to make this code easier to read. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Extend list-manipulation assertions to all list-handling functionsMichael Brown2010-11-081-82/+92
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Introduce "skip-san-boot" optionDave Hansen2010-10-221-2/+10
| | | | | | | | | | | | | For some install-to-SAN scenarios, the OS needs to be able to reboot to reread the partition table. On this second boot attempt, the SAN disk will not be empty and so iPXE will attempt to boot from it, rather than falling back to the OS' installation media. Work around this problem by introducing the "skip-san-boot" option, similar in spirit to "keep-san". Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [scsi] Wait for a successful TEST UNIT READY commandMichael Brown2010-10-191-0/+12
| | | | | | | | | | | | | Some SCSI targets (observed with an EMC CLARiiON Fibre Channel target) will not respond to commands correctly until a TEST UNIT READY has been issued. In particular, a READ CAPACITY (10) command will return with a success status, but no capacity data. Fix by issuing a TEST UNIT READY command automatically, and delaying further SCSI commands until the TEST UNIT READY has succeeded. Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Ensure ISID is consistent within an iSCSI sessionMichael Brown2010-10-181-0/+6
| | | | | | | | | | | | | | | | Commit 5f4ab0d ("[iscsi] Randomise a portion of the ISID to force new session instantiation") introduced a regression by randomising the ISID on each call to iscsi_start_login(), which may be called more than once per connection, rather than on each call to iscsi_open_connection(), which is guaranteed to be called only once per connection. This is incorrect behaviour that causes our connection to be rejected by some iSCSI targets (observed with a COMSTAR target under OpenSolaris). Fix by generating the ISID in iscsi_open_connection(), and storing the randomised ISID as part of the session state. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Use port WWN rather than node WWN as the primary Fibre Channel nameMichael Brown2010-10-151-4/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcoe] Add support for the FCoE Initialization Protocol (FIP)Michael Brown2010-10-072-0/+463
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Include port IDs in metadata for received Fibre Channel framesMichael Brown2010-10-071-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Pass both link-layer addresses in net_tx() and net_rx()Michael Brown2010-10-072-5/+9
| | | | | | | | | FCoE requires the use of fabric-provided MAC addresses, which breaks the assumption that the net device's MAC address is implicitly the source address for net_tx() and the (unicast) destination address for net_rx(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Include the SRP login rejection reason in the error numberMichael Brown2010-09-221-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Add infrastructure to support EDD version 4.0Michael Brown2010-09-223-0/+200
| | | | | | | | | | | | | | | | | | | | | | Support the extensions mandated by EDD 4.0, including: o the ability to specify a flat physical address in a disk address packet, o the ability to specify a sector count greater than 127 in a disk address packet, o support for all functions within the Fixed Disk Access and EDD Support subsets, o the ability to describe a device using EDD Device Path Information. This implementation is based on draft revision 3 of the EDD 4.0 specification, with reference to the EDD 3.0 specification. It is possible that this implementation may need to change in order to conform to the final published EDD 4.0 specification. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add the notion of an Ethernet queue pair typeMichael Brown2010-09-211-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Allow FLOGI response to be sent to newly-assigned peer port IDMichael Brown2010-09-212-0/+23
| | | | | | | The response to a received FLOGI should probably be sent to the peer port ID assigned as a result of the WWPN comparison. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [lotest] Add loopback testing commandsMichael Brown2010-09-211-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add node GUID as distinct from the first port GUIDMichael Brown2010-09-161-3/+4
| | | | | | | | | | | | | | | iPXE currently uses the first port's port GUID as the node GUID, rather than using the (possibly distinct) real node GUID. This can confuse opensm during the handover to a loaded OS: it thinks the port already belongs to a different node and so discards our port information with a warning message about duplicate ports. Everything is picked up correctly on the second subnet sweep, after opensm has established that the "old" node no longer exists, but this can delay link-up unnecessarily by several seconds. Fix by using the real node GUID. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Always call ib_link_state_changed() in ib_smc_update()Michael Brown2010-09-161-2/+2
| | | | | | | | | | | | | | ib_smc_update() potentially updates the Infiniband port state, and so should almost always be followed by a call to ib_link_state_changed(). The one exception is the call made to ib_smc_update() before the device is registered. Fix by removing explicit calls to ib_link_state_changed() from drivers using ib_smc_update(), including a call to ib_link_state_changed() within ib_smc_update(), and creating a separate ib_smc_init() for use prior to device registration. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [scsi] Include sense key within error number reported to userMichael Brown2010-09-151-0/+3
| | | | | | | The sense key gives a first idea of what the problem might be, and so is potentially useful in diagnosing problems in a non-debug build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Match GID/GUID terminology as used in the IBAMichael Brown2010-09-158-52/+65
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcoe] Add support for Fibre Channel over EthernetMichael Brown2010-09-154-0/+80
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcp] Add support for the Fibre Channel ProtocolMichael Brown2010-09-152-0/+167
| | | | | | | The Fibre Channel Protocol provides a mechanism for transporting SCSI commands via a Fibre Channel fabric. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Add support for Fibre Channel devicesMichael Brown2010-09-154-0/+909
| | | | | | | Add support for Fibre Channel ports, peers, and upper-layer protocols, and for Fibre Channel extended link services. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [block] Replace gPXE block-device API with an iPXE asynchronous interfaceMichael Brown2010-09-1413-409/+681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block device interface used in gPXE predates the invention of even the old gPXE data-transfer interface, let alone the current iPXE generic asynchronous interface mechanism. Bring this old code up to date, with the following benefits: o Block device commands can be cancelled by the requestor. The INT 13 layer uses this to provide a global timeout on all INT 13 calls, with the result that an unexpected passive failure mode (such as an iSCSI target ACKing the request but never sending a response) will lead to a timeout that gets reported back to the INT 13 user, rather than simply freezing the system. o INT 13,00 (reset drive) is now able to reset the underlying block device. INT 13 users, such as DOS, that use INT 13,00 as a method for error recovery now have a chance of recovering. o All block device commands are tagged, with a numerical tag that will show up in debugging output and in packet captures; this will allow easier interpretation of bug reports that include both sources of information. o The extremely ugly hacks used to generate the boot firmware tables have been eradicated and replaced with a generic acpi_describe() method (exploiting the ability of iPXE interfaces to pass through methods to an underlying interface). The ACPI tables are now built in a shared data block within .bss16, rather than each requiring dedicated space in .data16. o The architecture-independent concept of a SAN device has been exposed to the iPXE core through the sanboot API, which provides calls to hook, unhook, boot, and describe SAN devices. This allows for much more flexible usage patterns (such as hooking an empty SAN device and then running an OS installer via TFTP). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Respond to CM disconnection requestsMichael Brown2010-09-121-0/+30
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Add TIMER_INIT() for initialising static timersMichael Brown2010-09-061-0/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Add xfer_window_changed()Michael Brown2010-09-051-0/+4
| | | | | | | | | xfer_window_changed() can be used to notify peers that an interface is now ready to accept data. This can potentially be used to eliminate the need for wasteful processes that simply poll xfer_window() until the window becomes non-zero. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Add the concept of an Infiniband upper-layer driverMichael Brown2010-09-052-4/+41
| | | | | | | | | Replace the explicit calls from the Infiniband core to the IPoIB layer with the general concept of an Infiniband upper-layer driver (analogous to a PCI driver) which can create arbitrary devices on top of Infiniband devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add the concept of a network upper-layer driverMichael Brown2010-09-051-21/+39
| | | | | | | Add the concept of a network upper-layer driver, which can create arbitrary devices on top of network devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tables] Add for_each_table_entry_continue() and _continue_reverse()Michael Brown2010-09-051-0/+58
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Hold reference while timer is running and during expiry callbackMichael Brown2010-09-031-1/+10
| | | | | | | | | Guarantee that a retry timer cannot go out of scope while the timer is running, and provide a guarantee to the expiry callback that the timer will remain in scope during the entire callback (similar to the guarantee provided to interface methods). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Add process_running()Michael Brown2010-09-031-0/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tables] Add table_index()Michael Brown2010-09-031-0/+25
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Add xfer_deliver_raw_meta()Michael Brown2010-09-031-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Generalise metadata "whence" field to "flags" fieldMichael Brown2010-09-031-25/+16Star
| | | | | | | | | | | | | iPXE has never supported SEEK_END; the usage of "whence" offers only the options of SEEK_SET and SEEK_CUR and so is effectively a boolean flag. Further flags will be required to support additional metadata required by the Fibre Channel network model, so repurpose the "whence" field as a generic "flags" field. xfer_seek() has always been used with SEEK_SET, so remove the "whence" field altogether from its argument list. Signed-off-by: Michael Brown <mcb30@ipxe.org>