summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [undi] Assume that interrupts are not supported if IRQ=0Michael Brown2011-04-231-1/+3
| | | | | | | | | Some PXE stacks (notably old Etherboot/gPXE stacks) will claim to use the timer interrupt, rather than reporting that interrupts are not supported. Since using the timer interrupt is equivalent to polling anyway, we may as well genuinely poll these stacks. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Run parserom.pl only on potential driver filesMichael Brown2011-04-101-1/+2
| | | | | | | | | | | PCI_ROM() and ISA_ROM() macros occur only within driver files. Running parserom.pl on non-driver files is therefore redundant. Skip running parserom.pl on any files outside a "drivers" directory. This reduces the time taken to generate build rules and dependencies after a "make veryclean" by around 12%. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "iseq" commandGreg Jednaszewski2011-04-081-0/+37
| | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Simplify "isset" commandMichael Brown2011-04-081-10/+3Star
| | | | | | | | There is no plausible scenario I can think of in which "isset" would be used with more than one argument. Simplify the code by specifying that exactly one argument is required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Work around missing mport support in current BOFM implementationsMichael Brown2011-04-081-15/+39
| | | | | | | | | | | | | | | | | | | | | | | Current BOFM versions are unable to create entries with mport>1, which means that only the port 1 MAC address can be explicitly specified. Work around this by using the provided MAC address as a base address for all subsequent ports. For example, if BOFM assigns the address 00:1A:64:76:00:09 for port 1 then we will assign the addresses 00:1A:64:76:00:09 for port 1 00:1A:64:76:00:0a for port 2 Future BOFM versions that may correctly support mport will work with this scheme without modification provided that the BOFM entries are created in increasing order of mport. Since BOFM tools tend to generate entries in increasing order (of slot, port, etc), this is not an unreasonable compromise. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Stop firmware only once on shutdownMichael Brown2011-04-081-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Stop firmware only once on shutdownMichael Brown2011-04-081-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add support for HIIMichael Brown2011-04-087-0/+1690
| | | | | | | Some EFI platforms expect us to provide an HII interface to display information about the driver. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Include MdeModulePkg directory in header import listMichael Brown2011-04-081-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add EFI string formatting functionsMichael Brown2011-04-084-15/+179
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [device] Make driver name a generic device propertyMichael Brown2011-04-0812-16/+14Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Refuse to attempt building with the GNU gold linkerMichael Brown2011-04-051-0/+7
| | | | | | | | | | | | | | GNU gold (part of newer binutils builds) does not appear to be designed to support generic linker functionality, since its source code contains several Linux-specific hard-coded assumptions about the layout of ELF binaries. Attempting to build iPXE using GNU gold will generally cause some kind of "linker internal error". Provide an explicit error message suggesting the use of GNU ld instead. Reported-by: Chris Hills <chaz@chaz6.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Perform tool checks on each make invocationMichael Brown2011-04-051-15/+17
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [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>