aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* [undi] Fill in ProtType correctly in PXENV_UNDI_ISRMichael Brown2008-08-201-11/+15
| | | | | | | | | Determine the network-layer packet type and fill it in for UNDI clients. This is required by some NBPs such as emBoot's winBoot/i. This change requires refactoring the link-layer portions of the gPXE netdevice API, so that it becomes possible to strip the link-layer header without passing the packet up the network stack.
* [pcbios] Support arbitrary splits of the e820 memory mapMichael Brown2008-08-181-10/+2
| | | | | | | | | | | | | | | | | | | | | | Allow for an arbitrary number of splits of the system memory map via INT 15,e820. Features of the new map-mangling algorithm include: Supports random access to e820 map entries. Requires only sequential access support from the underlying e820 map, even if our caller uses random access. Empty regions will always be stripped. Always terminates with %ebx=0, even if the underlying map terminates with CF=1. Allows for an arbitrary number of hidden regions, with underlying regions split into as many subregions as necessary. Total size increase to achieve this is 193 bytes.
* [retry] Added configurable timeouts to retry timerAndrew Schran2008-08-122-0/+20
| | | | | | | | New min_timeout and max_timeout fields in struct retry_timer allow users of this timer to set their own desired minimum and maximum timeouts, without being constrained to a single global minimum and maximum. Users of the timer can still elect to use the default global values by leaving the min_timeout and max_timeout fields as 0.
* [iSCSI] Add support for mutual CHAPMichael Brown2008-08-113-15/+49
| | | | Allow initiator to verify target authentication using CHAP.
* [libc] Add missing __attribute__ (( format ( printf ) )) to ssnprintf()Michael Brown2008-08-111-1/+2
|
* [autoboot] Retain initial-slash (if present) when constructing TFTP URIsMichael Brown2008-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we boot from a DHCP-supplied filename, we previously relied on the fact that the current working URI is set to tftp://[next-server]/ in order to resolve the filename into a full tftp:// URI. However, this process will eliminate the distinction between filenames with and without initial slashes: cwuri="tftp://10.0.0.1/" filename="vmlinuz" => URI="tftp://10.0.0.1/vmlinuz" cwuri="tftp://10.0.0.1/" filename="/vmlinuz" => URI="tftp://10.0.0.1/vmlinuz" This distinction is important for some TFTP servers. We now explicitly construct a string of the form "tftp://[next-server]/filename" so that a filename with an initial slash will result in a URI containing a double-slash, e.g. "tftp://10.0.0.1//vmlinuz" The TFTP code always strips a single initial slash, and so ends up presenting the correct path to the server. URIs entered explicitly by users at the command line must include a double slash if they want an initial slash presented to the TFTP server: "kernel tftp://10.0.0.1/vmlinuz" => filename="vmlinuz" "kernel tftp://10.0.0.1//vmlinuz" => filename="/vmlinuz"
* [tg3] Added support for tg3-5754.Andrew Schran2008-07-241-0/+1
| | | | | | | In tg3_chip_reset(), the PCI_EXPRESS change is taken from the Linux tg3 driver. I am not sure what exactly it does (it is not documented in the Linux driver), but it is necessary for the NIC to work correctly.
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-175-8/+27
| | | | | | | | | | | | | Add yet another ugly hack to iscsiboot.c, this time to allow the user to inhibit the shutdown/removal of the iSCSI INT13 device (and the network devices, since they are required for the iSCSI device to function). On the plus side, the fact that shutdown() now takes flags to differentiate between shutdown-for-exit and shutdown-for-boot means that another ugly hack (to allow returning via the PXE stack on BIOSes that have broken INT 18 calls) will be easier. I feel dirty.
* [bzimage] Kill off the initrd image typeMichael Brown2008-07-081-14/+0
| | | | | | | We can just treat all non-kernel images as initrds, which matches our behaviour for multiboot kernels. This allows us to eliminate initrd as an image type, and treat the "initrd" command as just another synonym for "imgfetch".
* [phantom] Add support for NetXen Phantom NICsMichael Brown2008-07-041-0/+1
|
* [GDB] Provide functions to manually enter GDB stub.Stefan Hajnoczi2008-06-302-0/+41
|
* [GDB] Add watch and rwatch hardware watchpointsStefan Hajnoczi2008-06-301-0/+9
|
* [GDB] Remote debugging over UDPStefan Hajnoczi2008-06-301-0/+64
| | | | | | | | | | | | | | | | | This commit implements GDB over UDP. Using UDP is more complex than serial and has required some restructuring. The GDB stub is now built using one or both of GDBSERIAL and GDBUDP config.h options. To enter the debugger, execute the gPXE shell command: gdbstub <transport> [<options>...] Where <transport> is "serial" or "udp". For "udp", the name of a configured network device is required: gdbstub udp net0 The GDB stub listens on UDP port 43770 by default.
* [nvs] Add support for ST M25P32 SPI flash devicesMichael Brown2008-06-271-0/+9
|
* [legacy] Align legacy drivers' __shared data to the maximum possibleMichael Brown2008-06-141-1/+1
| | | | | | | | | | | | | | Some drivers that still use the legacy-driver wrapper (tg3 in particular) apparently do not specify their alignment constraints properly. This hack forces any __shared data to be maximally aligned. Note that this provides only 16-byte alignment; it is not possible to request alignment to any greater than 16 bytes using __attribute__((aligned)), since the relocation code will preserve only 16 byte alignment (and operation under -DKEEP_IT_REAL cannot preserve more that 16 byte alignment). Idea proposed by Tim Hockin <thockin@google.com>
* [cleanup] Remove long-obsolete gpxe/async.h header fileMichael Brown2008-06-122-229/+0
|
* [retry] Add start_timer_fixed()Michael Brown2008-06-111-1/+13
| | | | Allow for timers to be started with fixed timeouts.
* [slam] Add Scalable Local Area Multicast (SLAM) protocol supportMichael Brown2008-06-102-0/+2
| | | | | Tested against the mini-slamd server located in contrib/mini-slamd with a single client, on a lossy network.
* [udp] Verify local socket address (if specified) for UDP socketsMichael Brown2008-06-101-0/+9
| | | | | | UDP sockets can be used for multicast, at which point it becomes plausible that we could receive packets that aren't destined for us but that still match on a port number.
* [ELF] Add ability to boot ELF images generated by wraplinux and mkelfImageMichael Brown2008-06-091-0/+1
| | | | | | | | | | | | | | | | | | | Delete ELF as a generic image type. The method for invoking an ELF-based image (as well as any tables that must be set up to allow it to boot) will always depend on the specific architecture. core/elf.c now only provides the elf_load() function, to avoid duplicating functionality between ELF-based image types. Add arch/i386/image/elfboot.c, to handle the generic case of 32-bit x86 ELF images. We don't currently set up any multiboot tables, ELF notes, etc. This seems to be sufficient for loading kernels generated using both wraplinux and coreboot's mkelfImage. Note that while Etherboot 5.4 allowed ELF images to return, we don't. There is no callback mechanism for the loaded image to shut down gPXE, which means that we have to shut down before invoking the image. This means that we lose device state, protection against being trampled on, etc. It is not safe to continue afterwards.
* [Serial] Split serial console from serial driverStefan Hajnoczi2008-06-052-2/+17
|
* [iSCSI] Produce meaningful errors on login failureMichael Brown2008-06-031-4/+8
| | | | | | | | Return the most appropriate of EACCES, EPERM, ENODEV, ENOTSUP, EIO or EINVAL depending on the exact error returned by the target, rather than just always returning EPERM. Also, ensure that error strings exist for these errors.
* [SMBIOS] Interpret UUIDs as being in network-endian orderMichael Brown2008-05-201-3/+3
| | | | | | | | | Various specification documents disagree about the byte ordering of UUIDs. However, SMBIOS seems to use the standard in which everything is in network-endian order. This doesn't affect anything sent on the wire; only what gets printed on the screen when the "uuid" variable is displayed.
* [libc] Fix isdigit(), islower() and isupper().Michael Brown2008-05-191-4/+3
| | | | From: Stefan Hajnoczi <stefanha@gmail.com>
* [MTNIC] Minor cleanups of vendor-provided driver for Mellanox 10GigE cardsMichael Brown2008-04-221-0/+1
| | | | | | | | | Drivers are not allowed to call printf(). Converted eprintf() to DBG(), and removed spurious startup banner. Fixed hardcoded inclusion of little_bswap.h Use EIO rather than 1 as an error number.
* [NETDEV] Add notion of link stateMichael Brown2008-04-223-0/+36
| | | | | | | | | | | Add ability for network devices to flag link up/down state to the networking core. Autobooting code will now wait for link-up before attempting DHCP. IPoIB reflects the Infiniband link state as the network device link state (which is not strictly correct; we also need a succesful IPoIB IPv4 broadcast group join), but is probably more informative.
* [Infiniband] Move event-queue process from driver to Infiniband coreMichael Brown2008-04-211-1/+33
|
* [Infiniband] Add preliminary multiple port support for Hermon cardsMichael Brown2008-04-182-0/+21
| | | | | | | | | | | | Infiniband devices no longer block waiting for link-up in register_ibdev(). Hermon driver needs to create an event queue and poll for link-up events. Infiniband core needs to reread MAD parameters when link state changes. IPoIB needs to cope with Infiniband link parameters being only partially available at probe and open time.
* [Drivers-r8169] Add support for newer rtl8169 variants from Hilko BengenMarty Connor2008-03-311-0/+3
| | | | | 03-19-2008, Hilko Bengen, Cleanups and fixes for newer cards (successfully tested with 8110SC-d onboard NIC)
* [Settings] Expose SMBIOS via settings APIMichael Brown2008-03-282-3/+5
| | | | In particular, expose the system UUID as a setting ("smbios/uuid").
* [DHCP] Add support for ProxyDHCP requestsMichael Brown2008-03-271-3/+7
| | | | | | | | | | | | | | | | The PXE spec is (as usual) unclear on precisely when ProxyDHCPREQUESTs should be issued. We adapt the following, slightly paranoid approach: If an offer contains an IP address, then it is a normal DHCPOFFER. If an offer contains an option #60 "PXEClient", then it is a ProxyDHCPOFFER. Note that the same packet can be both a normal DHCPOFFER and a ProxyDHCPOFFER. After receiving the normal DHCPACK, if we have received a ProxyDHCPOFFER, we unicast a ProxyDHCPREQUEST back to the ProxyDHCP server on port 4011. If we time out waiting for a ProxyDHCPACK, we treat this as a non-fatal error.
* [libc] Whitespace cleanup in errno.hMichael Brown2008-03-261-1/+1
|
* [PXEXT] Change the PXE return code for EWOULDBLOCKH. Peter Anvin2008-03-261-2/+2
| | | | | | | | | | | Change the PXE return code for EWOULDBLOCK from PXENV_STATUS_FAILURE to PXENV_STATUS_TFTP_OPEN. This code is only used by the FILE_READ PXEXT call, and is necessary to distinguish "error" from "no data" in that call. (The only other nonblocking call is UDP_READ, where the caller doesn't care about the distinction, however, gPXE doesn't use EWOULDBLOCK internally to represent this condition in that code.)
* [PXEXT] Add FILE_API_CHECK API functionH. Peter Anvin2008-03-262-0/+27
| | | | | Add FILE_API_CHECK to the PXEXT API so the NBP can query the availability and status of the API.
* [Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown2008-03-255-87/+122
| | | | | | | | | | | | Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout.
* [libc] Use __builtin_va_list et al in stdarg.hMichael Brown2008-03-241-0/+10
| | | | | The home-grown versions don't work properly for static variadic functions, when gcc can choose to use a non-standard calling convention.
* [Settings] copy_settings() should not fail if some settings are missing!Michael Brown2008-03-231-2/+0
|
* [IPv4] Use default netmasks when no subnet mask is specified.Michael Brown2008-03-231-1/+7
|
* [IPv4] Tidy up some header files.Michael Brown2008-03-235-61/+23
|
* [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFOMichael Brown2008-03-231-7/+5
| | | | | | | | | | | Add dedicated functions create_dhcpdiscover(), create_dhcpack() and create_proxydhcpack() for use by external code such as the PXE preboot code. Register ProxyDHCP options under the global scope "proxydhcp". Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP succeeds.
* [Settings] Implement simple_settings backed with extensible DHCP optionsMichael Brown2008-03-222-4/+30
|
* [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-216-115/+102
|
* [DHCP] Kill off some no-longer-used DHCP functionsMichael Brown2008-03-211-10/+0
|
* [Settings] Use a settings applicator to set the default TFTP URI.Michael Brown2008-03-211-3/+0
|
* [Settings] Use a settings applicator to configure IPv4 routes.Michael Brown2008-03-213-8/+11
|
* [Settings] Convert code in src/usr to use settings API.Michael Brown2008-03-201-0/+3
|
* [Settings] Introduce settings applicators.Michael Brown2008-03-202-31/+18
| | | | | | | Convert DHCP option applicators in dns.c and iscsi.c to settings applicators. Kill off DHCP option applicators.
* [Settings] Add per-netdevice settings blockMichael Brown2008-03-204-1/+17
| | | | | | | | | Add a configuration settings block for each net device. This will provide the parent scope for settings applicable only to that network device (e.g. non-volatile options stored on the NIC, options obtained via DHCP, etc.). Expose the MAC address as a setting.
* [Settings] Add settings hierarchyMichael Brown2008-03-201-46/+85
| | | | | | | | Add the notion of the settings hierarchy, complete with register/unregister routines. Rename set->store and get->fetch to avoid naming conflicts with get/put as used in reference counting.
* [Settings] Start revamping the configuration settings API.Michael Brown2008-03-202-82/+124
| | | | | | | | | | | | | | | | Add the concept of an abstract configuration setting, comprising a (DHCP) tag value and an associated byte sequence. Add the concept of a settings namespace. Add functions for extracting string, IPv4 address, and signed and unsigned integer values from configuration settings (analogous to dhcp_snprintf(), dhcp_ipv4_option(), etc.). Update functions for parsing and formatting named/typed options to work with new settings API. Update NVO commands and config UI to use new settings API.