summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [jme] Fix refill behaviorGuo-Fu Tseng2010-06-131-7/+13
| | | | | | | | | | | After changing the driver to refill after feed, if any error occurs a non-contiguous empty buffer will be introduced in the ring due to my reuse-buffer-when-error implementation. Reported-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ethernet] Move Ethernet MAC address checking routines to ethernet.hMichael Brown2010-06-073-16/+67
| | | | | Originally-fixed-by: Faur Andrei <da3drus@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [eepro100] Add PCI ID for Intel Pro/100 VEErwan Velu2010-06-071-0/+1
| | | | | | Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [doc] Fix comment on Linux/x86 boot protocol pathWu Fengguang2010-06-031-1/+1
| | | | | Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [jme] Add JMicron Ethernet driverGuo-Fu Tseng2010-06-023-0/+2218
| | | | | | | | | | | A new driver for JMicron Ethernet controller. Reviewed-by: Joshua Oreman <oremanj@rwcr.net> Reviewed-by: Michael Brown <mbrown@fensystems.co.uk> Reviewed-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add the "snpnet" driverGeoff Lywood2010-06-0210-4/+724
| | | | | | | | | Add a new network driver that consumes the EFI Simple Network Protocol. Also add a bus driver that can find the Simple Network Protocol that iPXE was loaded from; the resulting behavior is similar to the "undionly" driver for BIOS systems. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Fix whitespace errorsMichael Brown2010-06-011-107/+108
| | | | | | | Fix up the whitespace errors inadvertently introduced by the last-minute rename from the internal QLogic codename to "qib7322". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Fix uninitialized variables warningShao Miller2010-06-011-3/+10
| | | | | | Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [errdb] Add errdb.pl script to build error databaseMichael Brown2010-05-312-0/+109
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Enable automated extraction of error usage reportsMichael Brown2010-05-3122-391/+1499
| | | | | | | Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Remove obsolete pxe_errortab.cMichael Brown2010-05-311-103/+0Star
| | | | | | | strerror() has not been able to use the PXE-only error table since commit 9aa61ad ("Add per-file error identifiers") back in 2007. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Tidy up output of EFI header import scriptMichael Brown2010-05-303-19/+65
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add FILE_LICENCE declarations to EFI header filesMichael Brown2010-05-3040-0/+96
| | | | | | | | Autodetect the BSD licence statement in EFI header files, and add a suitable FILE_LICENCE macro to the version imported into the iPXE tree. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Synchronise EFI header filesMichael Brown2010-05-302-7/+10
| | | | | | | | | | Now that the PACKED macro conflict is resolved, we can use an unmodified import of the EFI header files (using include/ipxe/efi/import.pl). Synchronised to EDK2 SVN revision 10556. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove PACKED macroMichael Brown2010-05-306-74/+70Star
| | | | | | | Most of iPXE uses __attribute__((packed)) anyway, and PACKED conflicts with an identically-named macro in the upstream EFI header files. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Update UEFI header files with latest version from TianoCoreGeoff Lywood2010-05-3041-1613/+6072
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Use correct DHCP options on EFI systemsGeoff Lywood2010-05-295-8/+126
| | | | | | | | See RFC 4578 for details. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Allow base64 encoding in large binary valuesPiotr Jaroszyński2010-05-281-23/+47
| | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Use generic base16 functions for iSCSI reverse CHAPMichael Brown2010-05-281-24/+17Star
| | | | | | Yes, I forgot to convert this function before pushing. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use generic base16 functions for SRPMichael Brown2010-05-281-9/+7Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Use generic base16 functions for iSCSIMichael Brown2010-05-281-30/+21Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [base16] Add generic base16 encoding and decoding routinesMichael Brown2010-05-283-0/+145
| | | | | | Base16 encoding is currently implemented in both iSCSI and SRP. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [base64] Add ability to decode base64 stringsMichael Brown2010-05-283-0/+101
| | | | | Inspired-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [base64] Allow base64_encode() to handle arbitrary dataMichael Brown2010-05-283-14/+16
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [doc] Re-add README fileMichael Brown2010-05-281-0/+8
| | | | | | | The README file was accidentally deleted in commit 2aad3fa ("[build] Use weak definitions instead of weak declarations"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add rtl8139.rom to the default build target listMichael Brown2010-05-281-1/+2
| | | | | | | rtl8139.rom is the target used in qemu/kvm, which is the default test platform for iPXE. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow building against a zlib in a non-standard locationGeoff Lywood2010-05-282-1/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Fix .efi and .efidrv linkingPiotr Jaroszyński2010-05-275-7/+10
| | | | | | | | | | | | | | The linker chooses to look for _start first and always picks efidrvprefix.o to satisfy it (probably because it's earlier in the archive) which causes a multiple definition error when the linker later has to pick efiprefix.o for other symbols. Fix by using EFI-specific TGT_LD_FLAGS with an explicit entry point. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [compiler] Fix 64bit compile time errorsPiotr Jaroszyński2010-05-276-12/+12
| | | | | | | | | | | | Apart from format specifier fixes there are two changes in proper code: - Change type of regs in skge_hw to unsigned long - Cast result of sizeof in myri10ge to uint32_t Both don't change anything for i386 and should be fine on x86_64. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Don't consider invalid offers to be duplicatesJoshua Oreman2010-05-271-3/+3
| | | | | | | | | This fixes a regression in BOOTP support; since BOOTP requests often have the `siaddr' field set to 0.0.0.0, they would be considered duplicates of the first zeroed-out offer slot. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use weak definitions instead of weak declarationsJoshua Oreman2010-05-2712-98/+48Star
| | | | | | | | | | | | | | | This removes the need for inline safety wrappers, marginally reducing the size penalty of weak functions, and works around an apparent binutils bug that causes undefined weak symbols to not actually be NULL when compiling with -fPIE (as EFI builds do). A bug in versions of binutils prior to 2.16 (released in 2005) will cause same-file weak definitions to not work with those toolchains. Update the README to reflect our new dependency on binutils >= 2.16. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Fix link order for elf2efiPiotr Jaroszyński2010-05-271-2/+2
| | | | | | | | | Dependencies are considered in left-to-right order so the source file needs to come first in this case. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Inhibit "skipping incompatible" message from ldMichael Brown2010-05-271-1/+1
| | | | | | | | | | On 64-bit systems with both 32-bit and 64-bit libraries installed, ld tends to generate noisy "skipping incompatible /usr/lib/libxxx.so" messages when building elf2efi.c. Fix by passing --no-warn-search-mismatch to ld. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Verify object format support in elf2efi.cGeoff Lywood2010-05-271-2/+3
| | | | | | | | | | Currently, if you attempt to build 64-bit EFI binaries on a 32-bit system without a suitable cross-compiling version of libbfd, the iPXE build will die with a segmentation fault in elf2efi64. Fix by properly handling the return value from bfd_check_format(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Honor PXEBS_SKIP option in discovery controlJoshua Oreman2010-05-271-2/+26
| | | | | | | | | | | | | | | | It is permissible for a DHCP packet containing PXE options to specify only "discovery control", instead of the more typical boot menu + prompt options. This is the strategy used by older versions of dnsmasq; by specifying the discovery control as PXEBS_SKIP, they cause vendor PXE ROMs to ignore boot server discovery and just use the filename and next-server options in the initial (Proxy)DHCP packet. Modify iPXE to accept this behavior, to be more compatible with the Intel firmware. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Tested-by: Kyle Kienapfel <kyle@shadowmage.org> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [wpa] Remove PMKID checkingJoshua Oreman2010-05-271-64/+0Star
| | | | | | | | | | | | PMKID checking is an additional pre-check that helps detect invalid passphrases before going through the full handshaking procedure. It takes up some amount of code size, and is not necessary from a security perspective. It also is implemented improperly by some routers, which was causing iPXE to give spurious authentication errors. Remove it for these reasons. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bitmap] Fix bitmaps on 64-bitGeoff Lywood2010-05-272-2/+2
| | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [comboot] Propagate carry flag from COMBOOT APIStefan Hajnoczi2010-05-253-12/+41
| | | | | | | | | | | | COMBOOT API calls set the carry flag on failure. This was not being propagated because the COMBOOT interrupt handler used iret to return with EFLAGS restored from the stack. This patch propagates CF before returning from the interrupt. Reported-by: Geoff Lywood <glywood@vmware.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Add support for QLogic 7322 HCAMichael Brown2010-05-254-0/+10051
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Update received sequence number before delivering received dataMichael Brown2010-05-221-8/+10
| | | | | | | | | | | | | iPXE currently updates the TCP sequence number after delivering the data to the application via xfer_deliver_iob(). If the application responds to the received data by transmitting more data, this would result in a stale ACK number appearing in the transmitted packet, which potentially causes retransmissions and also gives the undesirable appearance of violating causality (by sending a response to a message that we claim not to have yet received). Reported-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [script] Accept "#!gpxe" as well as "#!ipxe" as a script magic markerMichael Brown2010-05-221-4/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Treat PXENV_RESTART_TFTP as unreturnableMichael Brown2010-05-213-7/+17
| | | | | | | | | | | | | | | | | | | | | | | Microsoft WDS can end up calling PXENV_RESTART_TFTP to execute a second-stage NBP which then exits. Specifically, wdsnbp.com uses PXENV_RESTART_TFTP to execute pxeboot.com, which will exit if the user does not press F12. iPXE currently treats PXENV_RESTART_TFTP as a normal PXE API call, and so attempts to return to wdsnbp.com, which has just been vaporised by pxeboot.com. Use rmsetjmp/rmlongjmp to preserve the stack state as of the initial NBP execution, and to restore this state immediately prior to executing the NBP loaded via PXENV_RESTART_TFTP. This matches the behaviour in the PXE spec (which says that "if TFTP is restarted, control is never returned to the caller"), and allows pxeboot.com to exit relatively cleanly back to iPXE. As with all usage of setjmp/longjmp, there may be subtle corner case bugs due to not gracefully unwinding any state accumulated by the time of the longjmp call, but this seems to be the only viable way to provide the specified behaviour. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [lacp] Add simple LACP implementationMichael Brown2010-05-105-406/+526
| | | | | | | | | | Some switch configurations will refuse to enable our port unless we can speak LACP to inform the switch that we are alive. Add a very simple passive LACP implementation that is sufficient to convince at least Linux's bonding driver (when tested using qemu attached to a tap device enslaved to a bond device configured as "mode=802.3ad"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix building with binutils 2.16Michael Brown2010-04-271-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Special case NULL in churi()Piotr Jaroszyński2010-04-251-2/+4
| | | | | | | | | resolve_uri() doesn't (and probably shouldn't) handle NULL relative_uri. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Fix NULL dereference in parse_uri()Piotr Jaroszyński2010-04-251-2/+10
| | | | | | | Don't try to parse authority if it's not there. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [romprefix] Add .mrom format, allowing loading of large ROMsMichael Brown2010-04-255-9/+518
| | | | | | | | | | | | | | | | | | | | | Add an infrastructure allowing the prefix to provide an open_payload() method for obtaining out-of-band access to the whole iPXE image. Add a mechanism within this infrastructure that allows raw access to the expansion ROM BAR by temporarily borrowing an address from a suitable memory BAR on the same PCI card. For cards that have a memory BAR that is at least as large as their expansion ROM BAR, this allows large iPXE ROMs to be supported even on systems where PMM fails, or where option ROM space pressure makes it impossible to use PMM shrinking. The BIOS sees only a stub ROM of approximately 3kB in size; the remainder (which can be well over 64kB) is loaded only at the time iPXE is invoked. As a nice side-effect, an iPXE .mrom image will continue to work even if its PMM-allocated areas are overwritten between initialisation and invocation. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Replace obsolete makerom.pl with quick script using Option::ROMMichael Brown2010-04-255-251/+39Star
| | | | | | | | | | | The only remaining useful function of makerom.pl is to correct the ROM and PnP checksums; the PCI IDs are set at link time, and padding is performed using padimg.pl. Option::ROM already provides a facility for correcting the checksums, so we may as well just use this instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Match "starting execution" and "initialising devices" message styleMichael Brown2010-04-251-2/+2
| | | | | | | | Add a trailing "ok" to the "initialising devices message", to match the visual style of the "ok" now added to the "starting execution" message. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [romprefix] Inhibit the use of relocation during POSTMichael Brown2010-04-253-6/+25
| | | | | | | | | | | | | | | It is common for system memory maps to be grotesquely unreliable during POST. Many sanity checks have been added to the memory map reading code, but these do not catch all problems. Skip relocation entirely if called during POST. This should avoid the problems typically encountered, at the cost of slightly disrupting the memory map of an operating system booted via iPXE when iPXE was entered during POST. Since this is a very rare special case (used, for example, when reflashing an experimental ROM that would otherwise prevent the system from completing POST), this is an acceptable cost. Signed-off-by: Michael Brown <mcb30@ipxe.org>