summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
Commit message (Collapse)AuthorAgeFilesLines
...
* [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>
* [parseopt] Refer to online documentation for command helpMichael Brown2011-03-041-6/+4Star
| | | | | | | | | | The online documentation (e.g. http://ipxe.org/cmd/ifopen), though not yet complete, is far more comprehensive than could be provided within the iPXE binary. Save around 200 bytes (compressed) by removing the command descriptions from the interactive help, and instead referring users directly to the web page describing the relevant command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Change default initiator IQNMichael Brown2011-03-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default initiator IQN is "iqn.2000-09.org.etherboot:UNKNOWN". This is problematic for two reasons: a) the etherboot.org domain (and hence the associated IQN namespace) is not under the control of the iPXE project, and b) some targets (correctly) refuse to allow concurrent connections from different initiators using the same initiator IQN. Solve both problems by changing the default initiator IQN to be iqn.2010-04.org.ipxe:<hostname> if a hostname is set, or iqn.2010-04.org.ipxe:<uuid> if no hostname is set. Explicit initiator IQNs set via DHCP option 203 are not affected by this change. Unfortunately, this change is likely to break some existing configurations, where ACL rules have been put in place referring to the old default initiator IQN. Users may need to update ACLs, or force the use of the old IQN using an iPXE script line such as set initiator-iqn iqn.2000-09.org.etherboot:UNKNOWN or a dhcpd.conf option such as option iscsi-initiator-iqn "iqn.2000-09.org.etherboot:UNKNOWN" Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bofm] Allow garbage collection of BOFM code in non-BOFM buildsMichael Brown2011-03-031-1/+10
| | | | | | | | | Most builds will not have BOFM enabled. In these builds, allow all BOFM code (including BOFM-only code within the individual drivers) to be garbage-collected at link time in order to save space in the final binary. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bofm] Add offline BOFM test facilityMichael Brown2011-03-031-0/+1
| | | | | | | | Testing BOFM involves gaining access to an IBM blade chassis, which is often not practical. Provide a facility for testing BOFM functionality outside of a real IBM blade context. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bofm] Add core BOFM libraryMichael Brown2011-03-032-0/+342
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Allow download job to complete before acting upon imageMichael Brown2011-03-021-1/+0Star
| | | | | | | | | Allow the monojob controlling the download to complete before calling register_image() and friends. This allows the trailing "ok" from monojob.c to be printed before the image starts executing (and possibly printing output of its own). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Accept NOP-In PDUs sent by the targetMichael Brown2011-02-241-0/+34
| | | | | | | | | | | | Some iSCSI targets (observed with a Synology DS207+ NAS) send unsolicited NOP-Ins to the initiator. RFC 3720 is remarkably unclear and possibly self-contradictory on how NOPs are supposed to work, but it seems as though we can legitimately just ignore any unsolicited NOP-In PDU. Reported-by: Marc Lecuyer <marc@maxiscreen.com> Originally-implemented-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Disambiguate the expected target errors in the login responseMichael Brown2011-02-231-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Provide space for storing the EFI driver nameMichael Brown2011-02-221-1/+1
| | | | | | | | Commit d7736fb ("[efi] Allow EFI to control PCI bus enumeration") introduced a bug in which the EFI driver name became an (uninitialised) pointer rather than an array. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Allow EFI to control PCI bus enumerationMichael Brown2011-02-173-1/+89
| | | | | | | | | | | | | | EFI performs its own PCI bus enumeration. Respect this, and start controlling devices only when instructed to do so by EFI. As a side benefit, we should now correctly create multiple SNP instances for multi-port devices. This should also fix the problem of failing to enumerate devices because the PCI bridges have not yet been enabled at the time the iPXE driver is loaded. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Rename efi_pci.h to efi_pci_api.hMichael Brown2011-02-172-6/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Modularise PCI device supportMichael Brown2011-02-171-0/+28
| | | | | | | | Some operating environments require (or at least prefer) that we do not perform our own PCI bus scan, but deal only with specified devices. Modularise the PCI core to allow for this. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Make driver PCI ID a property of the PCI deviceMichael Brown2011-02-171-5/+3Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Replace pci_max_bus() with pci_num_bus()Michael Brown2011-02-172-7/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Use single "busdevfn" field in struct pci_deviceMichael Brown2011-02-171-11/+10Star
| | | | | | | Merge the "bus" and "devfn" fields into a single "busdevfn" field, to match the format used by the majority of external code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bitops] Add missing __attribute__ (( packed ))Michael Brown2011-02-171-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Add uri_has_path()Michael Brown2011-02-011-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Generalise expand_command() to expand_settings()Michael Brown2011-01-281-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Connect SAN disk during a filename boot, if applicableMichael Brown2011-01-271-0/+1
| | | | | | | | | | | | | | | | | | | For performing installations direct to a SAN target, it can be very useful to hook a SAN disk and then proceed to perform a filename boot. For example, the user may wish to hook the (empty) SAN installation disk and then boot into the OS installer via TFTP. This provides an alternative mechanism to using "keep-san" and relying on the BIOS to fall through to boot from the installation media, which is unreliable on many BIOSes. When a root-path is specified in addition to a boot filename, attempt to hook the root-path as a SAN disk before booting from the specified filename. Since the root-path may be used for non-SAN purposes (e.g. an NFS root mount point), ignore the root-path if it contains a URI scheme that we do not support. Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [init] Remove concept of "shutdown exit flags"Michael Brown2011-01-272-12/+36
| | | | | | | | Remove the concept of shutdown exit flags, and replace it with a counter used to keep track of exposed interfaces that require devices to remain active. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Expose xfer_uri_opener()Michael Brown2011-01-271-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Allow devices to indicate that interrupts are not supportedMichael Brown2011-01-251-0/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Auto-resize VPD fields used for non-volatile storageMichael Brown2011-01-192-8/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add ability to resize a VPD fieldMichael Brown2011-01-191-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Allow pci_vpd_init() return status to be ignoredMichael Brown2011-01-191-0/+11
| | | | | | | | Most xxx_init() functions are void functions with no failure cases. Allow pci_vpd_init() to be used in the same way. (Subsequent calls to pci_vpd_read() etc. will fail if pci_vpd_init() fails.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Allow resizing of non-volatile stored option blocksMichael Brown2011-01-192-1/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Remove the non-volatile options fragment listMichael Brown2011-01-111-18/+5Star
| | | | | | | | | Since its implementation several years ago, no driver has used a fragment list containing more than a single fragment. Simplify the NVO core and the drivers that use it by removing the whole concept of the fragment list, and using a simple (address,length) pair instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Allow use of custom reallocation functions for DHCP option blocksMichael Brown2011-01-111-4/+11
| | | | | | | | Allow functions other than realloc() to be used to reallocate DHCP option block data, and specify the reallocation function at the time of calling dhcpopt_init(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Rename length fields for DHCP optionsMichael Brown2011-01-102-6/+7
| | | | | | Rename "len" to "used_len" and "max_len" to "alloc_len". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Remove redundant length fields in struct dhcp_packetMichael Brown2011-01-101-4/+10
| | | | | | | | The max_len field is never used, and the len field is used only by dhcp_tx(). Remove these two fields, and perform the necessary trivial calculation in dhcp_tx() instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [igbvf] Add igbvf driverAlex Williamson2010-12-161-0/+1
| | | | | | | | | | | | Driver for Intel 82576 based virtual functions, based on Intel source code available at: http://sourceforge.net/projects/e1000 (igbvf-1.0.7) Based on initial port from Eric Keller <ekeller@princeton.edu>. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Use Ethernet-compatible chaddr, if possibleMichael Brown2010-12-151-2/+2
| | | | | | | | | | | | | | | For IPoIB, we currently use the hardware address (i.e. the eight-byte GUID) as the DHCP chaddr. This works, but some PXE servers (notably Altiris RDP) refuse to respond if the chaddr field is anything other than six bytes in length. We already have the notion of an Ethernet-compatible link-layer address, which is used in the iBFT (the design of which similarly fails to account for non-Ethernet link layers). Use this as the first preferred alternative to the actual link-layer address when constructing the DHCP chaddr field. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add fetch_ipv4_array_setting()Michael Brown2010-12-091-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Work around hardware stripping of VLAN tagsMichael Brown2010-12-011-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Expose vlan_find() to network card driversMichael Brown2010-12-011-0/+2
| | | | | | | | | Some network cards automatically strip the VLAN header, providing the VLAN tag via a side channel such as a completion queue entry. These cards need to be able to report receive completions directly against the relevant VLAN device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Apply settings block name in register_settings()Michael Brown2010-12-012-10/+4Star
| | | | | | | | Pass the settings block name as a parameter to register_settings(), rather than defining it with settings_init() (and then possibly changing it by directly manipulating settings->name). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Match user expectations for &&, ||, goto, and exitMichael Brown2010-11-292-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The && and || operators should be left-associative, since that is how they are treated in most other languages (including C and Unix shell). For example, in the command: dhcp net0 && goto dhcp_ok || echo No DHCP on net0 if the "dhcp net0" fails then the "echo" should be executed. After an "exit" or a successful "goto", further commands on the same line should never be executed. For example: goto somewhere && echo This should never be printed exit 0 && echo This should never be printed exit 1 && echo This should never be printed An "exit" should cause the current shell or script to terminate and return the specified exit status to its caller. For example: chain test.ipxe && echo Success || echo Failure [in test.ipxe] #!ipxe exit 0 should echo "Success". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [shell] Add "shell" commandMichael Brown2010-11-281-1/+1
| | | | | | | The "shell" command allows a script to enter an interactive shell, which is potentially useful for troubleshooting. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Treat VLAN 0 as validMichael Brown2010-11-271-1/+1
| | | | | | | | | VLAN headers are allowed to contain a VLAN tag of zero, indicating that the header specifies only a priority and that the packet does not belong to any VLAN. The easiest way to handle this is to treat VLAN 0 as being a normal VLAN. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Allow Fibre Channel ports to be explicitly namedMichael Brown2010-11-271-1/+2
| | | | | | Use the network interface name as the Fibre Channel port name. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcoe] Add support for FIP VLAN discoveryMichael Brown2010-11-261-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Provide vlan_can_be_trunk()Michael Brown2010-11-261-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add a mechanism for using a PCI VPD field as an NVS deviceMichael Brown2010-11-251-0/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add support for reading and writing PCI Vital Product Data (VPD)Michael Brown2010-11-252-0/+166
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>