aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2010-01-20[dhcp] Add generic facility for using cached network settingsJoshua Oreman4-2/+122
When a DHCP session is started (using autoboot or a command-line `dhcp net0'), check whether the new setting use-cached (DHCP option 175.178) is TRUE; if so, skip DHCP and rely on currently registered settings. This lets one combine a static IP with autoboot. Before checking the use-cached setting, call a weak get_cached_dhcpack() hook that can be implemented by particular builds of gPXE supporting some fashion of retrieving a cached DHCPACK packet. If one is available, it is registered as an options source, and then either that packet's option 175.178 or the user's prior manual use-cached setting can allow skipping duplicate DHCP. Using cached packets is not the default because DHCP servers are often configured to give gPXE different options than they give a vendor PXE client; in order to break the infinite loop of PXE chaining, one would need to load a gPXE with an embedded image that does something more than autoboot. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[pxe] Separate parent PXE API caller from UNDINET driverJoshua Oreman6-216/+263
Calling the parent PXE stack (the stack that loaded us, for undionly.kkpxe) can be useful for more than UNDI calls; for instance, it lets us get cached DHCP packets to avoid re-DHCP when working with embedded images. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20[linker] Add safe weak symbol macrosJoshua Oreman1-0/+36
Weak symbols are a useful tool in eliminating unnecessary dependencies between object files, but they are somewhat dangerous because one must remember to test the weak symbol against NULL before using it. To rectify that, add macros for declaring weak functions that will return a default value inline if the file defining them is not available at link time. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-18[contrib] Add README file to rom-o-maticMarty Connor1-0/+62
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-18[tftp] Abort requests with error code 0Stefan Hajnoczi1-2/+2
There is no defined error code for aborting a request but 0 is commonly used. This patch switches the abort request error code from TFTP_ERR_UNKNOWN_TID (5) to 0. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-17[tftp] Make TFTP size requests abort transfer with an errorThomas Horsten2-5/+81
pxenv_tftp_get_fsize is an API call that PXE clients can call to obtain the size of a remote file. It is implemented by starting a TFTP transfer with pxe_tftp_open, waiting for the response and then stopping the transfer with pxe_tftp_close(). This leaves the session hanging on the TFTP server and it will try to resend the packet repeatedly (verified with tftpd-hpa) until it times out. This patch adds a method "tftpsize" that will abort the transfer after the first packet is received from the server. This will terminate the session on the server and is the same behaviour as Intel's PXE ROM exhibits. Together with a qemu patch to handle the ERROR packet (submitted to qemu's mailing list), this resolves a specific issue where booting pxegrub with qemu's TFTP server would be slow or hang. I've tested this against qemu's tftp server and against my normal boot infrastructure (tftpd-hpa). Booting pxegrub and loading extra files now produces a trace similar to Intel's PXE client and there are no spurious retransmits from tftpd any more. Signed-off-by: Thomas Horsten <thomas@horsten.com> Signed-off-by: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-17[contrib] Add .hrom format to rom-o-maticMarty Connor1-0/+1
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-16[contrib] Add rom-o-matic to contribMarty Connor41-0/+1854
2010-01-16[contrib] Move most contrib content to a separate repositoryMarty Connor152-20360/+9
Most of the content that was previously in this directory has been moved to a separate git repository: http://git.etherboot.org/?p=contrib.git;a=summary or the Etherboot Project wiki: http://etherboot.org/
2010-01-15[sanboot] Prevent leaking a stack reference for "keep-san" AoEStefan Hajnoczi1-21/+33
When the "keep-san" option is used, the function is exited without unregistering the stack allocated int13h drive. To prevent a dangling pointer to the stack, these structs should be heap allocated. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-15[tftp] Remove unnecessary delay when opening a connectionStefan Hajnoczi1-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>
2010-01-15[tftp] Allow fetching larger files by wrapping block numberStefan Hajnoczi1-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>
2010-01-14[dhcp] Assume PXE options are in DHCPOFFER only if boot menu is includedJoshua Oreman1-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>
2010-01-14[dhcp] Accept ProxyDHCP replies of type DHCPOFFERJoshua Oreman1-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>
2010-01-14[skge] Note correct author of akge driverThomas Miletich1-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>
2010-01-14[skge] Add driver for skge NICsMarty Connor3-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>
2010-01-14[3c90xutil] Update bromutil.c and cromutil.c.Thomas Miletich5-188/+582
bromutil.c has been updated with a command to "fix" 3c905B NICs so that EEPROMs larger than 8K may be used. cromutil.c has been replaced with an updated version that has been included in etherboot-5.4 for some time now. See README for usage. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-14[util] Add diffsize.pl utility for generating diffs of object sizesJoshua Oreman1-0/+101
This is useful when comparing size optimizations. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-14[makefile] Allow .sizes target to work with funny-named objectsJoshua Oreman1-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>
2010-01-14[dhcp] Append new DHCP options versus prependShao Miller1-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>
2010-01-14[dhcp] Ensure message type is first DHCP optionShao Miller1-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>
2010-01-14[prefix] Add .hrom prefix for a ROM that loads high under PCI3 without PMMJoshua Oreman4-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>
2010-01-14[myri10ge] Native driver for Myricom 10Gb Ethernet NICsGlenn Brown4-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>
2010-01-14[pci] Add PCI_COMMAND_INTX_DISABLEGlenn Brown1-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>
2010-01-14[forcedeth] Add support for 10de:054c nforce 630a, MCP 67Thomas Horsten1-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>
2010-01-05[802.11] Allow connecting to spectrum managed networksJoshua Oreman1-6/+0
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>
2010-01-05[config] Enable WPA2 by defaultJoshua Oreman1-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>
2010-01-05[wpa] Add CCMP backend (new AES-based cryptosystem)Joshua Oreman4-0/+535
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[wpa] Add TKIP backend (legacy RC4-based cryptosystem)Joshua Oreman4-1/+593
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[wpa] Add pre-shared key frontend (WPA "Personal" with just a passphrase)Joshua Oreman3-0/+127
Modified-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[wpa] Add general support for WPA-protected 802.11 networksJoshua Oreman3-0/+1477
Modified-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[eapol] Add basic support for 802.1X EAP over LANsJoshua Oreman4-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>
2010-01-05[802.11] Add support for WEP-protected networksJoshua Oreman4-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>
2010-01-05[iwmgmt] Add wireless management commands and text for common errorsJoshua Oreman8-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>
2010-01-05[802.11] Add core support for detecting and using encrypted networksJoshua Oreman6-203/+1127
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[crypto] Add a placeholder for a proper random number generatorJoshua Oreman2-0/+57
Currently it just calls random(). Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[crypto] Add AES key-wrap mode (RFC 3394)Joshua Oreman2-0/+126
The unwrapping half is used by WPA2 code; the wrapping half is currently unused. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[crypto] Make AES context size and algorithm structure externally availableJoshua Oreman2-12/+18
This is required to support modes of AES beyond cipher-block chaining. Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[crypto] Add parentheses around len argument in blocksize assertJoshua Oreman1-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>
2010-01-05[digest] Add HMAC-SHA1 based pseudorandom function and PBKDF2Joshua Oreman2-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>
2010-01-05[cipher] Add the ARC4 stream cipherJoshua Oreman2-0/+153
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[digest] Add generic CRC32 functionJoshua Oreman2-0/+64
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05[e1000] Remove deprecated IRQ_FORCE action from e1000_irq()Thomas Miletich1-23/+4
The gPXE driver API does not have a "force interrupt" function. Remove legacy code. Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-12-15[build] Pad .hd image type to 32 KBStefan Hajnoczi1-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.
2009-12-14[multiboot] Build memory map after shutting down and unhiding gPXEStefan Hajnoczi1-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>
2009-12-14[settings] Add Bus ID settingShao Miller3-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>
2009-12-14[eepro100] Add missing FILE_LICENCE() to eepro100.hThomas Miletich1-0/+2
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2009-11-25[e1000] Enable interrupts in a more UNDI compatible wayThomas Miletich1-2/+1
Signed-off-by: Marty Connor <mdc@etherboot.org>