summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* [tcp] Update ts_recent whenever window is advancedMichael Brown2011-04-031-9/+22
| | | | | | | | | | | | | Commit 3f442d3 ("[tcp] Record ts_recent on first received packet") failed to achieve its stated intention. Fix this (and reduce the code size) by moving the ts_recent update to tcp_rx_seq(). This is the code responsible for advancing the window, called by both tcp_rx_syn() and tcp_rx_data(), and so the window check is now redundant. Reported-by: Frank Weed <zorbustheknight@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Fix "isset" commandMichael Brown2011-04-011-2/+8
| | | | | | | | | | | | | | | Commit b5f5f73 ("[cmdline] Expand settings within each command-line token individually") introduced a regression into the "isset" command: it is now possible for command-line arguments to be empty strings, and so "isset" cannot simply check for a non-empty argument list. Restore previous behaviour by checking for the presence of any non-empty arguments, rather than checking for a non-empty argument list. Reported-by: Nemtallah Daher <n.daher@csuohio.edu> Tested-by: Nemtallah Daher <n.daher@csuohio.edu> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tftp] Avoid setting current working URI to "tftp://0.0.0.0/"Michael Brown2011-03-311-5/+9
| | | | | | | Set the current working URI to NULL rather than to "tftp://0.0.0.0/". Reported-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Synchronise EFI header filesMichael Brown2011-03-3112-33/+100
| | | | | | Synchronised to EDK2 SVN revision 11462. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add support for shell historyMichael Brown2011-03-301-1/+10
| | | | | | | The up and down arrow keys will now function roughly as expected at the iPXE command line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add history supportMichael Brown2011-03-302-9/+258
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add replace_string()Michael Brown2011-03-302-0/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add init_editstring() wrapper functionMichael Brown2011-03-303-4/+15
| | | | | | | | Standardise on using init_editstring() to initialise an embedded editable string, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add "allmroms" targetBastian Blank2011-03-301-2/+2
| | | | | | Signed-off-by: Bastian Blank <waldi@debian.org> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid generating ROMs with "match-any" vendor or device IDsMichael Brown2011-03-301-0/+1
| | | | | | | | | A PCI_ROM() entry containing a vendor or device ID of PCI_ANY_ID (0xffff) indicates to pci_find_driver() that the entry's vendor or device ID should be ignored when matching against the device's vendor or device ID. It does not represent a PCI ROM that should be built. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include $(BIN)/errors in "make clean"Michael Brown2011-03-301-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include only one copy of each ROM in "make allroms"Michael Brown2011-03-301-4/+4
| | | | | | | | | | | | Each PCI ROM currently ends up appearing twice in the $(ROMS) list: once under its designated name (e.g. "rtl8139.rom"), once under its PCI IDs (e.g. "bin/10ec8139.rom"). Include only the latter of these in the $(ROMS) list, so that doing "make allroms" will generate only one copy of each ROM. Reported-by: Bastian Blank <waldi@debian.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove obsolete "allzroms" targetMichael Brown2011-03-301-2/+2
| | | | | | | The .zrom format has not existed since around 2007. ROMs are now compressed by default. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Simplify link-down status messageMichael Brown2011-03-301-3/+9
| | | | | | | | | | | | | | | | | | For devices that start in a link-down state, the user will see a message such as: [Link status: The socket is not connected (http://ipxe.org/38086001)] Waiting for link-up on net0... This is potentially misleading, since it suggests that there is a genuine problem. Add a dedicated error message for "link down", giving instead: [Link status: Down (http://ipxe.org/38086101)] Waiting for link-up on net0... Reported-by: Tal Aloni <tal.aloni.il@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bofm] Use BOFM protocol version 2 if availableMichael Brown2011-03-301-17/+62
| | | | | | | | | The original EFI BOFM protocol has a design flaw that limits the size of the table to 1kB, since the table is embedded within the IBM_BOFM_DRIVER_CONFIGURATION_PROTOCOL structure. Version 2 of the protocol works around this problem. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [forcedeth] Never change the NVREG_TRANSMITPOLL_MAC_ADDR_REV flagMichael Brown2011-03-301-5/+0Star
| | | | | | | | | | | iPXE operates the forcedeth NIC in promiscuous mode, and never changes the unicast MAC address filter registers. We should not therefore set the flag indicating (to other drivers loaded later) that the MAC address order has already been corrected. Reported-by: Tal Aloni <tal.aloni.il@gmail.com> Tested-by: Tal Aloni <tal.aloni.il@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Ensure that all drivers are shut down before the OS bootsMichael Brown2011-03-293-32/+51
| | | | | | Reported-by: Itay Gazit <itayg@mellanox.co.il> Suggested-by: Michael R Turner <mikeyt@us.ibm.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [forcedeth] Remove software unicast MAC address filterMichael Brown2011-03-291-9/+2Star
| | | | | | | | | | | | | | | | | | | The forcedeth driver currently implements unicast MAC address filtering in software. This is almost invariably the wrong thing to do (since the network stack must already be able to cope with unwanted packets) and it breaks FCoE (which requires the card to operate in promiscuous mode). Also, the implementation is buggy: is_local_ether_addr() is used to check for a locally-assigned Ethernet address (not to check for a unicast address), and the current link-layer address is in netdev->ll_addr, not netdev->hw_addr. Fix by removing this code. Reported-by: Tal Aloni <tal.aloni.il@gmail.com> Tested-by: Tal Aloni <tal.aloni.il@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix compilation when gcc is patched to default to -fPIE -Wl,-pieGilles Espinasse2011-03-291-0/+11
| | | | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display "delete" option only for locally-originated settingsMichael Brown2011-03-281-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Add the "scriptlet" settingMichael Brown2011-03-282-5/+27
| | | | | | | | | | | | | | | | | | | A scriptlet is a single iPXE command that can be stored in non-volatile option storage and used to override the default "autoboot" behaviour without having to reflash the iPXE image. For example, a scriptlet could contain autoboot || reboot to instruct iPXE to reboot the system if booting fails. Unlike an embedded image, the presence of a scriptlet does not inhibit the initial "Press Ctrl-B..." prompt. This allows the user to recover from setting a faulty scriptlet. Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Expand settings within each command-line token individuallyMichael Brown2011-03-281-35/+79
| | | | | | | | | | | Perform settings expansion after tokenisation, and only at the point of executing each command. This allows statements such as dhcp && echo ${net0/ip} to work correctly. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Allow ";" as an unconditional command separatorMichael Brown2011-03-281-0/+14
| | | | | | | | | | | | It is currently possible to construct a sequence of commands to be executed regardless of success or failure using "|| &&" as the command separator. (The "||" captures the failure case, the blank command converts it to a success case.) Allow ";" to be used as a more visually appealing (and space-efficient) alternative. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Avoid unused-but-set variable warning in gcc 4.6Thomas Miletich2011-03-281-2/+2
| | | | | | | | | Temporary modification to prevent valgrind.h from breaking compilation with gcc 4.6. When this problem is fixed upstream, a new and unmodified copy of valgrind.h should be imported. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [forcedeth] Avoid unused-but-set variable warning in gcc 4.6Thomas Miletich2011-03-281-3/+2Star
| | | | | | | | | Avoid unused-but-set variable warning in gcc 4.6 which was introduced by commit 9215b7f ("[forcedeth] Clear the MII link status register on link status changes"). Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [exeprefix] Add .exe prefixMichael Brown2011-03-282-0/+158
| | | | | | | | | | An iPXE .exe image can be loaded from DOS. Tested using bin/ipxe.exe to load a Linux kernel and simple initramfs from within MS-DOS 6.22. (EDD must be disabled using the "edd=off" kernel parameter, since the loaded kernel image has already overwritten parts of DOS' INT 13 wrapper.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [prefix] Avoid using base memory for temporary decompression areaMichael Brown2011-03-281-3/+7
| | | | | | | | In the unlikely (but observable) event that INT 15,88 returns less memory above 1MB than is required for the temporary decompression area, ignore it and use the 1MB point anyway. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Generate hybrid ISO images if isohybrid is availableMichael Brown2011-03-271-0/+7
| | | | | Suggested-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Delete incomplete targets if building fails for any reasonMichael Brown2011-03-271-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Make malloc and linux_umalloc valgrindablePiotr Jaroszyński2011-03-279-12/+4953
| | | | | | | | | | Make the allocators used by malloc and linux_umalloc valgrindable. Include valgrind headers in the codebase to avoid a build dependency on valgrind. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Remove redundant call to basename()Michael Brown2011-03-271-3/+0Star
| | | | | | | | | There is no need to explicitly call basename() to construct an image name in imgfetch_core_exec(), since image_set_uri() will do so automatically anyway (and will do so without getting confused by URIs with query strings). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Use image_set_name() only if name != NULLPiotr Jaroszyński2011-03-271-1/+2
| | | | | Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Mark devices as open only if opening succeedsPiotr Jaroszyński2011-03-271-3/+3
| | | | | | | netdev_close() assumes that devices that are open are on the open_list, which wasn't true if device specific opening failed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add "read" commandMichael Brown2011-03-271-39/+88
| | | | | | | | | | | | The "read" command allows a script to prompt a user to enter a setting. For example: echo -n Static IP address: read net0/ip Total cost: 17 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Allow "echo -n" to inhibit trailing newlineMichael Brown2011-03-271-3/+30
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Add support for boolean optionsMichael Brown2011-03-272-0/+16
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Record ts_recent on first received packetMichael Brown2011-03-261-5/+8
| | | | | | | | | | | | | | | Commit 6861304 ("[tcp] Handle out-of-order received packets") introduced a regression in which ts_recent would not be updated until the first packet is received in the ESTABLISHED state, i.e. the timestamp from the SYN+ACK packet would be ignored. This causes the connection to be dropped by strictly-conforming TCP peers, such as FreeBSD. Fix by delaying the timestamp window check until after processing the received SYN flag. Reported-by: winders@sonnet.com Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include ipxe.lkrn in default buildMichael Brown2011-03-261-2/+2
| | | | | | | bin/ipxe.lkrn is built anyway in order to create bin/ipxe.iso, so there is no additional cost to including it within the default build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [monojob] Avoid overflow when calculating percentage progressMichael Brown2011-03-261-3/+7
| | | | | | | | Normalise the progress figures to ensure that multiplication by 100 (to produce a percentage) cannot result in integer overflow. Reported-by: Sven Dreyer <sven@dreyer-net.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Match terminology in online documentationMichael Brown2011-03-236-12/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Avoid memory leak when unregistering autovivified settings blocksMichael Brown2011-03-231-3/+27
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Refer to online documentation for settings helpMichael Brown2011-03-231-2/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Match terminology used elsewhereMichael Brown2011-03-231-1/+1
| | | | | | | iPXE documentation tends to refer to "settings" rather than "options", since settings can be more general than DHCP options. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [undi] Cope with devices that erroneously claim not to use interruptsMichael Brown2011-03-231-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some PXE stacks advertise that interrupts are not supported, despite requiring the use of interrupts. Attempt to cope with such cards without breaking others by always hooking the interrupt, and using the "interrupts supported" flag only to decide whether or not to wait for an interrupt before calling PXENV_UNDI_ISR_IN_PROCESS. The possible combinations are therefore: 1. Card generates interrupts and claims to support interrupts iPXE will call PXENV_UNDI_ISR_IN_PROCESS only after an interrupt has been observed. (This is required to avoid lockups in some PXE stacks, which spuriously sulk if called before an interrupt has been generated.) Such a card should work correctly. 2. Card does not generate interrupts and does not claim to support interrupts iPXE will call PXENV_UNDI_ISR_IN_PROCESS indiscriminately, matching the observed behaviour of at least one other PXE NBP (winBoot/i). Such a card should work correctly. 3. Card generates interrupts but claims not to support interrupts iPXE will call PXENV_UNDI_ISR_IN_PROCESS indiscriminately. An interrupt will still result in a call to PXENV_UNDI_ISR_IN_START. Such a card may work correctly. 4. Card does not generate interrupts but claims to support interrupts Such a card will not work at all. Reported-by: Jerry Cheng <jaspers.cheng@msa.hinet.net> Tested-by: Jerry Cheng <jaspers.cheng@msa.hinet.net> Reported-by: Mauricio Silveira <mauricio@livreti.com.br> Tested-by: Mauricio Silveira <mauricio@livreti.com.br> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Impose a fixed order on settingsMichael Brown2011-03-2313-46/+64
| | | | | | | Improve the appearance of the "config" user interface by ensuring that settings appear in some kind of logical order. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Fix setting expansionMichael Brown2011-03-231-3/+4
| | | | | | | | | | | Commit 5fbd020 ("[settings] Display canonical setting name in output of "show" command") introduced a regression causing all setting expansions (e.g. "${net0/mac}") to expand to an empty string. Fix by returning the formatted value length from fetchf_named_setting(), as expected by the caller. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Return to first row on navigating to a new settings blockMichael Brown2011-03-231-4/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add hierarchy navigation in "config" user interfaceMichael Brown2011-03-231-199/+260
| | | | | | | Allow the user to browse through the settings block hierarchy. Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Reject attempts to change a network device's bus IDMichael Brown2011-03-231-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display locally-originated settings in boldMichael Brown2011-03-221-1/+11
| | | | | Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>