summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* [undi] Use meaningful driver and device namesMichael Brown2011-10-281-2/+10
| | | | | | | | | Specify a driver name of "undionly" and a device name based on the UNDI-reported underlying hardware device. For example: net0: 52:54:00:12:34:56 using undionly on UNDI-PCI00:03.0 (open) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [undi] Use current (rather than permanent) link-layer addressMichael Brown2011-10-281-0/+1
| | | | | Requested-by: Savitha Hiriyannaia <Savitha.Hiriyannaiah@emulex.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow driver to preinitialise the link-layer addressMichael Brown2011-10-281-2/+22
| | | | | | | | | | | | | Drivers are currently expected to initialise only the hardware address, with the link-layer protocol code taking care of converting this into a valid link-layer address. Some drivers (e.g. undinet) can legitimately determine both the hardware and link-layer addresses, which may differ. Allow for this situation by checking to see if the link-layer address is empty before initialising it from the hardware address. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Make "reboot" command available by defaultMichael Brown2011-10-262-6/+8
| | | | | Requested-by: Sven Dreyer <sven@dreyer-net.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [liba20] Preserve all non-segment registers when calling INT 15,2401Michael Brown2011-10-251-3/+6
| | | | | | | | Some BIOSes are reported to corrupt %ebx when using INT 15,2401 (see http://opensolaris.org/jive/thread.jspa?messageID=377026). Guard against this by preserving all (non-segment) registers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [librm] Avoid (harmless) collisions with linker symbolsMichael Brown2011-10-251-14/+14
| | | | | | | | The symbol_text16 is defined globally by the linker. Use rm_text16 instead of _text16 for the local variable within librm.S to avoid confusion when reading linker maps. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Eliminate the register_and_xxx_image() functionsMichael Brown2011-10-256-126/+36Star
| | | | | | | | All users of imgdownload() require registration of the image, so make registration an integral part of imgdownload() itself and simplify the "action" parameter to be one of image_select(), image_exec() et al. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Allow "sleep" command to be interruptedMichael Brown2011-10-241-1/+8
| | | | | | Allow Ctrl-C to be used to abort a "sleep" command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Fix up "sleep" argument parsingMichael Brown2011-10-241-2/+10
| | | | | | | Use parse_integer() rather than strtoul() to allow parsing errors to be reported in a meaningful way. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Make "sleep" command available by defaultMichael Brown2011-10-242-40/+40
| | | | | | | | | | | | | | | The "sleep" command is generally useful to have. For example: :dhcp_retry dhcp && goto dhcp_done sleep 5 goto dhcp_retry :dhcp_done Make the "sleep" command available by default, leaving TIME_CMD controlling only the (fairly specialist) "time" command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Add (not-yet-functional) support for RC queue pairsMichael Brown2011-10-242-8/+111
| | | | | | | | | | | | | Arbel seems to crash the system as soon as the first send WQE completes on an RC queue pair. (NOPs complete successfully, so this is a problem specific to the work queue rather than the completion queue.) The cause of this problem has remained unknown for over a year. Check in the non-functioning code to avoid bit-rot, and in the hope that someone will find the fix. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ath9k] Add ath9k driverScott K Logan2011-10-1475-2/+43182
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list functions required by ath9k driverMichael Brown2011-10-142-0/+326
| | | | | Originally-implemented-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add self-tests for list manipulation functionsMichael Brown2011-10-142-0/+238
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add a basic infrastructure for running self-testsMichael Brown2011-10-142-0/+184
| | | | | | | | This self-test mechanism is inspired by Perl's Test::Simple and similar modules. The aim is to encourage the use of self-tests by making it as easy as possible to create self-test code Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Allow assertion failures to be countedMichael Brown2011-10-142-0/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Tidy up naming convention for list_contains() and friendsMichael Brown2011-10-143-12/+48
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Use a random DHCP transaction identifier (xid)Michael Brown2011-09-193-29/+36
| | | | | | | | | iPXE currently uses the last four bytes of the MAC address as the DHCP transaction identifier. Reduce the probability of collisions by generating a random transaction identifier. Originally-implemented-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Add romcheck.plMichael Brown2011-09-191-0/+54
| | | | | | | | | | Provide a utility to quickly determine the ROM size and .mrom format support for attached PCI devices. For example: 01:00.0 (1186:4300) supports a 128kB .rom or .mrom Inspired-by: Wes Frazier <wes.frazier@members.fsf.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Allow sufficient headroom for TCP headersMichael Brown2011-09-192-4/+14
| | | | | | | | | | | | | | | TCP currently neglects to allow sufficient space for its own headers when allocating I/O buffers. This problem is masked by the fact that the maximum link-layer header size (802.11) is substantially larger than the common Ethernet link-layer header. Fix by allowing sufficient space for any TCP headers, as well as the network-layer and link-layer headers. Reported-by: Scott K Logan <logans@cottsay.net> Debugged-by: Scott K Logan <logans@cottsay.net> Tested-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Accept certificates without a version numberMichael Brown2011-08-133-28/+61
| | | | | | | The version field of an X.509 certificate appears to be optional. Reported-by: Sebastiano Manusia <Sebastiano.Manusia@chuv.ch> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [script] Accept labels on lines terminated with CRLFMichael Brown2011-08-081-1/+7
| | | | | | | | | | | | | | CRLF line terminators are allowed in scripts; the carriage return is simply interpreted as trailing whitespace and so is ignored. This fails on lines containing script labels, since the label-finding code checks for a line containing only the ":" marker and the label itself (without any trailing whitespace). Fix by allowing a label to be terminated by either a NUL or a whitespace character. Reported-by: Bovey Christian <Christian.Bovey@chuv.ch> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [lkrnprefix] Fix lost command line passed by grubValentine Barshak2011-08-071-1/+1
| | | | | | | | | iPXE specifies a value of 0 for cmdline_size, causing GRUB to not pass in a command line. Fix by setting cmdline_size to the maximum value of 2047. Signed-off-by: Valentine Barshak <gvaxon@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [romprefix] Fix romprefix build with certain versions of binutilsValentine Barshak2011-08-071-2/+2
| | | | | Signed-off-by: Valentine Barshak <gvaxon@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Improve debuggingMichael Brown2011-07-161-45/+51
| | | | | | | Use autocolourisation to improve legibility, and move per-packet messages to DBG2(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Fix fragment reassemblyMichael Brown2011-07-162-107/+128
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Fix potential use-after-free in timer_expired()Michael Brown2011-07-161-1/+3
| | | | | | | | | timer->refcnt is allowed to be NULL, in which case the timer's expired() method may end up freeing the timer object. Discovered using valgrind. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Use broadcast link-layer address for all broadcast IPv4 addressesMichael Brown2011-07-151-7/+7
| | | | | | | | When transmitting, use the broadcast link-layer address for any broadcast address (e.g. 192.168.0.255), not just INADDR_BROADCAST (255.255.255.255). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Discard unwanted unicast packetsMichael Brown2011-07-151-10/+50
| | | | | | | | Explicitly discard any unicast packets for addresses that we do not control, to avoid unexpected behaviour when operating in promiscuous mode (which is now the default, thanks to FCoE). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow link layer to report broadcast/multicast packets via pull()Michael Brown2011-07-1517-43/+99
| | | | | | | | Allow the link layer to directly report whether or not a packet is multicast or broadcast at the time of calling pull(), rather than relying on heuristics to determine this at a later stage. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Include port in HTTP Host header as neededMalte Starostik2011-07-151-1/+5
| | | | | | | | | | | According to section 14.23 of RFC2616, an HTTP Host header without port implies the default port is used. Thus, when fetching from anywhere but port 80 for HTTP or 443 for HTTPS, the port ought to be explicitly given in that header. Otherwise, some servers might fail to associate the request with the correct virtual host or generate incorrect self-referencing URLs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [igb] Remove __BIG_ENDIAN conditionalThomas Miletich2011-07-151-5/+0Star
| | | | | | Reported-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Add symbolic definitions for DHCP client architecture valuesMichael Brown2011-07-064-4/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Allow for zero-padded decimals in printf()Michael Brown2011-07-061-10/+27
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Avoid duplicate calls to iscsi_tx_done()Michael Brown2011-06-291-4/+9
| | | | | | | | | | | | The iSCSI TX process can now be woken up by the TCP socket via xfer_window_changed(), so it is no longer valid to assume that iscsi_tx_step() can be called in state ISCSI_TX_IDLE only immediately after completing a transmission. Fix by calling iscsi_tx_done() only upon a transition into state ISCSI_TX_IDLE. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid using -ffunction-sections on some older versions of gccMichael Brown2011-06-291-2/+8
| | | | | | | | | Some older versions of gcc issue a warning if -ffunction-sections is used in combination with -g (gcc bug #18553). Inhibit -ffunction-sections when building with such a version of gcc. Reported-by: zhengwei <zw111_2001@126.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Fix size_t format specifiersMichael Brown2011-06-291-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Support read-only HTTP block devicesMichael Brown2011-06-281-59/+308
| | | | | | | | | | Provide support for HTTP range requests, and expose this functionality via the iPXE block device API. This allows SAN booting from a root path such as: sanboot http://boot.ipxe.org/freedos/fdfullcd.iso Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Provide a permanently closed window via the control interfaceMichael Brown2011-06-281-0/+15
| | | | | | | Allow objects to support both streaming and block device protocols, by starting streaming data only when the data transfer window opens. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Eliminate polling while TX state machine is idleMichael Brown2011-06-281-13/+67
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Eliminate polling while waiting for window to openMichael Brown2011-06-281-3/+26
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Eliminate polling while waiting for window to openMichael Brown2011-06-281-32/+46
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [scsi] Eliminate polling while waiting for window to openMichael Brown2011-06-281-6/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hw] Eliminate polling while waiting for window to openMichael Brown2011-06-281-1/+2
| | | | | | | | | | | | | | | Polling for the data-transfer window to become open is wasteful. We can eliminate the polling loop by using hw_step() as the handler for an xfer_window_changed() event. If the window is already open at the time of instantiation, then xfer_window_changed() may never be called. We can cover this case by using hw_step() as the step() method of a one-shot process. Since the signature for an xfer_window_changed() method is identical to the signature for a process step() method, the same function can be used for both. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use a one-shot process for CMRC shutdownMichael Brown2011-06-281-4/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Use a one-shot process for Fibre Channel name server queriesMichael Brown2011-06-281-4/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Use a one-shot process for Fibre Channel ELS requestsMichael Brown2011-06-281-4/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [resolv] Use a one-shot process for the numeric resolverMichael Brown2011-06-281-2/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Add support for one-shot processesMichael Brown2011-06-282-2/+24
| | | | | | | | | Some processes execute only once, and exist solely in order to defer execution until after the relevant instantiator method has returned. Such processes do not need to be automatically rescheduled when executing. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Pass containing object pointer to process step() methodsMichael Brown2011-06-2816-101/+229
| | | | | | | | | Give the step() method a pointer to the containing object, rather than a pointer to the process. This is consistent with the operation of interface methods, and allows a single function to serve as both an interface method and a process step() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>