summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* [tftp] Remove unnecessary delay when opening a connectionStefan Hajnoczi2010-01-151-2/+9
| | | | | | | | | | | | | The retry timer is used to retransmit TFTP packets lost on the network, and to start a new connection. There is an unnecessary delay while waiting for name resolution because the timer period is fixed and cannot be shortened when name resolution completes. This patch keeps the timer period at zero while name resolution takes place so that no time is lost once before sending the first packet. Reported-by: Thomas Horsten <thomas@horsten.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [tftp] Allow fetching larger files by wrapping block numberStefan Hajnoczi2010-01-151-3/+6
| | | | | | | | | This patch adds TFTP support for files larger than 65535 blocks by wrapping the 16-bit block number. Reported-by: Mark Johnson <johnson.nh@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [dhcp] Assume PXE options are in DHCPOFFER only if boot menu is includedJoshua Oreman2010-01-151-2/+2
| | | | | | | | | | | | | IBM's Tivoli Provisioning Manager for OS Deployment, when acting as a ProxyDHCP server, sends an initial offer with a vendor class of "PXEClient" and vendor-encapsulated options that have nothing to do with PXE. To differentiate between this case and the case of a ProxyDHCP server that sends all PXE options in its initial offer, modify gPXE to check for the presence of an encapsulated PXE boot menu option (43.9) instead of simply checking for the existence of any encapsulated options at all. This is the same check used by the Intel vendor PXE ROM. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [dhcp] Accept ProxyDHCP replies of type DHCPOFFERJoshua Oreman2010-01-151-1/+1
| | | | | | | | | | The PXE standard provides examples of ProxyDHCP responses being encoded both as type DHCPOFFER and DHCPACK, but currently we only accept DHCPACKs. Since there are PXE servers in existence that respond to ProxyDHCPREQUESTs with DHCPOFFERs, modify gPXE's ProxyDHCP pruning logic to treat both types of responses equally. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [skge] Note correct author of akge driverThomas Miletich2010-01-141-4/+5
| | | | | | | | | The previous [skge] commit should have been recorded as authored by Thomas Miletich <thomas.miletich@gmail.com> I mistakenly committed it improperly after fixing a merge issue. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [skge] Add driver for skge NICsMarty Connor2010-01-143-0/+5095
| | | | | | | | | | | | | | This code is based on the linux skge driver. It supports Marvell Yukon and SysKonnect Gigabit chipsets. The code is based on code Michael Decker <mrd999@gmail.com> wrote for Google Summer of Code 2008. Support for dual-port cards is untested. The code, however, was left in. In my opinion it's easier to fix the code if we need to, instead of having to add support for it from scratch. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [util] Add diffsize.pl utility for generating diffs of object sizesJoshua Oreman2010-01-141-0/+101
| | | | | | This is useful when comparing size optimizations. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [makefile] Allow .sizes target to work with funny-named objectsJoshua Oreman2010-01-141-1/+1
| | | | | | | | | | | | | The bin/xxx.sizes targets examine the list of obj_ symbols in bin/xxx.tmp to determine which objects to measure the size of. These symbols have been normalized to C identifiers, so the result is an error message from `size' when examining a target that includes objects that were originally named with hyphens. Fix by turning obj_foo_bar into $(wildcard bin/foo?bar.o) instead of bin/foo_bar.o. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [dhcp] Append new DHCP options versus prependShao Miller2010-01-141-4/+15
| | | | | | | | | | | | | Change the behaviour for adding DHCP options into a DHCP packet so that we now append options, rather than insert them in front of whatever options might already be present. Apparently, the DHCP relay logic on a Nortel 470-48T layer 2 switch cares about the order of DHCP options. If we build a DHCP packet pre-populated with some options, their order will now be preserved, except for encapsulated options. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [dhcp] Ensure message type is first DHCP optionShao Miller2010-01-141-0/+1
| | | | | | | | | | | Apparently, the DHCP relay logic on a Nortel 470-48T layer 2 switch cares about the order of DHCP options. Specifically, it requires that the DHCP message type option be the first option present in the DHCP packet. We achieve this by having this option appear first in our dhcp_request_options_data array, which pre-populates DHCP requests. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [prefix] Add .hrom prefix for a ROM that loads high under PCI3 without PMMJoshua Oreman2010-01-144-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | gPXE currently takes advantage of the feature of PCI3.0 that allows option ROMs to relocate the bulk of their code to high memory and so take up only a small amount of space in the option ROM area. Currently, the relocation can only take place if the BIOS's implementation of PMM can be made to return blocks aligned to an even megabyte, because of the A20 gate. AMI BIOSes, in particular, will not return allocations that gPXE can use. Ameliorate the situation somewhat by adding a prefix, .hrom, that works identically to .rom except in the case that PMM allocation fails. Where .rom would give up and place itself entirely in option ROM space, .hrom moves to a block (assumed free) at HIGHMEM_LOADPOINT = 4MB. This allows for the use of larger gPXE ROMs than would otherwise be possible. Because there is no way to check that the area at HIGHMEM_LOADPOINT is really free, other devices using that memory during the boot process will cause failure for gPXE, the other device, or both. In practice such conflicts will likely not occur, but this prefix should still be considered EXPERIMENTAL. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [myri10ge] Native driver for Myricom 10Gb Ethernet NICsGlenn Brown2010-01-144-0/+1557
| | | | | | | | | | This driver supports all current Myricom 10 gigabit Ethernet NICs. It was written from scratch for gPXE by Glenn Brown <glenn@myri.com>, referenencing Myricom's Linux and EFI drivers, with permission. Signed-off-by: Glenn Brown <glenn@myri.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [pci] Add PCI_COMMAND_INTX_DISABLEGlenn Brown2010-01-141-0/+1
| | | | | | | | Taken from Linux /usr/include/linux/pci.h . Signed-off-by: Glenn Brown <glenn@myri.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [forcedeth] Add support for 10de:054c nforce 630a, MCP 67Thomas Horsten2010-01-141-0/+2
| | | | | | Tested-by: Boudhayan Gupta <bg13.ina@gmail.com> Signed-off-by: Thomas Horsten <thomas@horsten.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [802.11] Allow connecting to spectrum managed networksJoshua Oreman2010-01-051-6/+0Star
| | | | | | | | | | | | | | Contrary to the IEEE specification, some access points apparently set the Spectrum Mgmt bit in the capabilities field even when broadcasting on a 2.4GHz band that does not require spectrum management. Allow gPXE to attempt to connect to such networks; if spectrum management is really required, our advertisement of capabilities not including it will result in an association failure. Reported-by: Peter Meyer <residue@xmail.net> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [config] Enable WPA2 by defaultJoshua Oreman2010-01-051-1/+1
| | | | | | | Wireless gPXE images are already so large that user-friendliness seems to trump ROM-size friendliness in this case. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [wpa] Add CCMP backend (new AES-based cryptosystem)Joshua Oreman2010-01-054-0/+535
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [wpa] Add TKIP backend (legacy RC4-based cryptosystem)Joshua Oreman2010-01-054-1/+593
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [wpa] Add pre-shared key frontend (WPA "Personal" with just a passphrase)Joshua Oreman2010-01-053-0/+127
| | | | | Modified-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [wpa] Add general support for WPA-protected 802.11 networksJoshua Oreman2010-01-053-0/+1477
| | | | | Modified-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [eapol] Add basic support for 802.1X EAP over LANsJoshua Oreman2010-01-054-0/+199
| | | | | | | | | EAPOL is a container protocol that can wrap either EAP packets or 802.11 EAPOL-Key frames. For cleanliness' sake, add a stub that strips the framing and sends packets off to the appropriate handler if it is compiled in. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [802.11] Add support for WEP-protected networksJoshua Oreman2010-01-054-0/+317
| | | | | | | | WEP is a highly flawed cryptosystem, barely better than no encryption at all, but many people still use it. It does have the advantage of being very simple and small in code size. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [iwmgmt] Add wireless management commands and text for common errorsJoshua Oreman2010-01-058-0/+490
| | | | | | | | Add commands `iwstat' (to list 802.11-specific status information for 802.11 devices) and `iwlist' (to scan for available networks and print a list along with security information). Signed-off-by: Marty Connor <mdc@etherboot.org>
* [802.11] Add core support for detecting and using encrypted networksJoshua Oreman2010-01-056-203/+1127
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [crypto] Add a placeholder for a proper random number generatorJoshua Oreman2010-01-052-0/+57
| | | | | | Currently it just calls random(). Signed-off-by: Marty Connor <mdc@etherboot.org>
* [crypto] Add AES key-wrap mode (RFC 3394)Joshua Oreman2010-01-052-0/+126
| | | | | | | The unwrapping half is used by WPA2 code; the wrapping half is currently unused. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [crypto] Make AES context size and algorithm structure externally availableJoshua Oreman2010-01-052-12/+18
| | | | | | This is required to support modes of AES beyond cipher-block chaining. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [crypto] Add parentheses around len argument in blocksize assertJoshua Oreman2010-01-051-2/+2
| | | | | | | | This fixes an issue where passing a length as a compound expression (e.g. using `hdrlen + datalen') would trigger compiler warnings and potentially precedence-related errors. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [digest] Add HMAC-SHA1 based pseudorandom function and PBKDF2Joshua Oreman2010-01-052-0/+174
| | | | | | | Both of these routines are used by 802.11 WPA, but they are generic and could be needed by other protocols as well. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [cipher] Add the ARC4 stream cipherJoshua Oreman2010-01-052-0/+153
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [digest] Add generic CRC32 functionJoshua Oreman2010-01-052-0/+64
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [e1000] Remove deprecated IRQ_FORCE action from e1000_irq()Thomas Miletich2010-01-051-23/+4Star
| | | | | | | The gPXE driver API does not have a "force interrupt" function. Remove legacy code. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [build] Pad .hd image type to 32 KBStefan Hajnoczi2009-12-151-1/+1
| | | | | | | | | | | | The disk partition prefix code in hdprefix.S reads the gPXE image in tracks, not individual sectors. This means it will attempt to read beyond the end of the image if the .hd image type is not padded to 32 KB. This issue is affects virtualization software which may execute a .hd or .usb image file directly - effectively running a machine with a tiny disk containing just the gPXE image. Boot will fail when gPXE tries to read beyond the end of disk.
* [multiboot] Build memory map after shutting down and unhiding gPXEStefan Hajnoczi2009-12-141-2/+6
| | | | | | | | | | | The Multiboot memory map needs to be built after unhiding gPXE and downloaded images from memory. Solaris faults during boot when trying to access the ramdisk, which is hidden from the memory map while gPXE is executing. This issue is fixed by using the memory map from after gPXE unhides itself. Reported-by: Moinak Ghosh <moinakg@belenix.org> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [settings] Add Bus ID settingShao Miller2009-12-143-4/+21
| | | | | | | | Users can find the bus type and PCI IDs for a network interface with: netX/busid Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [eepro100] Add missing FILE_LICENCE() to eepro100.hThomas Miletich2009-12-141-0/+2
| | | | Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [e1000] Enable interrupts in a more UNDI compatible wayThomas Miletich2009-11-251-2/+1Star
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [eepro100] Convert to native gPXE APIThomas Miletich2009-11-222-639/+1197
| | | | | | | | | | | | This version is Based on Michael Decker's GSoC 2008 code. A number cleanups and fixes were applied. Earlier-version-reviewed-by: Marty Connor <mdc@etherboot.org> Earlier-version-tested-by: Marty Connor <mdc@etherboot.org> Earlier-version-tested-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [e1000] Use the alternate MAC in NVRAM when availableAlex Williamson2009-11-222-3/+51
| | | | | | | | | | | | The 82571 supports an alternate MAC address location in NVRAM. When this is set, use this for the MAC rather than the default physical MAC address. Ported from linux-2.6.git 93ca161027eb6a1761fb674ad7b995aedccf5f6e Signed-off-by: Alex Williamson <alex.williamson@hp.com> Tested-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [e1000] Implement zero-copy receiveThomas Miletich2009-11-221-63/+83
| | | | | Co-Authored by: Marty Connor <mdc@etherboot.org> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [e820mangler] Add missing CLC ins. for success pathShao Miller2009-11-211-0/+1
| | | | | | | The get_underlying_e820 function should return with CF unset on success. Reported-by: Timothy Stack <tstack@vmware.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [uri] Fix outdated comment in parse_uri()sobtwmxt2009-11-211-1/+1
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [linker] Add mechanism for subsystem-dependent configuration optionsJoshua Oreman2009-11-213-0/+24
| | | | | | | | | | | | | | | | | | | | It is often the case that some module of gPXE is only relevant if the subsystem it depends on is already being included. For instance, commands to manage wireless interfaces are quite useless if no compiled-in driver has pulled in the wireless networking stack. There may be a user-modifiable configuration options for these dependent modules, but even if enabled, they should not be included when they would be useless. Solve this by allowing the creation of config_subsystem.c, for configuration directives like those in the global config.c that should only be considered when subsystem.c is included in the final gPXE build. For consistency, move core/config.c to the config/ directory, where the other config_subsystem.c files will eventually reside. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [linker] Expand and correct symbol requirement macrosJoshua Oreman2009-11-214-10/+98
| | | | | | | | | | | | | | | REQUIRE_SYMBOL() formerly used a formulation of symbol requirement that would allow a link to succeed despite lacking a required symbol, because it did not introduce any relocations. Fix by renaming it to REQUEST_SYMBOL() (since the soft-requirement behavior can be useful) and add a REQUIRE_SYMBOL() that truly requires. Add EXPORT_SYMBOL() and IMPORT_SYMBOL() for REQUEST_SYMBOL()-like behavior that allows one to make use of the symbol, by combining a weak external on the symbol itself with a REQUEST_SYMBOL() of a second symbol. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [pxebs] Consistently interpret PXE type field as little-endianJoshua Oreman2009-11-211-1/+1
| | | | | | | | The PXE menu code also treated the type as big-endian, which went unnoticed until the first fix because its ntohs() was matched by a htons() in the PXE boot server discovery code. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [int13] Guard against BIOSes that "fix" the drive countMichael Brown2009-11-181-6/+48
| | | | | | | | | | | | | | | | Some BIOSes (observed with an AMI BIOS on a SunFire X2200) seem to reset the BIOS drive counter at 40:75 after a failed boot attempt. This causes problems when attempting a Windows direct-to-iSCSI installation: bootmgr.exe calls INT 13,0800 and gets told that there are no hard disks, so never bothers to read the MBR in order to obtain the boot disk signature. The Windows iSCSI initiator will detect the iBFT and connect to the target, and everything will appear to work except for the error message "This computer's hardware may not support booting to this disk. Ensure that the disk's controller is enabled in the computer's BIOS menu." Fix by checking the BIOS drive counter on every INT 13 call, and updating it whenever necessary.
* [int13] Fix number of sectors returned by INT 13,15Michael Brown2009-11-181-2/+6
| | | | | INT 13,15 should return the number of sectors, not the number of cylinders.
* [autoboot] Ensure that an error message is always printed for a boot failureMichael Brown2009-11-183-18/+16Star
| | | | | | | The case of an unsupported SAN protocol will currently not result in any error message. Fix by printing the error message at the top level using strerror(), rather than using hard-coded error messages in the error paths.
* [linda] Re-import the latest register definitionsMichael Brown2009-11-161-6/+4Star
| | | | | Two registers have been renamed, and a bugfix to qib_genbits.pl removes a harmless excess padding field.
* [susieq] Update qib_genbits.pl to handle SusieQ definitionsMichael Brown2009-11-161-4/+24
| | | | | | The latest RTL-generated register lists include (mostly redundant) xxx_MSB values alongside xxx_LSB and xxx_RMASK, and also include default register values.