summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
Commit message (Collapse)AuthorAgeFilesLines
* [undi] Ensure that native drivers are tried before the UNDI PCI driverMichael Brown2011-11-111-0/+3
| | | | | Suggested-by: Alessandro Salvatori <sandr8@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ath9k] Add ath9k driverScott K Logan2011-10-142-1/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list functions required by ath9k driverMichael Brown2011-10-141-0/+154
| | | | | Originally-implemented-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add a basic infrastructure for running self-testsMichael Brown2011-10-141-0/+45
| | | | | | | | This self-test mechanism is inspired by Perl's Test::Simple and similar modules. The aim is to encourage the use of self-tests by making it as easy as possible to create self-test code Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Tidy up naming convention for list_contains() and friendsMichael Brown2011-10-141-10/+46
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Use a random DHCP transaction identifier (xid)Michael Brown2011-09-191-3/+6
| | | | | | | | | iPXE currently uses the last four bytes of the MAC address as the DHCP transaction identifier. Reduce the probability of collisions by generating a random transaction identifier. Originally-implemented-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Allow sufficient headroom for TCP headersMichael Brown2011-09-191-0/+10
| | | | | | | | | | | | | | | TCP currently neglects to allow sufficient space for its own headers when allocating I/O buffers. This problem is masked by the fact that the maximum link-layer header size (802.11) is substantially larger than the common Ethernet link-layer header. Fix by allowing sufficient space for any TCP headers, as well as the network-layer and link-layer headers. Reported-by: Scott K Logan <logans@cottsay.net> Debugged-by: Scott K Logan <logans@cottsay.net> Tested-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Accept certificates without a version numberMichael Brown2011-08-131-0/+12
| | | | | | | The version field of an X.509 certificate appears to be optional. Reported-by: Sebastiano Manusia <Sebastiano.Manusia@chuv.ch> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Fix fragment reassemblyMichael Brown2011-07-161-15/+8Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow link layer to report broadcast/multicast packets via pull()Michael Brown2011-07-151-9/+19
| | | | | | | | Allow the link layer to directly report whether or not a packet is multicast or broadcast at the time of calling pull(), rather than relying on heuristics to determine this at a later stage. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Add symbolic definitions for DHCP client architecture valuesMichael Brown2011-07-061-0/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Add support for one-shot processesMichael Brown2011-06-281-0/+18
| | | | | | | | | Some processes execute only once, and exist solely in order to defer execution until after the relevant instantiator method has returned. Such processes do not need to be automatically rescheduled when executing. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Pass containing object pointer to process step() methodsMichael Brown2011-06-281-13/+109
| | | | | | | | | Give the step() method a pointer to the containing object, rather than a pointer to the process. This is consistent with the operation of interface methods, and allows a single function to serve as both an interface method and a process step() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Send xfer_window_changed() when FCP link is establishedMichael Brown2011-06-281-0/+44
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Maintain a list of Fibre Channel upper-layer protocol usersMichael Brown2011-06-281-5/+28
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow non-completion TX errors to be recordedMichael Brown2011-06-281-0/+2
| | | | | | | | Allow TX errors to be recorded against a network device even when the packet didn't make it as far as netdev_tx(). Inspired-by: Dominik Russenberger <dominik.russenberger@terreactive.ch> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list_check_contains()Michael Brown2011-05-031-0/+19
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sanboot] Add "sanhook" and "sanunhook" commandsMichael Brown2011-04-242-2/+14
| | | | | | | Expose the multiple-SAN-drive capability of the iPXE core via the iPXE command line by adding commands to hook and unhook additional drives. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Allow for pre-initialised option setsMichael Brown2011-04-241-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add support for HIIMichael Brown2011-04-086-0/+1316
| | | | | | | Some EFI platforms expect us to provide an HII interface to display information about the driver. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Include MdeModulePkg directory in header import listMichael Brown2011-04-081-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add EFI string formatting functionsMichael Brown2011-04-081-0/+23
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [device] Make driver name a generic device propertyMichael Brown2011-04-086-8/+3Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Synchronise EFI header filesMichael Brown2011-03-3112-33/+100
| | | | | | Synchronised to EDK2 SVN revision 11462. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add replace_string()Michael Brown2011-03-301-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add init_editstring() wrapper functionMichael Brown2011-03-301-0/+13
| | | | | | | | Standardise on using init_editstring() to initialise an embedded editable string, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Add the "scriptlet" settingMichael Brown2011-03-281-1/+8
| | | | | | | | | | | | | | | | | | | A scriptlet is a single iPXE command that can be stored in non-volatile option storage and used to override the default "autoboot" behaviour without having to reflash the iPXE image. For example, a scriptlet could contain autoboot || reboot to instruct iPXE to reboot the system if booting fails. Unlike an embedded image, the presence of a scriptlet does not inhibit the initial "Press Ctrl-B..." prompt. This allows the user to recover from setting a faulty scriptlet. Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Make malloc and linux_umalloc valgrindablePiotr Jaroszyński2011-03-271-1/+6
| | | | | | | | | | Make the allocators used by malloc and linux_umalloc valgrindable. Include valgrind headers in the codebase to avoid a build dependency on valgrind. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Add support for boolean optionsMichael Brown2011-03-271-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Impose a fixed order on settingsMichael Brown2011-03-232-18/+36
| | | | | | | Improve the appearance of the "config" user interface by ensuring that settings appear in some kind of logical order. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display canonical setting name in "config" user interfaceMichael Brown2011-03-221-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display canonical setting name in output of "show" commandMichael Brown2011-03-221-1/+3
| | | | | | | | | | | | | | | | | | Enable the "show" command to display the full, canonicalised name of the fetched setting. For example: iPXE> show mac net0/mac:hex = 52:54:00:12:34:56 iPXE> dhcp && show ip DHCP (net0 52:54:00:12:34:56)... ok net0.dhcp/ip:ipv4 = 10.0.0.168 iPXE> show net0/6 net0.dhcp/dns:ipv4 = 10.0.0.6 Inspired-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Provide fetch_setting_origin()Michael Brown2011-03-221-0/+2
| | | | | Inspired-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose settings_name()Glenn Brown2011-03-221-0/+1
| | | | | | | | Expose settings_name(), shrink the unnecessarily large static buffer, properly name root settings block, and simplify. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use concat_args() in "set" commandMichael Brown2011-03-221-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Formalise notion of setting applicabilityMichael Brown2011-03-224-4/+90
| | | | | | | | | | | | | | | Expose a function setting_applies() to allow a caller to determine whether or not a particular setting is applicable to a particular settings block. Restrict DHCP-backed settings blocks to accepting only DHCP-based settings. Restrict network device settings blocks to accepting only DHCP-based settings and network device-specific settings such as "mac". Inspired-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid spurious unused-but-set-variable warnings in gcc 4.6Michael Brown2011-03-161-1/+2
| | | | | | | | | | The __table_entries() construction seems to trigger a false positive warning in gcc 4.6 relating to variables which are set but never used. Add __attribute__((unused)) to inhibit this warning. Reported-by: Ralph Giles <giles@thaumas.net> Tested-by: Ralph Giles <giles@thaumas.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add facility for rudimentary keyboard mappingMichael Brown2011-03-161-0/+30
| | | | | | | Allow for remapping of ASCII characters returned by the BIOS, using a map consisting of (from,to) pairs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Mark SNP devices as children of EFI PCI deviceMichael Brown2011-03-151-0/+6
| | | | | | | | | | | | | Re-open the EFI_PCI_IO_PROTOCOL specifying an Attributes value of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. This causes the SNP devices to be marked as children of the EFI PCI device (as shown in the "devtree" command). On at least one IBM blade system, this is required in order to have the relevant drivers automatically attach to the SNP controller at device creation time. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [syslog] Add support for sending console output to a syslog serverMichael Brown2011-03-101-0/+36
| | | | | Originally-implemented-by: Anselm Martin Hoffmeister <anselm@hoffmeister.be> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Move include/console.h to include/ipxe/console.hMichael Brown2011-03-091-0/+108
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify use of imgdownload()Michael Brown2011-03-091-1/+5
| | | | | | | Allow imgdownload() to be called without first having to allocate (and so keep track of) an image. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Generalise "currently-running script" to "currently-running image"Michael Brown2011-03-091-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Move the register_and_{select|boot}_image() functions to imgmgmt.cMichael Brown2011-03-091-2/+0Star
| | | | | | | | These functions are used only as the "action" parameters to imgdownload() or imgfetch(), and so belong in imgmgmt.c rather than image.c Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [prefix] Allow iPXE's own command line to be executed as a scriptMichael Brown2011-03-072-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Some prefixes (e.g. .lkrn) allow a command line to be passed in to iPXE. At present, this command line is ignored. If a command line is provided, treat it as an embedded script (without an explicit "#!ipxe" magic marker). This allows for patterns of invocation such as title iPXE kernel /boot/ipxe.lkrn dhcp && \ sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage Here GRUB is instructed to load ipxe.lkrn with an embedded script equivalent to #!ipxe dhcp sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage This can be used to effectively vary the embedded script without having to rebuild ipxe.lkrn. Originally-implemented-by: Dave Hansen <dave@sr71.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Use list_first_entry() to clarify logic in main()Michael Brown2011-03-071-0/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [prompt] Replace shell_banner() with a generic prompt() functionMichael Brown2011-03-072-14/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bios] Recognise scancodes for F5-F12 inclusiveMichael Brown2011-03-071-0/+7
| | | | | | | | | The function keys F5-F12 all conform to the same ANSI pattern as the other "special" keys that we currently recognise. Add these key definitions, and shrink the representation of the ANSI sequences in bios_console.c to compensate. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add generic concat_args() functionMichael Brown2011-03-071-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify image managementMichael Brown2011-03-072-43/+21Star
| | | | | | | | | | | Refactor the {load,exec} image operations as {probe,exec}. This makes the probe mechanism cleaner, eliminates some forward declarations, avoids holding magic state in image->priv, eliminates the possibility of screwing up between the "load" and "exec" stages, and makes the documentation simpler since the concept of "loading" (as distinct from "executing") no longer needs to be explained. Signed-off-by: Michael Brown <mcb30@ipxe.org>