summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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.
* [linda] Wait up to 20us for link state to updateMichael Brown2009-11-162-0/+35
| | | | | | | | | | Some subnet managers expect the GetResponse from a SetPortInfo MAD to contain the new link state. The transition is not immediate, so we often end up returning the previous link state. This can cause the SM to fail to activate the port. Fix by waiting for up to 20us for the link state transition to take effect.
* [ipoib] Mask out non-QPN bits in the IPoIB destination MAC when sendingMichael Brown2009-11-163-10/+13
| | | | | | | The first byte of the IPoIB MAC address is used for flags indicating support for "connected mode". Strip out the non-QPN bits of the first dword when constructing the address vector for transmitted IPoIB packets, so as not to end up passing an invalid QPN in the BTH.
* [ipoib] Always set the "full membership" bit in the IPv4 broadcast GIDMichael Brown2009-11-162-1/+5
| | | | | The SM always creates the IPoIB multicast groups with full membership partition keys.
* [infiniband] Rename IB_PKEY_NONE to IB_PKEY_DEFAULTMichael Brown2009-11-163-3/+3
| | | | There is no such thing as a non-existent partition.
* [infiniband] Report IB link status as IPoIB netdevice statusMichael Brown2009-11-163-5/+41
|
* [infiniband] Include hostname in node description, if availableMichael Brown2009-11-161-1/+7
|
* [infiniband] Make node description invariant across all portsMichael Brown2009-11-161-4/+5
| | | | | | | IBA section 14.2.5.2 states that "the contents of the NodeDescription attribute are the same for all ports on a node". Satisfy this by using the HCA GUID rather than the port GUID to form the node description string.
* [ipv4] Ignore non-open net devices when performing routingMichael Brown2009-11-161-0/+2
| | | | | | | | | We do not discard routing table entries when closing an interface. It is plausible that multiple interfaces may be on the same physical network; if so, then we may end up in a situation whereby outbound packets attempt to route via a closed interface. Fix by ignoring non-open net devices in ipv4_route().
* [ipv4] Allow calculation of default subnet maskMichael Brown2009-11-161-11/+11
| | | | | | | | | | | | | ipv4.c calculates the default subnet mask before calling fetch_ipv4_setting() to retrieve the configured subnet mask (if any). However, as of commit 612f4e7 "[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()", fetch_ipv4_setting() will zero the IP address if the setting does not exist, rather than leaving it unaltered. Fix by fetching the setting first and calculating the default subnet mask only if necessary.
* [ipv4] Use a zero address to indicate "no gateway", rather than INADDR_NONEMichael Brown2009-11-162-8/+7Star
| | | | | | | | | | | | | | | ipv4.c uses a gateway address of INADDR_NONE to represent "no gateway". It initialises the gateway address to INADDR_NONE before calling fetch_ipv4_setting() to retrieve the configured gateway address (if any). However, as of commit 612f4e7 "[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()", fetch_ipv4_setting() will zero the IP address if the setting does not exist, rather than leaving it unaltered. Fix by using a zero IP address to indicate "no gateway", so that a non-existent gateway address setting will be treated as such.
* [libc] Use only generic errortab entries to match generic errorsMichael Brown2009-11-161-5/+4Star
|
* [sanboot] Extend the "keep-san" option to non-iSCSI SAN protocolsMichael Brown2009-11-045-17/+37
| | | | This disgustingly ugly hack just keeps getting worse.
* [pxebs] Correct endianness of PXE typeJoshua Oreman2009-10-241-2/+2
| | | | | | | | | | The PXE type field is canonically little-endian, but the pxebs command treats it as big-endian in converting the type number passed on the command line to a field value to search against. Fix, to prevent the necessity of incantations like "pxebs net0 1536" to select menu item #6. Signed-off-by: Michael Brown <mcb30@etherboot.org> Modified-by: Michael Brown <mcb30@etherboot.org>
* [atl1e] Fix compilation on gcc-4.4.1-2.fc11.i586.Joshua Oreman2009-10-241-8/+9
| | | | | | | | | | | | | Error message was: [BUILD] bin/atl1e.oncc1: warnings being treated as errors drivers/net/atl1e.c: In function 'atl1e_get_permanent_address': drivers/net/atl1e.c:1326: error: dereferencing type-punned pointer will break strict-aliasing rules make: *** [bin/atl1e.o] Error 1 Reported-by: Giandomenico De Tullio <ghisha@email.it> Signed-off-by: Michael Brown <mcb30@etherboot.org> Modified-by: Michael Brown <mcb30@etherboot.org>
* [sis190] Hide the ISA bridge's PCI IDs from parserom.plThomas Miletich2009-10-242-4/+9
| | | | | Signed-off-by: Michael Brown <mcb30@etherboot.org> Modified-by: Michael Brown <mcb30@etherboot.org>
* [sis190] Insert forgotten FILE_LICENCE() to sis190.hThomas Miletich2009-10-241-1/+2
| | | | | Signed-off-by: Michael Brown <mcb30@etherboot.org> Modified-by: Michael Brown <mcb30@etherboot.org>
* [sis190] Make 'make allroms' happy.Thomas Miletich2009-10-241-2/+2
| | | | | | | | Remove spaces in 3rd PCI_ROM field. Debugged-by: Marty Connor <mdc@etherboot.org> Reported-by: Giandomenico De Tullio <ghisha@email.it> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [iscsi] Use the "Ethernet-compatible" MAC address in the iBFTMichael Brown2009-10-231-4/+8
|
* [netdevice] Add the concept of an "Ethernet-compatible" MAC addressMichael Brown2009-10-235-6/+84
| | | | | | | | | | | | | | The iBFT is Ethernet-centric in providing only six bytes for a MAC address. This is most probably an indirect consequence of a similar design flaw in the Windows NDIS stack. (The WinOF IPoIB stack performs all sorts of contortions in order to pretend to the NDIS layer that it is dealing with six-byte MAC addresses.) There is no sensible way in which to extend the iBFT without breaking compatibility with programs that expect to parse it. Add the notion of an "Ethernet-compatible" MAC address to our link layer abstraction, so that link layers can provide their own workarounds for this limitation.
* [iscsi] Fix printing of non-existent strings in iBFT debug messagesMichael Brown2009-10-231-1/+2
|
* [release] Update version to 0.9.9+ post releaseMarty Connor2009-10-211-1/+1
|
* [release] Update version to 0.9.9 for releasev0.9.9Marty Connor2009-10-211-2/+2
|
* [zbin] Fix 64-bit compilation warnings for util/zbin.cJoshua Oreman2009-10-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent gcc versions generate more warnings when compiling util/zbin.c on a 64-bit system: util/zbin.c: In function `read_file': util/zbin.c:85: warning: format `%d' expects type `int', but argument 3 has type `size_t' util/zbin.c:91: warning: format `%d' expects type `int', but argument 3 has type `size_t' util/zbin.c: In function `read_zinfo_file': util/zbin.c:119: warning: format `%d' expects type `int', but argument 4 has type `size_t' util/zbin.c: In function `alloc_output_file': util/zbin.c:134: warning: format `%d' expects type `int', but argument 3 has type `size_t' util/zbin.c: In function `process_zinfo_add': util/zbin.c:244: warning: format `%d' expects type `int', but argument 3 has type `size_t' util/zbin.c:266: warning: format `%d' expects type `int', but argument 7 has type `size_t' util/zbin.c:286: warning: format `%#x' expects type `unsigned int', but argument 7 has type `size_t' util/zbin.c: In function `write_output_file': util/zbin.c:348: warning: format `%d' expects type `int', but argument 3 has type `size_t' This patch eliminates these warnings. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [util] Change gensdsk file permissions to include executeMarty Connor2009-10-201-0/+0
| | | | | | src/util/gensdsk is a shell script and should have execute permission. Reported-by: sobtwmxt sobtwmxt@sdf.lonestar.org
* [sis190] Fix for gcc-3.3.3 compilationShao Miller2009-10-181-1/+1
| | | | | | | | | | | | | gcc 3.3.3 gave the following error when compiling sis190.c drivers/net/sis190.c: In function 'sis190_get_mac_addr_from_apc': drivers/net/sis190.c:966: warning: 'isa_bridge' might be used uninitialized in this function make: *** [bin/sis190.o] Error 1 This patch allows error-free compilation. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [zbin] Fix compilation warnings for util/zbin.cThomas Miletich2009-10-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Recent gcc versions generate warnings when compiling util/zbin.c ( tested with gcc-4.3.3 ): util/zbin.c: In function ‘process_zinfo_pack’: util/zbin.c:200: warning: format ‘%#zx’ expects type ‘size_t’, but argument 6 has type ‘long unsigned int’ util/zbin.c: In function ‘process_zinfo_add’: util/zbin.c:257: warning: format ‘%#lx’ expects type ‘long unsigned int’, but argument 4 has type ‘int’ util/zbin.c:266: warning: format ‘%#lx’ expects type ‘long unsigned int’, but argument 4 has type ‘int’ util/zbin.c:266: warning: format ‘%d’ expects type ‘int’, but argument 8 has type ‘long unsigned int’ util/zbin.c:286: warning: format ‘%#lx’ expects type ‘long unsigned int’, but argument 6 has type ‘int’ util/zbin.c:286: warning: format ‘%#lx’ expects type ‘long unsigned int’, but argument 7 has type ‘size_t’ This patch eliminates these warnings. Tested with gcc-4.3.3 on Ubuntu 9.04 and gcc-4.1.2 on Debian Etch. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [ath5k] Save proper cacheline size when fixing PCI configurationJoshua Oreman2009-10-171-1/+2
| | | | | | | | | | | | Some BIOSes set the PCI cacheline size to zero for the card; the ath5k driver fixes it to a reasonable in PCI config space, but failed to correct the internal value it had already read. This resulted in divide-by-zero errors when cacheline-aligning various data structures. Fix by setting the internal cachelsz to a sane value at the same time as we write that value to PCI config space. Signed-off-by: Marty Connor <mdc@etherboot.org>