aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-04-19[build] Rename gPXE to iPXEMichael Brown579-2151/+2151
Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19[eepro100] Remove link-state checkingThomas Miletich2-48/+1
Christopher Armenio reported link detection problems with an integrated eepro100 NIC. Thomas Miletich removed link detection code from the eepro100 driver and verified that the driver continued to function. Christopher verified Thomas' patch on his integrated eepro100 NIC. Reported-by: Christopher Armenio <christopher.armenio@resquared.com> Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-04-16[util] Hide an expected error from the 'which' commandPiotr Jaroszyński1-1/+1
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-04-16[build] Look for isolinux.bin in more placesPiotr Jaroszyński1-1/+5
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-04-16[drivers] Fix warnings identified by gcc 4.5Bruce Rogers3-4/+4
In building gpxe for openSUSE Factory (part of kvm package), there were a few problems identified by the compiler. This patch addresses them. Signed-off-by: Bruce Rogers <brogers@novell.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-26[build] Add support for local configuration filesPiotr Jaroszyński11-2/+25
Include config/local/$file in config/$file where it makes sense and create empty local configs during build if not present. Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-26[pxe] Remove pxe_set_cached_filename()Michael Brown3-37/+0
gPXE currently overwrites the filename stored in the cached DHCP packets when a call to PXENV_TFTP_READ_FILE or PXENV_RESTART_TFTP is made. This code has existed for many years as a workaround for RIS, which seemed to require that this be done. pxe_set_cached_filename() causes problems with the Bootix NBP, and a recent test demonstrates that RIS will complete successfully even with pxe_set_cached_filename() removed. There have been many changes to the DHCP and PXE logic since this code was first added, and it is quite plausible that it was masking a bug that no longer exists. Reported-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Debugged-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca> Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-23[pxe] Avoid potential interrupt storms when using shared interruptsMichael Brown1-4/+21
Current gPXE code always returns "OURS" in response to PXENV_UNDI_ISR:START. This is harmless for non-shared interrupt lines, and avoids the complexity of trying to determine whether or not we really did cause the interrupt. (This is a non-trivial determination; some drivers don't have interrupt support and hook the system timer interrupt instead, for example.) A problem occurs when we have a shared interrupt line, the other device asserts an interrupt, and the controlling ISR does not chain to the other device's ISR when we return "OURS". Under these circumstances, the other device's ISR never executes, and so the interrupt remains asserted, causing an interrupt storm. Work around this by returning "OURS" if and only if our net device's interrupt is currently recorded as being enabled. Since we always disable interrupts as a result of a call to PXENV_UNDI_ISR:START, this guarantees that we will eventually (on the second call) return "NOT OURS", allowing the other ISR to be called. Under normal operation, including a non-shared interrupt situation, this change will make no difference since PXENV_UNDI_ISR:START would be called only when interrupts were enabled anyway. Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-23[netdevice] Record whether or not interrupts are currently enabledMichael Brown2-0/+21
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-23[netdevice] Add netdev_is_open() wrapper functionMichael Brown10-17/+28
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-22[phantom] Update interrupt support to match current firmwareMichael Brown2-23/+91
The interrupt control mechanism on Phantom cards has changed substantially since the driver was initially written. This updates the code to match the mechanism used in production firmware. This is sufficient to allow DOS wget to function successfully using the 3Com UNDI/NDIS, Intel UNDI/NDIS, and UNDIPD.COM UNDI/PD stacks. Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-17[igb] Add igb driverMarty Connor21-0/+13395
This commit adds an igb (Intel GigaBit) driver based on Intel source code available at: http://sourceforge.net/projects/e1000/ which is upstream source for the Linux kernel e1000 drivers, and should support some PCIe e1000 variants. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-17[e1000e] Add e1000e driverMarty Connor22-0/+18164
This commit adds an e1000e driver based on Intel source code available at: http://sourceforge.net/projects/e1000/ which is upstream source for the Linux kernel e1000 drivers, and should support many PCIe e1000 variants. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-17[e1000] Update e1000 driverMarty Connor25-13859/+15348
This commit replaces the current gPXE e1000 driver with one ported from Intel source code available at http://sourceforge.net/projects/e1000/ which is upstream source for the Linux kernel e1000 drivers, and should support most if not all PCI e1000 variants. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-17[iscsi] Disambiguate some common authentication errorsMichael Brown1-14/+27
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-12[vxge] Add stub vxge.c file so bin/vxge.usb can be builtStefan Hajnoczi2-4/+23
The vxge driver code is split over several files, including vxge_main.c. This causes the build system and ROM-o-matic to see the driver as "vxge_main". This patch adds a stub vxge.c which takes up no space but gives the driver its proper name, "vxge". Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-04[fnrec] Add function recorder for debuggingStefan Hajnoczi3-0/+195
The function recorder is a crash and hang debugging tool. It logs each function call into a memory buffer while gPXE runs. After the machine is reset, and if the contents of memory have not been overwritten, gPXE will detect the memory buffer and print out its contents. This allows developers to see a trace of the last functions called before a crash or hang. The util/fnrec.sh script can be used to convert the function addresses back into symbol names. To build with fnrec: make FNREC=1 Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-04[build] Disable ccache for embedded.oStefan Hajnoczi1-0/+7
Embedded image support uses .incbin in inline assembly to include binary files. The file dependency is not spotted by ccache when deciding whether or not to rebuild embedded.o. This results in builds that contain an outdated version of the embedded image when ccache is used. Reported-by: Tim 'Shaggy' Bielawa <tbielawa@jabber.org> Reported-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-01[comboot] Match version strings to SYSLINUX styleDaniel Verkamp1-2/+2
In the actual SYSLINUX suite's comboot implementation, the version string is prefixed by CR LF, and the copyright string has a leading space. Some tools (specifically HDT) assume these padding characters exist, so we should probably return strings in a similar format. Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-02-24[vxge] Add support for X3100 series 10GbE Server/Storage AdapterMasroor Vettuparambil10-0/+9386
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@neterion.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-24[undi] Ensure only one UNDI instance is loadedStefan Hajnoczi1-0/+12
Loading multiple UNDI instances would be useful in systems that have several network cards with vendor PXE ROMs. However, we cannot rely on UNDI ROMs working correctly with multiple instances loaded simultaneously. The gPXE UNDI driver supports the following multi-NIC configurations: 1. Chainloading undionly.kpxe on a specific NIC. 2. Loading the UNDI driver for the first probed device and ignoring all other UNDI devices in the system. This patch refuses to probe additional UNDI devices so there can never be multiple instances of UNDI loaded. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-22[iscsi] Fix interoperability with QNAP TS-639ProDanny Volkind1-3/+10
Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-02-13[util] Detect genisoimage as mkisofs replacementStefan Hajnoczi1-1/+11
Debian based systems may have genisoimage(1) instead of mkisofs(1). They are command-line compatible so the util/geniso script should be able to choose either one. This patch also changes the use of the mkisofs quiet (-q) flag to its long form (-quiet). This should be compatible with more versions of cdrtools and cdrkit. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-13[hermon] Change hermon_alloc_icm() to conform to ConnectX2 requirementsItay Gazit1-16/+58
Align each ICM member alloc to the member size instead of page size. Increase multicast table size to 128. Signed-off-by: Itay Gazit <itaygazit@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-03[shell_banner] Avoid printing Ctrl-B prompt if BANNER_TIMEOUT <= 0Marty Connor1-0/+4
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-02[release] Update version to 1.0.0+ post releaseMarty Connor1-1/+1
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-02[release] Update version to 1.0.0 for releasev1.0.0Marty Connor1-1/+1
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[proto] Remove unsupported NMB protocolStefan Hajnoczi5-137/+0
The NMB protocol code came from legacy Etherboot and was never updated to work as a gPXE protocol. There has been no demand for this protocol, so this patch removes it. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[proto] Remove unsupported IGMP protocolStefan Hajnoczi4-211/+0
The IGMP code came from legacy Etherboot and was never updated to work as a gPXE protocol. There has been no demand for this protocol, so this patch removes it. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[proto] Remove unsupported NFS protocolStefan Hajnoczi6-685/+1
The NFS protocol code came from legacy Etherboot and was never updated to work as a gPXE protocol. There has been no demand for this protocol, so this patch removes it. I have an unfinished NFSv3 over TCP implementation for gPXE that can be used as the base for new work, should we want to resurrect this protocol. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[proto] Remove unsupported FSP protocolStefan Hajnoczi2-244/+0
The FSP protocol code came from legacy Etherboot and was never updated to work as a gPXE protocol. There has been no demand for this protocol, so this patch removes it. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[prefix] Remove unsupported ELF preficesStefan Hajnoczi5-514/+0
The .elf, .elfd, .lmelf, and .lmelfd prefices were brought over from legacy Etherboot and they do not build in gPXE. This patch removes the ELF prefices. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[prefix] Remove unsupported .exe prefixStefan Hajnoczi2-42/+0
The unfinished .exe prefix was brought over from legacy Etherboot. There has been no demand for .exe images so this patch removes the prefix. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[prefix] Remove unsupported .com prefixStefan Hajnoczi2-47/+0
The DOS .com prefix was brought over from legacy Etherboot but does not build. There has been no demand for .com images so this patch removes the prefix. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-31[prefix] Remove .bImage in favor of .lkrnStefan Hajnoczi2-612/+0
The .lkrn prefix allows gPXE to be loaded as a Linux bzImage. The bImage prefix was carried over from legacy Etherboot and does not build. This patch removes the .bImage prefix, use .lkrn instead. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-27[http] GET / if URI doesn't contain a pathJoshua Oreman1-1/+2
Commit 3d9dd93 introduced a regression in HTTP: if a URI without a path is specified (e.g. http://netboot.me), we send the empty string as our GET request. Reintroduce an extra slash when uri->path is NULL, to turn this into the expected GET /. Reported-by: Kyle Kienapfel <doctor.whom@gmail.com> Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-27[uri] Handle an empty unparse_uri() result properlyJoshua Oreman1-4/+5
Previously, if none of the URI parts requested existed in the passed URI, unparse_uri() would not touch the destination buffer at all; this could lead to use of uninitialized data. Fix by setting buf[0] = '\0' before unparsing whenever we have room to do so. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-26[release] Update version to 1.0.0-rc1+ post releaseMarty Connor1-1/+1
2010-01-26[release] Update version to 1.0.0-rc1 for releasev1.0.0-rc1Marty Connor1-4/+4
2010-01-25[rtl818x] Remove broken mmio register supportStefan Hajnoczi1-3/+0
The rtl818x driver uses programmed I/O but has a fallback to memory-mapped I/O registers. The fallback currently will not work since the registers are accessed using inl()/outl() programmed I/O functions in the driver. This patch removes the fallback to we fail cleanly when programmed I/O is not possible. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-25[natsemi] Convert stray mmio readl() to pio inl()Stefan Hajnoczi1-1/+1
This driver uses programmed I/O to access hardware registers. There is a stray memory-mapped I/O read on a programmed I/O address. Perhaps this is an artifact of porting the driver. Fix this by converting it to programmed I/O. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-24[pxe] Introduce PXE exit hook for NBP chainingShao Miller6-1/+112
It might be the case that we wish to chain to an NBP without being "in the way". We now implement a hook in our exit path for gPXE *.*pxe build targets. The hook is a pointer to a SEG16:OFF16 which we try to jump to during exit. By default, this pointer results in the usual exit path. We also implement the "pxenv_file_exit_hook" PXE API routine to allow the user to specify an alternate SEG16:OFF16 to jump to during exit. Unfortunately, this additional PXE extension has a cost in code size. Fortunately, a look at the size difference for a gPXE .rom build target shows zero size difference after compression. The routine is documented in doc/pxe_extensions as follows: FILE EXIT HOOK Op-Code: PXENV_FILE_EXIT_HOOK (00e7h) Input: Far pointer to a t_PXENV_FILE_EXIT_HOOK parameter structure that has been initialized by the caller. Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The Status field in the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx constants. Description:Modify the exit path to jump to the specified code. Only valid for pxeprefix-based builds. typedef struct s_PXENV_FILE_EXIT_HOOK { PXENV_STATUS_t Status; SEGOFF16_t Hook; } t_PXENV_FILE_EXIT_HOOK; Set before calling API service: Hook: The SEG16:OFF16 of the code to jump to. Returned from API service: Status: See PXENV_STATUS_xxx constants. Requested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-21[dhcp] Keep multiple DHCP offers received, and use them intelligentlyJoshua Oreman1-86/+228
Instead of keeping only the best IP and PXE offers, store all of them, and pick the best to use just before a request is sent. This allows priority differentiation to work even when lower-priority offers provide PXE options, and improves robustness at sites with broken PXE servers intermingled with working ones: when a ProxyDHCP request times out, instead of giving up, we try the next PXE offer we've received. It also allows us to avoid breaking up combined IP+PXE offers, which can be important with some firewall configurations. This behavior matches that of most vendor PXE ROMs. Store a reference to the DHCPOFFER packet in the offer structure, so that when registering settings after a successful ACK we can register the proxy PXE settings we originally received; this removes the need for a nonstandard duplicate REQUEST/ACK to port 67 of proxy servers like dnsmasq that provide PXE options in the OFFER. Total cost: 450 bytes uncompressed. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-21[pci] Save and restore PCI command registerBernhard Kohl1-0/+5
This seems to be necessary for some types of PCI devices. We had problems when using gPXE in KVM virtual machines with direct PCI device access. Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Modified-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[ftp] User and password URI support for the FTP protocolgL2n30Y06arv21-2/+24
The default user and password are used for anonymous FTP by default. This patch adds support for an explicit user name and password in an FTP URI: imgfetch ftp://user:password@server.com/path/to/file Edited-by: Stefan Hajnoczi <stefanha@gmail.com>. Bugs are my fault. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[uri] Decode/encode URIs when parsing/unparsingJoshua Oreman7-93/+155
Currently, handling of URI escapes is ad-hoc; escaped strings are stored as-is in the URI structure, and it is up to the individual protocol to unescape as necessary. This is error-prone and expensive in terms of code size. Modify this behavior by unescaping in parse_uri() and escaping in unparse_uri() those fields that typically handle URI escapes (hostname, user, password, path, query, fragment), and allowing unparse_uri() to accept a subset of fields to print so it can be easily used to generate e.g. the escaped HTTP path?query request. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[settings] Add automagic "netX" settings block for last opened netdevJoshua Oreman1-1/+10
A script loaded via autoboot may want to get some of the settings (MAC address, IP address, et cetera) for the interface via which it was loaded, in order to pass them to the operating system. Previously such a script had no way to determine what to put in the X of ${netX/foo}. Solve this problem by transparently forwarding accesses to the real settings associated with the most recently opened network device, so scripts in this situation can say literally ${netX/foo} and get the foo setting they want. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[prefix] Add .xrom prefix for a ROM that loads itself by PCI accessesJoshua Oreman6-22/+409
The standard option ROM format provides a header indicating the size of the entire ROM, which the BIOS will reserve space for, load, and call as necessary. However, this space is strictly limited to 128k for all ROMs. gPXE ameliorates this somewhat by reserving space for itself in high memory and relocating the majority of its code there, but on systems prior to PCI3 enough space must still be present to load the ROM in the first place. Even on PCI3 systems, the BIOS often limits the size of ROM it will load to a bit over 64kB. These space problems can be solved by providing an artificially small size in the ROM header: just enough to let the prefix code (at the beginning of the ROM image) be loaded by the BIOS. To the BIOS, the gPXE ROM will appear to be only a few kilobytes; it can then load the rest of itself by accessing the ROM directly using the PCI interface reserved for that task. There are a few problems with this approach. First, gPXE needs to find an unmapped region in memory to map the ROM so it can read from it; this is done using the crude but effective approach of scanning high memory (over 0xF0000000) for a sufficiently large region of all-ones (0xFF) reads. (In x86 architecture, all-ones is returned for accesses to memory regions that no mapped device can satisfy.) This is not provably valid in all situations, but has worked well in practice. More importantly, this type of ROM access can only work if the PCI ROM BAR exists at all. NICs on physical add-in PCI cards generally must have the BAR in order for the BIOS to be able to load their ROM, but ISA cards and LAN-on-Motherboard cards will both fail to load gPXE using this scheme. Due to these uncertainties, it is recommended that .xrom only be used when a regular .rom image is infeasible due to crowded option ROM space. However, when it works it could allow loading gPXE images as large as a flash chip one could find - 128kB or even higher. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[config] Make PXE stack a compile-time optionJoshua Oreman11-48/+135
For extremely tight space requirements and specific applications, it is sometimes desirable to create gPXE images that cannot provide the PXE API functionality to client programs. Add a configuration header option, PXE_STACK, that can be removed to remove this stack. Also add PXE_MENU to control the PXE boot menu, which most uses of gPXE do not need. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[pxe] Support cached DHCP packets in .kkpxe imagesJoshua Oreman2-0/+72
If we don't unload the PXE stack before executing gPXE, automatically take advantage of the cached DHCPACK that the underlying/parent PXE stack can provide. If that cached DHCPACK contains option 175.178, or the user sets the use-cached setting before invoking DHCP, the real DHCP request will be skipped and the cached DHCPACK will be used for network configuration. Otherwise, the cached settings block is thrown away as soon as a fresh one is acquired. Signed-off-by: Marty Connor <mdc@etherboot.org>