summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe
Commit message (Collapse)AuthorAgeFilesLines
...
* [aoe] Use an AoE config query to identify the target MAC addressMichael Brown2008-11-191-5/+28
| | | | | | | | | | | | | | | | The AoE spec does not specify that the source MAC address of a received packet actually matches the MAC address of the AoE target. In principle an AoE server can respond to an AoE request on any interface available to it, which may not be an address configured to accept AoE requests. This issue is resolved by implementing AoE device discovery. The purpose of AoE discovery is to find out which addresses an AoE target can use for requests. An AoE configuration command is sent when the AoE attach is attempted. The AoE target must respond to that configuration query from an interface that can accept requests. Based on a patch from Ryan Thomas <ryan@coraid.com>
* [blockdev] Move block device operations to structure block_device_operationsLaurent Vivier2008-11-191-6/+14
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Split virtio-net.c into several files.Laurent Vivier2008-11-192-5/+51
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Remove dependency on nic for virtio PCI functionsLaurent Vivier2008-11-191-18/+18
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Consolidate vring_get_buf() by using a buffer list to add to the vringLaurent Vivier2008-11-191-0/+6
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Move virtio-pci.h and virtio-ring.h to include/gpxeLaurent Vivier2008-11-192-0/+187
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [x86_64] Fix assorted 64-bit compilation errors and warningsMichael Brown2008-11-191-4/+8
| | | | | | Remove various 32-bit assumptions scattered throughout the codebase. The code is still not necessarily 64-bit clean, but will at least compile.
* [efi] Add efi_strerror()Michael Brown2008-11-191-0/+2
| | | | | | | | | EFI_STATUS is defined as an INTN, which maps to UINT32 (i.e. unsigned int) on i386 and UINT64 (i.e. unsigned long) on x86_64. This would require a cast each time the error status is printed. Add efi_strerror() to avoid this ickiness and simultaneously enable prettier reporting of EFI status codes.
* [i386] Move iSCSI and AoE boot code to arch/i386/interface/pcbiosMichael Brown2008-11-192-335/+0Star
|
* [efi] Update to latest UEFI headersMichael Brown2008-11-1826-1973/+1889Star
|
* [build] Keep gcc 4.4 happyMichael Brown2008-11-181-2/+18
| | | | | gcc 4.4 adds another few warnings, and also seems to complain if we place %ebp in the clobber list for any inline asm.
* [infiniband] Respect hop pointer when building directed route SMP return pathMichael Brown2008-11-121-92/+115
| | | | | | | | | | | | The return path in directed route SMPs lists the egress ports in order from SM to node, rather than from node to SM. To write to the correct offset within the return path, we need to parse the hop pointer. This is held within the class-specific data portion of the MAD header, which was previously unused by us and defined to be a uint16_t. Define this field to be a union type; this requires some rearrangement of ib_mad.h and corresponding changes to ipoib.c.
* [linda] Add support for QLogic 7220-based Infiniband HCAsMichael Brown2008-11-113-0/+247
| | | | | | | | | These cards very nearly support our current IB Verbs model. There is one minor difference: multicast packets will always be delivered by the hardware to QP0, so the driver has to redirect them to the appropriate QP. This means that QP owners may see receive completions for buffers that they never posted. Nothing in our current codebase will break because of this.
* [infiniband] Add raw packet parser and constructorMichael Brown2008-11-113-28/+62
| | | | | | | This can be used with cards that require the driver to construct and parse packet headers manually. Headers are optionally handled out-of-line from the packet payload, since some such cards will split received headers into a separate ring buffer.
* [infiniband] Add a standalone subnet management agentMichael Brown2008-11-112-0/+64
| | | | | This generic SMA code can be used for any cards that do not provide firmware-based embedded SMAs.
* [ipoib] Kill off the IPoIB pseudo-headerMichael Brown2008-11-112-24/+21Star
| | | | | | | | | Some Infiniband cards will not be as accommodating as the Arbel and Hermon cards in providing enough space for us to push a fake extra header at the start of the received packet. We must therefore make do with squeezing enough information to identify source and destination addresses into the two bytes of padding within a genuine IPoIB link-layer header.
* [infiniband] Split subnet management agent client out into ib_smc.cMichael Brown2008-11-114-271/+525
| | | | | | | | Not all Infiniband cards have embedded subnet management agents. Split out the code that communicates with such an embedded SMA into a separate ib_smc.c file, and have drivers call ib_smc_update() explicitly when they suspect that the answers given by the embedded SMA may have changed.
* [infiniband] Pass address vector in receive completionsMichael Brown2008-11-111-52/+53
| | | | | | | | | | | | | | | | | Receive completion handlers now get passed an address vector containing the information extracted from the packet headers (including the GRH, if present), and only the payload remains in the I/O buffer. This breaks the symmetry between transmit and receive completions, so remove the ib_completer_t type and use an ib_completion_queue_operations structure instead. Rename the "destination QPN" and "destination LID" fields in struct ib_address_vector to reflect its new dual usage. Since the ib_completion structure now contains only an IB status code, ("syndrome") replace it with a generic gPXE integer status code.
* [infiniband] Maintain queue fill level as a property of a work queueMichael Brown2008-11-111-59/+15Star
| | | | | Both queue owners and drivers often need to keep track of the fill level, so let's make it a generic property.
* [infiniband] Flush uncompleted work queue entries at QP teardownMichael Brown2008-11-111-33/+70
| | | | | | | | | | | | | | Avoid leaking I/O buffers in ib_destroy_qp() by completing any outstanding work queue entries with a generic error code. This requires the completion handlers to be available to ib_destroy_qp(), which is done by making them static configuration parameters of the CQ (set by ib_create_cq()) rather than being provided on each call to ib_poll_cq(). This mimics the functionality of netdev_{tx,rx}_flush(). The netdev flush functions would previously have been catching any I/O buffers leaked by the IPoIB data queue (though not by the IPoIB metadata queue).
* [ne2k_isa] Restore support for ne2k isa cardsPantelis Koukousoulas2008-11-081-0/+1
| | | | | | | | | | | | | | | | | Add the simplified ne2k_isa driver. It is just a selective copy+paste of the relevant parts from ns8390.c plus a little trivial hacking to make it actually work. It is true that the code is pretty ugly, but: a) ns8390.c is worse b) It is only 372 lines and no #ifdefs c) It works both in qemu/bochs and in real hardware and we all know it is easier to cleanup working code Hope someone will find the time to rewrite this driver properly, but until then at least for me this is an ok solution. Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
* [netdevice] Retain and report detailed error breakdownsMichael Brown2008-11-081-10/+21
| | | | | | | | | | netdev_rx_err() and netdev_tx_complete_err() get passed the error code, but currently use it only in debug messages. Retain error numbers and frequencey counts for up to NETDEV_MAX_UNIQUE_ERRORS (4) different errors for each of TX and RX. This allows the "ifstat" command to report the reasons for TX/RX errors in most cases, even in non-debug builds.
* [settings] Add the notion of a "tag magic" to numbered settingsMichael Brown2008-10-301-2/+13
| | | | | | | | | | | | | | | | | | | Settings can be constructed using a dotted-decimal notation, to allow for access to unnamed settings. The default interpretation is as a DHCP option number (with encapsulated options represented as "<encapsulating option>.<encapsulated option>". In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to interpret the dotted-decimal notation as referring to non-DHCP options. In this case, it becomes necessary for these contexts to ignore standard DHCP options, otherwise we end up trying to, for example, retrieve the boot filename from SMBIOS. Allow settings blocks to specify a "tag magic". When dotted-decimal notation is used to construct a setting, the tag magic value of the originating settings block will be ORed in to the tag number. Store/fetch methods can then check for the magic number before interpreting arbitrarily-numbered settings.
* [efi] Add basic implementation of EFI SIMPLE_NETWORK_PROTOCOLMichael Brown2008-10-164-0/+1389
| | | | | This implementation is tested and working, but not currently tied in to the EFI build.
* [netdevice] Change link-layer push() and pull() methods to take raw typesMichael Brown2008-10-161-21/+11Star
| | | | | | | | | | EFI requires us to be able to specify the source address for individual transmitted packets, and to be able to extract the destination address on received packets. Take advantage of this to rationalise the push() and pull() methods so that push() takes a (dest,source,proto) tuple and pull() returns a (dest,source,proto) tuple.
* [netdevice] Split multicast hashing out into an mc_hash methodMichael Brown2008-10-161-0/+10
| | | | | | Multicast hashing is an ugly overlap between network and link layers. EFI requires us to provide access to this functionality, so move it out of ipv4.c and expose it as a method of the link layer.
* [netdevice] Add maximum packet length as a net device propertyMichael Brown2008-10-163-0/+11
| | | | | Currently this length is set at device allocation time, and is never changed.
* [efi] Add EFI image format and basic runtime environmentMichael Brown2008-10-1318-0/+2806
| | | | | | | | | We have EFI APIs for CPU I/O, PCI I/O, timers, console I/O, user access and user memory allocation. EFI executables are created using the vanilla GNU toolchain, with the EXE header handcrafted in assembly and relocations generated by a custom efilink utility.
* [sanboot] Quick and dirty hack to make SAN boot protocols selectableMichael Brown2008-10-131-0/+14
|
* [umalloc] Formalise the user memory allocation APIMichael Brown2008-10-131-3/+51
|
* [uaccess] Formalise the uaccess APIMichael Brown2008-10-132-17/+331
| | | | | | The userptr_t is now the fundamental type that gets used for conversions. For example, virt_to_phys() is implemented in terms of virt_to_user() and user_to_phys().
* [nap] Formalise the CPU sleeping APIMichael Brown2008-10-132-0/+75
|
* [timer] Formalise the timer APIMichael Brown2008-10-121-31/+63
| | | | | | We now have two implementations for the timer API: one using the time-of-day counter at 40:70 and one using RDTSC. Both make use of timer2_udelay().
* [retry] Use a separate flag to indicate that a retry timer is runningMichael Brown2008-10-121-5/+4Star
| | | | | Using start==0 to indicate a stopped timer is dangerous, because 0 is a valid value for the current tick counter.
* [pci] Formalise the PCI I/O APIMichael Brown2008-10-122-1/+122
|
* [ioapi] Absorb virt_to_phys() and phys_to_virt() into the I/O APIMichael Brown2008-10-121-15/+35
|
* [ioapi] Formalise the I/O API as used in i386-pcbiosMichael Brown2008-10-122-0/+565
|
* [makefile] Add -Wformat-nonliteral as an extra warning categoryMichael Brown2008-10-101-2/+2
| | | | | | | | | | | -Wformat-nonliteral is not enabled by -Wall and needs to be explicitly specified. Modified the few files that use nonliteral format strings to work with this new setting in place. Inspired by a patch from Carl Karsten <carl@personnelware.com> and an identical patch from Rorschach <r0rschach@lavabit.com>.
* [efi] Add EFI headers from the EFI Development Kit (edk2)Michael Brown2008-10-1025-0/+9013
| | | | | | | | | | | The intention is to include near-verbatim copies of the EFI headers required by gPXE. This is achieved using the import.pl script in src/include/gpxe/efi. Note that import.pl will modify any #include lines in each imported header to reflect its new location within the gPXE tree. It will also tidy up the file by removing carriage return characters and trailing whitespace.
* [crypto] Rename <gpxe/bitops.h> to <gpxe/rotate.h>Michael Brown2008-10-011-3/+3
|
* [i2c] Generalise i2c bit-bashing support to addressless devicesMichael Brown2008-10-011-5/+63
| | | | | | | | | | | | | | | | | | | | | | Some devices (e.g. the Atmel AT24C11) have no concept of a device address; they respond to every device address and use this value as the word address. Some other devices use part of the device address field to extend the word address field. Generalise the i2c bit-bashing support to handle this by defining the device address length and word address length as properties of an i2c device. The word address is assumed to overflow into the device address field if the address used exceeds the width of the word address field. Also add a bus reset mechanism. i2c chips don't usually have a reset line, so rebooting the host will not clear any bizarre state that the chip may be in. We reset the bus by clocking SCL until we see SDA high, at which point we know we can generate a start condition and have it seen by all devices. We then generate a stop condition to leave the bus in a known state prior to use. Finally, add some extra debugging messages to i2c_bit.c.
* [settings] Expose MAC address setting for general useMichael Brown2008-09-261-0/+1
|
* [dhcp] Accept BOOTP as well as DHCPMichael Brown2008-09-251-0/+1
|
* [uri] Add uri_encode() and uri_decode() functions for URI character encodingMichael Brown2008-09-241-0/+2
|
* [comboot] Add COMBOOT and COM32 supportDaniel Verkamp2008-08-291-0/+1
|
* [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/+2Star
| | | | | | | | | | | | | | | | | | | | | | 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
|