summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
* [uri] Add uri_has_path()Michael Brown2011-02-011-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Generalise expand_command() to expand_settings()Michael Brown2011-01-281-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Connect SAN disk during a filename boot, if applicableMichael Brown2011-01-273-3/+8
| | | | | | | | | | | | | | | | | | | For performing installations direct to a SAN target, it can be very useful to hook a SAN disk and then proceed to perform a filename boot. For example, the user may wish to hook the (empty) SAN installation disk and then boot into the OS installer via TFTP. This provides an alternative mechanism to using "keep-san" and relying on the BIOS to fall through to boot from the installation media, which is unreliable on many BIOSes. When a root-path is specified in addition to a boot filename, attempt to hook the root-path as a SAN disk before booting from the specified filename. Since the root-path may be used for non-SAN purposes (e.g. an NFS root mount point), ignore the root-path if it contains a URI scheme that we do not support. Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [init] Remove concept of "shutdown exit flags"Michael Brown2011-01-273-14/+36
| | | | | | | | Remove the concept of shutdown exit flags, and replace it with a counter used to keep track of exposed interfaces that require devices to remain active. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Expose xfer_uri_opener()Michael Brown2011-01-271-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow devices to indicate that interrupts are not supportedMichael Brown2011-01-251-0/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Auto-resize VPD fields used for non-volatile storageMichael Brown2011-01-192-8/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add ability to resize a VPD fieldMichael Brown2011-01-191-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Allow pci_vpd_init() return status to be ignoredMichael Brown2011-01-191-0/+11
| | | | | | | | Most xxx_init() functions are void functions with no failure cases. Allow pci_vpd_init() to be used in the same way. (Subsequent calls to pci_vpd_read() etc. will fail if pci_vpd_init() fails.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Allow resizing of non-volatile stored option blocksMichael Brown2011-01-192-1/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Remove the non-volatile options fragment listMichael Brown2011-01-111-18/+5Star
| | | | | | | | | Since its implementation several years ago, no driver has used a fragment list containing more than a single fragment. Simplify the NVO core and the drivers that use it by removing the whole concept of the fragment list, and using a simple (address,length) pair instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Allow use of custom reallocation functions for DHCP option blocksMichael Brown2011-01-111-4/+11
| | | | | | | | Allow functions other than realloc() to be used to reallocate DHCP option block data, and specify the reallocation function at the time of calling dhcpopt_init(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Rename length fields for DHCP optionsMichael Brown2011-01-102-6/+7
| | | | | | Rename "len" to "used_len" and "max_len" to "alloc_len". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Remove redundant length fields in struct dhcp_packetMichael Brown2011-01-101-4/+10
| | | | | | | | The max_len field is never used, and the len field is used only by dhcp_tx(). Remove these two fields, and perform the necessary trivial calculation in dhcp_tx() instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [igbvf] Add igbvf driverAlex Williamson2010-12-161-0/+1
| | | | | | | | | | | | Driver for Intel 82576 based virtual functions, based on Intel source code available at: http://sourceforge.net/projects/e1000 (igbvf-1.0.7) Based on initial port from Eric Keller <ekeller@princeton.edu>. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Use Ethernet-compatible chaddr, if possibleMichael Brown2010-12-151-2/+2
| | | | | | | | | | | | | | | For IPoIB, we currently use the hardware address (i.e. the eight-byte GUID) as the DHCP chaddr. This works, but some PXE servers (notably Altiris RDP) refuse to respond if the chaddr field is anything other than six bytes in length. We already have the notion of an Ethernet-compatible link-layer address, which is used in the iBFT (the design of which similarly fails to account for non-Ethernet link layers). Use this as the first preferred alternative to the actual link-layer address when constructing the DHCP chaddr field. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add fetch_ipv4_array_setting()Michael Brown2010-12-091-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [debug] Add DBG_MD5() and related macrosMichael Brown2010-12-091-0/+61
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fnrec] Enhance function recordingMichael Brown2010-12-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Enhance the information collected by the function recorder to include the call site and entry/exit counts. This allows fnrec.pl to produce a call tree such as: step (from core/getkey.c:46 = 0x17e90) { ref_increment (from core/process.c:93 = 0x73ec) { } net_step (from core/process.c:96 = 0x73f1) { net_poll (from net/netdevice.c:741 = 0xbce6) { netdev_poll (from net/netdevice.c:700 = 0xbc58) { } netdev_rx_dequeue (from net/netdevice.c:709 = 0xbc65) { } } } ref_decrement (from core/process.c:96 = 0x73f9) { } } Note that inlined functions are reported, confusingly, as extra calls to the *containing* function. Minimise this confusion by adding the attribute "no_instrument_function" to all functions declared as inline. (Static functions that have been inlined autonomously by gcc will still be problematic, but these are far fewer in number.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add FILE_LICENCE macro to some GPL-v2 filesShao Miller2010-12-041-0/+2
| | | | | | | | Changes were made to files where the licence text within the files themselves confirms that the files are GPL version 2. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Work around hardware stripping of VLAN tagsMichael Brown2010-12-011-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Expose vlan_find() to network card driversMichael Brown2010-12-011-0/+2
| | | | | | | | | Some network cards automatically strip the VLAN header, providing the VLAN tag via a side channel such as a completion queue entry. These cards need to be able to report receive completions directly against the relevant VLAN device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Apply settings block name in register_settings()Michael Brown2010-12-012-10/+4Star
| | | | | | | | Pass the settings block name as a parameter to register_settings(), rather than defining it with settings_init() (and then possibly changing it by directly manipulating settings->name). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Match user expectations for &&, ||, goto, and exitMichael Brown2010-11-292-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The && and || operators should be left-associative, since that is how they are treated in most other languages (including C and Unix shell). For example, in the command: dhcp net0 && goto dhcp_ok || echo No DHCP on net0 if the "dhcp net0" fails then the "echo" should be executed. After an "exit" or a successful "goto", further commands on the same line should never be executed. For example: goto somewhere && echo This should never be printed exit 0 && echo This should never be printed exit 1 && echo This should never be printed An "exit" should cause the current shell or script to terminate and return the specified exit status to its caller. For example: chain test.ipxe && echo Success || echo Failure [in test.ipxe] #!ipxe exit 0 should echo "Success". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [shell] Add "shell" commandMichael Brown2010-11-281-1/+1
| | | | | | | The "shell" command allows a script to enter an interactive shell, which is potentially useful for troubleshooting. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Really use __builtin_offsetof() when availableArkadiusz Miskiewicz2010-11-281-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use __builtin_offsetof() when availableMichael Brown2010-11-281-0/+4
| | | | | | | | | | | Some newer versions of gcc (observed with a patched gcc 4.5.1) seem to treat our offsetof() implementation as not being a compile-time constant. Fix by using __builtin_offsetof() when available. (As with the original offsetof() macro, this code is copied from the Linux kernel's stddef.h.) Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Treat VLAN 0 as validMichael Brown2010-11-271-1/+1
| | | | | | | | | VLAN headers are allowed to contain a VLAN tag of zero, indicating that the header specifies only a priority and that the packet does not belong to any VLAN. The easiest way to handle this is to treat VLAN 0 as being a normal VLAN. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Allow Fibre Channel ports to be explicitly namedMichael Brown2010-11-271-1/+2
| | | | | | Use the network interface name as the Fibre Channel port name. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcoe] Add support for FIP VLAN discoveryMichael Brown2010-11-261-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Provide vlan_can_be_trunk()Michael Brown2010-11-261-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add a mechanism for using a PCI VPD field as an NVS deviceMichael Brown2010-11-251-0/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add support for reading and writing PCI Vital Product Data (VPD)Michael Brown2010-11-252-0/+166
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [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-222-1/+9
| | | | | | 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>
* [autoboot] Use generic option-parsing libraryMichael Brown2010-11-211-1/+1
| | | | | | Total saving: 32 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>
* [autoboot] Add "netboot" commandMichael Brown2010-11-201-0/+1
| | | | | Originally-implemented-by: michael-dev@fami-braun.de 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>
* [lotest] Move lotest.h to correct directoryMichael Brown2010-11-191-0/+15
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>