summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
* [netdevice] Increase maximum network-layer address lengthMichael Brown2013-09-031-1/+1
| | | | | | IPv6 uses 16-byte network-layer addresses. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Generalise fragment reassembly mechanismMichael Brown2013-08-272-12/+68
| | | | | | | Generalise the concept of fragment reassembly to allow for code sharing between IPv4 and IPv6 protocols. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Give tap devices a name and bus typeMichael Brown2013-08-271-0/+3
| | | | | | | | Give tap devices a meaningful name, and avoid segmentation faults when attempting to retrieve ${net0/bustype} by assigning a new bus type for tap devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Make built-in settings a linker tableMichael Brown2013-08-271-0/+22
| | | | | | | Allow for configurable provision of built-in settings by placing them in a linker table rather than an array. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Allow URIs to incorporate a parameter listMichael Brown2013-08-191-0/+4
| | | | | | | | | | | | | | | | | HTTP POST requires the ability to associate a parameter list with a URI. There is no standardised syntax for this. Use a non-standard URI syntax to incorporate the specification of a parameter list within a URI: URI = [ absoluteURI | relativeURI ] [ "#" fragment ] [ "##params" [ "=" paramsName ] ] e.g. http://boot.ipxe.org/demo/boot.php##params http://boot.ipxe.org/demo/boot.php##params=mylist Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "params" and "param" commands to manage form parameter listsMichael Brown2013-08-191-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [params] Add support for the general concept of a form parameter listMichael Brown2013-08-192-0/+48
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose memory map via settings mechanismMichael Brown2013-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow memory map entries to be read using the syntax ${memmap/<region>.<properties>.<scale>} where <region> is the index of the memory region, <properties> is a bitmask where bit 0 represents the start address and bit 1 represents the length (allowing the end address to be encoded by having both bits 0 and 1 set), and <scale> is the number of bits by which to shift the result. This allows for several values of interest to be encoded. For example: ${memmap/<region>.1.0:hexraw} # 64-bit start address of <region> ${memmap/<region>.2.0:hexraw} # 64-bit length of <region>, in bytes ${memmap/<region>.3.0:hexraw} # 64-bit end address of <region> ${memmap/<region>.2.10:int32} # Length of <region>, in kB ${memmap/<region>.2.20:int32} # Length of <region>, in MB The numeric encoding is slightly more sophisticated than described here, allowing a single encoding to cover multiple regions. (See the source code for details.) The primary use case for this feature is to provide the total system memory size (in MB) via the "memsize" predefined setting. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcpip] Allow binding to unspecified privileged ports (below 1024)Michael Brown2013-08-062-7/+41
| | | | | Originally-implemented-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Rename sin_{family,port} to sin6_{family,port} in struct sockaddr_in6Michael Brown2013-08-061-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add pci_find_next() to iterate over existent PCI devicesMichael Brown2013-08-051-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Introduce the generalised concept of a numeric settingMichael Brown2013-08-011-5/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Remove now-unused fetchf_named_setting() and storef_named_setting()Michael Brown2013-07-221-7/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Add parse_setting()Michael Brown2013-07-221-1/+15
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Move parse_settings() to parseopt.cMichael Brown2013-07-221-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Allow parsed option to be modifiedMichael Brown2013-07-221-9/+9
| | | | | | | Parsing a setting name requires the ability to modify the text being parsed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Remove now-unused store_named_setting()Michael Brown2013-07-191-13/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add fetchf_setting_copy()Michael Brown2013-07-191-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose parse_setting_name()Michael Brown2013-07-191-1/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix %.licence build targetMichael Brown2013-07-161-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | Our use of --gc-sections causes the linker to discard the symbols defined by FILE_LICENCE(), meaning that the resulting licence determination is incomplete. We must use the KEEP() directive in the linker script to force the linker to not discard the licence symbols. Using KEEP(*(COMMON)) would be undesirable, since there are some symbols in COMMON which we may wish to discard. Fix by placing symbols defined by PROVIDE_SYMBOL() (which is used by FILE_LICENCE()) into a special ".provided" section, which we then mark with KEEP(). All such symbols are zero-length, so there is no cost in terms of the final binary size. Since the symbols are no longer in COMMON, the linker will reject symbols with the same name coming from multiple objects. We therefore append the object name to the licence symbol, to ensure that it is unique. Reported-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add missing FILE_LICENCE declarationsMichael Brown2013-07-162-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nfs] Add support for NFS protocolMarin Hannache2013-07-1512-4/+575
| | | | | | Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "poweroff" commandMarin Hannache2013-07-152-0/+12
| | | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add missing FILE_LICENCE declarationsMarin Hannache2013-07-152-0/+4
| | | | | Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [velocity] Rewrite VIA Velocity driverAdrian Jamróz2013-07-151-1/+1
| | | | | | | Signed-off-by: Adrian Jamróz <adrian.jamroz@gmail.com> Modified-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [rhine] Rewrite VIA Rhine driverAdrian Jamróz2013-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Replace the old via-rhine driver with a new version using the iPXE API. Includes fixes by Thomas Miletich for: - MMIO access - Link detection - RX completion in RX overflow case - Reset and EEPROM reloading - CRC stripping - Missing cpu_to_le32() calls - Missing memory barriers Signed-off-by: Adrian Jamróz <adrian.jamroz@gmail.com> Modified-by: Thomas Miletich <thomas.miletich@gmail.com> Tested-by: Thomas Miletich <thomas.miletich@gmail.com> Tested-by: Robin Smidsrød <robin@smidsrod.no> Modified-by: Michael Brown <mcb30@ipxe.org> Tested-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Make "netX" settings block function as a symbolic linkMichael Brown2013-07-131-0/+7
| | | | | | | | | | | | | | Add a facility for settings blocks to act as symbolic links to other settings blocks, and reimplement the "netX" virtual settings block using this facility. The primary advantage of this approach is that unscoped settings such as ${mac} and ${filename} will now reflect the settings obtained from the most recently opened network device: in most cases, this will mean the settings obtained from the most recent DHCP attempt. This should improve conformance to the principle of least astonishment. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose PCI configuration space via settings mechanismMichael Brown2013-07-131-0/+1
| | | | | | | | | | | | | | | | Allow values to be read from PCI configuration space using the syntax ${pci/<busdevfn>.<offset>.<length>} where <busdevfn> is the bus:dev.fn address of the PCI device (expressed as a single integer, as returned by ${net0/busloc}), <offset> is the offset within PCI configuration space, and <length> is the length within PCI configuration space. Values are returned in reverse byte order, since PCI configuration space is little-endian by definition. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Add support for accessing PCI configuration space via /proc/bus/pciMichael Brown2013-07-135-0/+142
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add "busdevfn" setting typeMichael Brown2013-07-121-0/+1
| | | | | | | Allow network device's "busloc" setting to be formatted as a PCI bus:dev.fn address using e.g. ${net0/busloc:busdevfn}. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add "hexraw" setting typeMichael Brown2013-07-121-0/+1
| | | | | Originally-implemented-by: Jeppe Toustrup <ipxe@tenzer.dk> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [base16] Generalise base16_decode() to hex_decode()Michael Brown2013-07-122-13/+3Star
| | | | | | | Provide a generic hex_decode() routine which can be shared between the Base16 code and the "hex" and "hexhyp" settings parsers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Accept OCSP responses containing multiple certificatesMichael Brown2013-05-291-0/+19
| | | | | | | | | | | | | | RFC2560 mandates that a valid OCSP response will contain exactly one relevant certificate. However, some OCSP responders include extraneous certificates. iPXE currently assumes that the first certificate in the OCSP response is the relevant certificate; OCSP checks will therefore fail if the responder includes the extraneous certificates before the relevant certificate. Fix by using the responder ID to identify the relevant certificate. Reported-by: Christian Stroehmeier <stroemi@mail.uni-paderborn.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [smbios] Allow access to multiple instances of SMBIOS structuresMichael Brown2013-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Extend the syntax for numerical SMBIOS settings from smbios/<type>.<offset>.<length> to smbios/[<instance>.]<type>.<offset>.<length> Where SMBIOS provides multiple structures with the same <type>, this extended syntax allows for access to structures other than the first. If <instance> is omitted then it will default to zero, giving access to the first instance (and so matching existing behaviour). The 16-bit SMBIOS handle (which is an alternative way to disambiguate multiple instances of the same type of structure) can be accessed, if required, using smbios/<instance>.<type>.2.2:uint16 Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Eliminate settings "tag magic"Michael Brown2013-05-013-82/+46Star
| | | | | | | Create an explicit concept of "settings scope" and eliminate the magic values used for numerical setting tags. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add netdev_tx_defer() to allow drivers to defer transmissionsMichael Brown2013-05-011-0/+4
| | | | | | | | Devices with small transmit descriptor rings may temporarily run out of space. Provide netdev_tx_defer() to allow drivers to defer packets for retransmission as soon as a descriptor becomes available. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Remove obsolete bootp.h headerMichael Brown2013-05-011-230/+0Star
| | | | | Reported-by: Christian Helmuth <christian.helmuth@genode-labs.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Default to short wchar_t in stddef.hMichael Brown2013-04-281-2/+2
| | | | | | | | sparse does not understand -fshort-wchar. Default to using uint16_t as a wchar_t if not explicitly specified by the compiler, to avoid large numbers of spurious warnings from sparse. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [process] Mark process descriptor as static in PERMANENT_PROCESSMichael Brown2013-04-251-1/+1
| | | | | | There is no need for the process descriptor to be a global variable. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid sparse undeclared symbol warning for PROVIDE_SYMBOL()Michael Brown2013-04-251-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Define __WINT_TYPE__ if necessaryMichael Brown2013-04-251-0/+3
| | | | | | | | sparse does not define __WCHAR_TYPE__ or __WINT_TYPE__. We already define __WCHAR_TYPE__ if the compiler does not do so; do the same for __WINT_TYPE__. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Perform meaningful error code conversionsMichael Brown2013-04-194-16/+23
| | | | | | | | Exploit the redefinition of iPXE error codes to include a "platform error code" to allow for meaningful conversion of EFI_STATUS values to iPXE errors and vice versa. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Redefine low 8 bits of error code as "platform error code"Michael Brown2013-04-193-234/+404
| | | | | | | | | | The low 8 bits of an iPXE error code are currently defined as the closest equivalent PXE error code. Generalise this scheme to platforms other than PC-BIOS by extending this definition to "closest equivalent platform error code". This allows for the possibility of returning meaningful errors via EFI APIs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Use __einfo() tuple as first argument to EUNIQ()Michael Brown2013-04-192-78/+81
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Remove obsolete EFI I/O implementation using EFI_CPU_IO_PROTOCOLMichael Brown2013-04-194-373/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [intel] Add intelx driver for Intel 10 Gigabit Ethernet NICsMichael Brown2013-04-191-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Fetch device path for loaded image during initialisationMichael Brown2013-03-271-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add ability to perform a warm rebootMichael Brown2013-03-221-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add "reboot" command for EFIMichael Brown2013-03-223-0/+93
| | | | | | | | | Abstract out the ability to reboot the system to a separate reboot() function (with platform-specific implementations), add an EFI implementation, and make the existing "reboot" command available under EFI. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Provide efi_guid_ntoa() for printing EFI GUIDsMichael Brown2013-03-201-14/+5Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>