summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmdline] Add standalone "nslookup" commandPatrick Plenefisch2012-09-106-0/+283
| | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [smbios] Default to "hex" type for non-string SMBIOS settingsMichael Brown2012-09-101-3/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use a generic setting's own type as its default typeMichael Brown2012-09-104-9/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fetching a named setting using a name that does not explicitly specify a type, default to using the type stored when the setting was created, rather than always defaulting to "string". This allows the behaviour of user-defined settings to match the behaviour of predefined settings (which have a sensible default type). For example: set server:ipv4 192.168.0.1 echo ${server} will now print "192.168.0.1", rather than trying to print out the raw IPv4 address bytes as a string. The downside of this change is that existing tricks for printing special characters within scripts may require (backwards-compatible) modification. For example, the "clear screen" sequence: set esc:hex 1b set cls ${esc}[2J echo ${cls} will now have to become set esc:hex 1b set cls ${esc:string}[2J # Must now explicitly specify ":string" echo ${cls} Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sdi] Add support for SDI imagesMichael Brown2012-09-056-0/+181
| | | | | | | Add support (disabled by default) for booting .sdi images as used by Windows XP Embedded. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headersMichael Brown2012-08-318-293/+425
| | | | | | | | | | | | | Almost all clients of the raw-packet interfaces (UNDI and SNP) can handle only Ethernet link layers. Expose an Ethernet-compatible link layer to local clients, while remaining compatible with IPoIB on the wire. This requires manipulation of ARP (but not DHCP) packets within the IPoIB driver. This is ugly, but it's the only viable way to allow IPoIB devices to be driven via the raw-packet interfaces. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Include destination address vector in ib_complete_recv()Michael Brown2012-08-3111-22/+55
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use explicit "source" and "dest" address vector parameter namesMichael Brown2012-08-3111-153/+159
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Allow queue pairs to have a custom allocator for receive iobufsMichael Brown2012-08-316-10/+48
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iobuf] Allow allocation of I/O buffers with a specified alignment offsetMichael Brown2012-08-312-15/+32
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Allow allocation of memory with a specified alignment offsetMichael Brown2012-08-312-8/+29
| | | | | | | | Allow for allocation of memory blocks having a specified offset from a specified physical alignment, such as being 12 bytes before a 2kB boundary. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Expose retry_poll() to explicitly poll all running timersMichael Brown2012-08-312-3/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ethernet] Expose eth_broadcast as a global constantMichael Brown2012-08-313-6/+4Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add missing #include <config/local/sideband.h>Anton D. Kachalov2012-08-271-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Display commands for dependency generation when building with V=1Anton D. Kachalov2012-08-271-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Disambiguate most error causesMichael Brown2012-08-251-32/+140
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Force EEPROM CS low before disabling EEPROM access modeMichael Brown2012-08-242-3/+32
| | | | | | | | | | | | | Some RTL8169 cards seem to drive the EEPROM CS line high (i.e. active) when 9346CR.EEM is set to "normal operating mode", with the result that the CS line is never deasserted. The symptom of this is that the first read from the EEPROM will work, while all subsequent reads will return garbage data. Reported-by: Thomas Miletich <thomas.miletich@gmail.com> Debugged-by: Thomas Miletich <thomas.miletich@gmail.com> Tested-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bitbash] Add optional open() and close() methods for bit-bashing interfacesMichael Brown2012-08-243-1/+48
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Forcibly enable advertisement of 1000Mbps speedsMichael Brown2012-08-231-7/+72
| | | | | | | | | | | Some RTL8169 cards (observed with an RTL8169SC) power up advertising only 100Mbps, despite being capable of 1000Mbps. Forcibly enable advertisement of 1000Mbps on any RTL8169-like card. This change relies on the assumption that the CTRL1000 register will not exist on 100Mbps-only RTL8169 cards such as the RTL8101. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mii] Add separate mii_restart() functionMichael Brown2012-08-232-4/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Enable DAC only when built as a 64-bit binaryMichael Brown2012-08-231-2/+7
| | | | | | | | | | | | | | | | | Some RTL8169 cards (observed with an RTL8169SC) crash and burn if DAC is enabled, even if only 32-bit addresses are used. Observed behaviour includes system lockups and repeated transmission of garbage data onto the wire. This seems to be a known problem. The Linux r8169 driver disables DAC by default and provides a "use_dac" module parameter. There appears to be no known test for determining whether or not DAC will work. As a workaround, enable DAC only if we are built as as 64-bit binary. This at least eliminates the problem in the common case of a 32-bit build, which will never use 64-bit addresses anyway. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Use read-modify-write to check for C+ Command registerMichael Brown2012-08-231-3/+4
| | | | | | | Some bits in the C+ Command register are always one. Testing for the presence of the register must allow for this. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Use explicit value for TCR.MXDMAMichael Brown2012-08-232-0/+13
| | | | | | | | | | Some RTL8169 cards (observed with an RTL8169SC) power up with TCR.MXDMA set to 16 bytes. While this does not prevent proper operation, it almost certainly degrades performance. Fix by explicitly setting TCR.MXDMA to "unlimited". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Use explicit values for RCR.RXFTH and RCR.MXDMAMichael Brown2012-08-232-2/+10
| | | | | | | | Some RTL8169 cards (observed with an RTL8169SC) power up with invalid values in RCR.RXFTH and RCR.MXDMA, causing receive DMA to fail. Fix by setting explicit values for both fields. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [realtek] Always set high dword of ring address registersMichael Brown2012-08-231-4/+2Star
| | | | | | | | | | Some RTL8169 cards (observed with an RTL8169SC) power up with garbage values in the ring address registers, and do not clear the registers on reset. Fix by always setting the high dword of the ring address registers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tg3] Fix driver for BCM5719, BCM5720, BCM5764M, BCM57762Kevin Tran2012-08-204-19/+29
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Fix HTTP SAN bootingMichael Brown2012-08-171-6/+6
| | | | | | | | | | | | | | | Commit 501527d ("[http] Treat any unexpected connection close as an error") introduced a regression causing HTTP SAN booting to fail. At the end of the response to the HEAD request, the call to http_done() would erroneously believe that the server had disconnected in the middle of the HTTP headers. Fix by treating the header block from a HEAD request as a trailer block. This fixes the problem and also simplifies the logic in http_rx_header(). Reported-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ftp] Add support for the FTP SIZE commandMarin Hannache2012-08-151-11/+60
| | | | | | | | | | The FTP SIZE command allows us to get the size of a particular file, as a consequence, we can now show proper transfer progression while fetching a file using the FTP protocol. Signed-off-by: Marin Hannache <git@mareo.fr> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Treat any unexpected connection close as an errorMichael Brown2012-08-151-7/+15
| | | | | | | | | | | | | | | | | iPXE currently checks that the server has not closed the connection mid-stream (i.e. in the middle of a chunked transfer, or before the specified Content-Length has been received), but does not check that the server got as far as starting to send data. Consequently, if the server closes the connection before any data is transferred (e.g. if the server gives up waiting while iPXE performs the validation steps for TLS), then iPXE will treat this as a successful transfer of a zero-length file. Fix by checking the RX connection state, and forcing an error if the server has closed the connection at an unexpected point. Originally-fixed-by: Marin Hannache <mareo@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Fix up checksum in UNDI ROM header, if presentMichael Brown2012-08-151-0/+1
| | | | | | | | | | | The UNDI ROM header does contain a checksum byte. Apparently no-one cares about this, since iPXE has left it as zero for years without anyone noticing. Since Option::ROM now understands the UNDI ROM header, we may as well fix up the checksum byte for the sake of completeness. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Display UNDI ROM header in disrom.plMichael Brown2012-08-152-0/+96
| | | | | Requested-by: Daniel Wyatt <daniel.wyatt@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Allow for CALL NEAR in the option ROM initialisation entry pointDaniel Wyatt2012-08-151-0/+4
| | | | | | | | Option::ROM currently understands only JMP NEAR and JMP SHORT instructions in the initialisation entry point. At least one Broadcom option ROM has been observed to use a CALL NEAR instruction. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [comboot] Accept only ".cbt" as an extension for COMBOOT imagesMichael Brown2012-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | COMBOOT images are detected by looking for a ".com" or ".cbt" filename extension. There are widely-used files with a ".com" extension, such as "wdsnbp.com", which are PXE images rather than COMBOOT images. Avoid false detection of PXE images as COMBOOT images by accepting only a ".cbt" extension as indicating a COMBOOT image. Interestingly, this bug has been present for a long time but was frequently concealed because the filename was truncated to fit the fixed-length "name" field in struct image. (PXE binaries ending in ".com" tend to be related to Windows deployment products and so often use pathnames including backslashes, which iPXE doesn't recognise as a path separator and so treats as part of a very long filename.) Commit 1c127a6 ("[image] Simplify image management commands and internal API") made the image name a variable-length field, and so exposed this flaw in the COMBOOT image detection algorithm. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bzimage] Allow file mode to be specified for standalone initrd filesMichael Brown2012-08-031-3/+37
| | | | | | | | | | Allow the file mode to be specified using a "mode=" command line parameter. For example: initrd http://web/boot/bootlocal.sh /opt/bootlocal.sh mode=755 Requested-by: Bryce Zimmerman <bryce.zimmerman@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [romprefix] Round up PMM allocation sizes to nearest 4kBMichael Brown2012-07-251-1/+5
| | | | | | | | | | | | Some AMI BIOSes apparently break in exciting ways when asked for PMM allocations for sizes that are not multiples of 4kB. Fix by rounding up the image source area to the nearest 4kB. (The temporary decompression area is already rounded up to the nearest 128kB, to facilitate sharing between multiple iPXE ROMs.) Reported-by: Itay Gazit <itayg@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tg3] Fix excessive DMA alignment.Thomas Miletich2012-07-241-2/+1Star
| | | | | | | | | Change the DMA alignment from 4096 bytes to 16 bytes, to conserve available DMA memory. The hardware doesn't have any specific alignment requirements. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Sleep while waiting for user inputMichael Brown2012-07-241-0/+2
| | | | | | | | Reduce CPU usage while waiting for user input. This is particularly important for virtual machines, where CPU is a shared resource. Reported-by: Alessandro Salvatori <alessandro@embrane.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcpip] Fix building under CygwinJoshua Oreman2012-07-241-1/+1
| | | | | | | Cygwin's assembler treats '/' as a comment character. Reported-by: Steve Goodrich <steve.goodrich@se-eng.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix building under OpenBSDThomas Miletich2012-07-241-0/+2
| | | | | | | | | Similarly to FreeBSD, OpenBSD requires the object format to be specified as elf_i386_obsd rather than elf_i386. Reported-by: Jiri B <jirib@devio.us> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vmware] Fix compilation under OpenBSDThomas Miletich2012-07-231-1/+1
| | | | | Reported-by: Jiri B <jirib@devio.us> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Update mergerom.pl to handle iPXE ROM headerMichael Brown2012-07-231-3/+18
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [romprefix] Report a pessimistic runtime size estimateMichael Brown2012-07-234-6/+111
| | | | | | | | | | | | | | | | PCI3.0 allows us to report a "runtime size" which can be smaller than the actual ROM size. On systems that support PMM our runtime size will be small (~2.5kB), which helps to conserve the limited option ROM space. However, there is no guarantee that the PMM allocation will succeed, and so we need to report the worst-case runtime size in the PCI header. Move the "shrunk ROM size" field from the PCI header to a new "iPXE ROM header", allowing it to be accessed by ROM-manipulation utilities such as disrom.pl. Reported-by: Anton D. Kachalov <mouse@yandex-team.ru> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [contrib] Fix rom-o-matic git version number issuesFloris Bos2012-07-231-2/+7
| | | | | | | | | | | Fixes issue in which git version number is not displayed on startup when iPXE is built through rom-o-matic. Remove special characters from filename generated by rom-o-matic (so that you get "ipxe-1.0.0+c3b4-undionly.kkpxe" instead of "ipxe-1.0.0+ (c3b4)-undionly.kkpxe") Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [contrib] Fix rom-o-matic build (add new LOG_LEVEL constant)Floris Bos2012-07-231-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [epic100] Fix wrong field used as rx packet lengthAlexey2012-07-231-2/+2
| | | | | | | | | | | | Datasheet pp. 41-42 defines 'rx packet length' as upper word of 'status' dword field of the receive descriptor table. http://www.smsc.com/media/Downloads_Archive/discontinued/83c171.pdf Tested on SMC EtherPower II. Signed-off-by: Alexey Smazhenko <darkover@corbina.com.ua> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-20345-347/+690
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Fix compiler warning on gcc 4.7Michael Brown2012-07-201-0/+3
| | | | | Originally-fixed-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [isa] Avoid spurious compiler warning on gcc 4.7Michael Brown2012-07-201-3/+3
| | | | | | | | gcc 4.7 produces a spurious warning about an array subscript being out of bounds. Use a pointer dereference instead of an array lookup to inhibit this spurious warning. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include git commit within version string when availableMichael Brown2012-07-201-2/+6
| | | | | Originally-implemented-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Automatically free autobooted imagesMichael Brown2012-07-201-0/+1
| | | | | | | Simplify the process of booting by ensuring that old images are not left registered after an unsuccessful autoboot attempt. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Add "--replace" optionMichael Brown2012-07-202-11/+64
| | | | | | | | | Expose image tail-recursion to iPXE scripts via the "--replace" option. This functions similarly to exec() under Unix: the currently-executing script is replaced with the new image (as opposed to running the new image as a subroutine). Signed-off-by: Michael Brown <mcb30@ipxe.org>