summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* [tcp] Fix typos by changing ntohl() to htonl() where appropriateMichael Brown2010-07-131-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Store local port in host byte orderMichael Brown2010-07-131-9/+9
| | | | | | | Every other scalar integer value in struct tcp_connection is in host byte order; change the definition of local_port to match. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Fix a memory leak in free_image()Piotr Jaroszyński2010-07-111-0/+1
| | | | | | | | | image_set_cmdline() strdup()s cmdline, which free_image() doesn't clean up. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pcnet32] Fix pcnet32_wio_reset() bugAndrei Faur2010-07-111-1/+1
| | | | | | | | This bug caused .probe to fail because the NIC did not reset properly. Signed-off-by: Andrei Faur <da3drus@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Fix potential use-after-free when accessing timestamp optionMichael Brown2010-07-071-4/+7
| | | | | Reported-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [refcnt] Fix embedded image buildingAlessandro Salvatori2010-07-051-3/+3
| | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pcnet32] Fix uninitialised variableMichael Brown2010-06-251-1/+1
| | | | | Reported-by: Geoff Lywood <glywood@vmware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [myri10ge] Add NonVolatile Option (nvo) supportGlenn Brown2010-06-251-11/+314
| | | | | | | | | | | | | | | Add NonVolatile Option (nvo) and NonVolatile Storage (nvs) support to the myri10ge driver using the EEPROM read/write mechanism provided by the NIC's Vendor Specific PCI capability. The myri10ge NIC is capabile of storing 64KB or more of nonvolatile options, but this patch advertises only 512 bytes of nvo storage because iPXE malloc's a buffer matching the total size we advertise. 512 is plenty without wasting malloc'd memory. (The 2 other drivers currently supporting nvo advertise 256 bytes or less.) Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add setting deletion (Ctrl-D) interfaceGlenn Brown2010-06-251-0/+7
| | | | | | | | | | | Make Ctrl-D delete a setting, because the Text User Interface (tui) previously provided no way to delete a setting. Also, update the on-screen instructions to describe the new feature. Deleting settings is especially important for settings stored in precious nonvolatile storage. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Enable jump scroll in config UIGlenn Brown2010-06-251-38/+77
| | | | | | | | | Implement jump scrolling with "..." displayed where the settings list continues off-screen, because there are now too many settings to fit on screen in the "config ..." text user interface. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Define Vendor Specific capability IDGlenn Brown2010-06-251-0/+1
| | | | | | | | Add a PCI_CAP_ID_VNDR definition for the PCI standard "Vendor Specific" capability ID. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [romprefix] Do not check for BBS compatibilityMichael Brown2010-06-241-29/+3Star
| | | | | | | | | The existence and usage of the BEV entry point is covered by the PnP spec, not the BBS spec; the BBS spec merely describes a policy for selecting the boot device order. iPXE should therefore check only for a PnP BIOS in order to decide whether or not to hook INT19. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix broken build caused by implied dependency upon "perl"Michael Brown2010-06-243-14/+14
| | | | | | | | | | | | | | | | | Commit ea12dc0 ("[build] Avoid hard-coding the path to perl") introduced a build failure for fully clean trees (e.g. after running "make veryclean"), since the dependency upon $(PARSEROM) now includes a dependency upon "perl" (which doesn't exist) rather than upon "/usr/bin/perl" (which does exist). There should of course be no dependency upon the perl binary at all; the dependency should be upon "./util/parserom.pl" alone. Fix by removing the $(PERL) from the definition of Perl-based utility paths, and adding $(PERL) at the point of usage. Reported-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid hard-coding the path to perlMichael Brown2010-06-241-1/+1
| | | | | | | | | | The path "/usr/bin/perl" has been hard-coded since Etherboot 5.1, for no discernible reason. Use just "perl" instead to fix the inconsistency and allow building on systems with Perl installed outside of /usr/bin. Reported-by: Gabor Z. Papp <gzp@papp.hu> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Build iPXE script support into EFI binaries by defaultGeoff Lywood2010-06-231-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [r8169] Remove driver cfg lookup, use pci_device_id->driver_data insteadAndrei Faur2010-06-232-66/+11Star
| | | | | | | | | This patch removes the cfg lookup made in the r8169 driver and replaces it with equivalent information found in the driver_data field of the pci_device_id structure. Signed-off-by: Andrei Faur <da3drus@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Handle multiple handshake recordsMichael Brown2010-06-231-39/+54
| | | | | | | The handshake record in TLS can contain multiple messages. Originally-fixed-by: Timothy Stack <tstack@vmware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [refcnt] Add ref_no_free handlerJoshua Oreman2010-06-233-11/+14
| | | | | | | Since more reference-counted structures than embedded images might want to mark themselves unfreeable, expose a dummy ref_no_free(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Pass through unknown interface method callsMichael Brown2010-06-221-2/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Allow for non-pass-through interface methodsMichael Brown2010-06-223-10/+46
| | | | | | | | | | | | | | | | | | | | | | | xfer_vredirect() should not be allowed to propagate to a pass-through interface. For example, when an HTTPS connection is opened, the redirect message should cause the TLS layer to reopen the TCP socket, rather than causing the HTTP layer to disconnect from the TLS layer. Fix by allowing for non-pass-through interface methods, and setting xfer_vredirect() to be one such method. This is slightly ugly, in that it complicates the notion of an interface method call by adding a "pass-through" / "non-pass-through" piece of metadata. However, the only current user of xfer_vredirect() is iscsi.c, which uses it only because we don't yet have an ioctl()-style call for retrieving the underlying socket address. The new interface infrastructure allows for such a call to be created, at which time this sole user of xfer_vredirect() can be removed, xfer_vredirect() can cease to be an interface method and become simply a wrapper around xfer_vreopen(), and the concept of a non-pass-through interface method can be reverted. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Convert all data-xfer interfaces to generic interfacesMichael Brown2010-06-2231-1511/+764Star
| | | | | | | | | | | | | | Remove data-xfer as an interface type, and replace data-xfer interfaces with generic interfaces supporting the data-xfer methods. Filter interfaces (as used by the TLS layer) are handled using the generic pass-through interface capability. A side-effect of this is that deliver_raw() no longer exists as a data-xfer method. (In practice this doesn't lose any efficiency, since there are no instances within the current codebase where xfer_deliver_raw() is used to pass data to an interface supporting the deliver_raw() method.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Convert all name-resolution interfaces to generic interfacesMichael Brown2010-06-224-260/+169Star
| | | | | | | | Remove name-resolution as an interface type, and replace name-resolution interfaces with generic interfaces supporting the resolv_done() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Convert all job-control interfaces to generic interfacesMichael Brown2010-06-228-293/+88Star
| | | | | | | | | Remove job-control as an interface type, and replace job-control interfaces with generic interfaces supporting the close() method. (Both done() and kill() are absorbed into the function of close(); kill() is merely close(-ECANCELED).) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Expand object interface to allow for polymorphic interfacesMichael Brown2010-06-225-44/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have several types of object interface at present (data-xfer, job control, name resolution), and there is some duplication of functionality between them. For example, job_done(), job_kill() and xfer_close() are almost isomorphic to each other. This updated version of the object interface mechanism allows for each interface to export an arbitrary list of supported operations. Advantages include: Operations methods now receive a pointer to the object, rather than a pointer to the interface. This allows an object to, for example, implement a single close() method that can handle close() operations from any of its exposed interfaces. The close() operation is implemented as a generic operation (rather than having specific variants for data-xfer, job control, etc.). This will allow functions such as monojob_wait() to be used to wait for e.g. a name resolution to complete. The amount of boilerplate code required in objects is reduced, not least because it is no longer necessary to include per-interface methods that simply use container_of() to derive a pointer to the object and then tail-call to a common per-object method. The cost of adding new operations is reduced; adding a new data-xfer operation such as stat() no longer incurs the penalty of adding a .stat member to the operations table of all existing data-xfer interfaces. The data-xfer, job control and name resolution interfaces have not yet been updated to use the new interface mechanism, but the code will still compile and run. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Use start_timer_fixed() instead of direct timeout manipulationMichael Brown2010-06-222-4/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Add timer_init() wrapper functionMichael Brown2010-06-229-11/+23
| | | | | | | Standardise on using timer_init() to initialise an embedded retry timer, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [refcnt] Add ref_init() wrapper functionMichael Brown2010-06-2222-14/+59
| | | | | | | Standardise on using ref_init() to initialise an embedded reference count, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pcnet32] Replace pcnet32 with native driverAndrei Faur2010-06-222-822/+1143
| | | | | | | | | This patch replaces the old pcnet32 driver with a new one that uses iPXE's API. Signed-off-by: Andrei Faur <da3drus@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [jme] Fix 64-bit compile of JMicron ethernet driverGeoff Lywood2010-06-221-1/+1
| | | | | Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Hold reference to process during call to step()Michael Brown2010-06-151-0/+2
| | | | | | | | | | | | It is conceivable that the process may terminate during the execution of step(). If nothing else holds a reference to the containing object, this would cause the object to be freed prior to returning from step(). Add a ref_get()/ref_put() around the call to ->step() to prevent this from happening. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [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>
* [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>