summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
* [efi] Add efirom utility and .efirom image formatMichael Brown2009-01-081-0/+601
|
* [efi] Allow for .efidrv images as well as .efi imagesMichael Brown2009-01-081-0/+1
| | | | | | Merge in the changes that allow for building EFI driver images (that can be loaded using the EFI shell's "load" command) as well as EFI applications.
* [efi] Use elf2efi utility in place of efilinkMichael Brown2009-01-071-0/+2
| | | | | | | | | | | elf2efi converts a suitable ELF executable (containing relocation information, and with appropriate virtual addresses) into an EFI executable. It is less tightly coupled with the gPXE build process and, in particular, does not require the use of a hand-crafted PE image header in efiprefix.S. elf2efi correctly handles .bss sections, which significantly reduces the size of the gPXE EFI executable.
* [build] Avoid strict-aliasing warnings when building with gcc 4.4Michael Brown2009-01-066-7/+6Star
| | | | | | | Conventional usage of the various struct sockaddr_xxx types involves liberal use of casting, which tends to trigger strict-aliasing warnings from gcc. Avoid these now and in future by marking all the relevant types with __attribute__((may_alias)).
* [infiniband] Call ib_open() only when opening the IPoIB net deviceMichael Brown2009-01-021-21/+4Star
| | | | | Defer the call to ib_open() until we want to actually open the device, rather than when the device is registered.
* [x86_64] Add support for compilation as an x86_64 binaryMichael Brown2008-12-054-0/+295
| | | | | | | | | | | | Currently the only supported platform for x86_64 is EFI. Building an EFI64 gPXE requires a version of gcc that supports __attribute__((ms_abi)). This currently means a development build of gcc; the feature should be present when gcc 4.4 is released. In the meantime; you can grab a suitable gcc tree from git://git.etherboot.org/scm/people/mcb30/gcc/.git
* [efi] Use EFI-native mechanism for accessing SMBIOS tableMichael Brown2008-12-054-0/+193
| | | | | | EFI provides a copy of the SMBIOS table accessible via the EFI system table, which we should use instead of manually scanning through the F000:0000 segment.
* [efi] Allow use of EFI configuration tablesMichael Brown2008-12-051-0/+33
| | | | | | | EFI passes in copies of SMBIOS and other system configuration tables via the EFI system table. Allow configuration tables to be requested using a mechanism similar to the current method for requesting EFI protocols.
* [b44] Add driver for Broadcom bcm44xx cardsPantelis Koukousoulas2008-11-221-0/+1
| | | | | | | | | | | | | | | | | | This driver is based on Stefan Hajnoczi's summer work, which is in turn based on version 1.01 of the linux b44 driver. I just assembled the pieces and fixed/added a few pieces here and there to make it work for my hardware. The most major limitation is that this driver won't work on systems with >1GB RAM due to the card not having enough address bits for that and gPXE not working around this limitation. Still, other than that the driver works well enough for at least 2 users :) and the above limitation can always be fixed when somebody wants it bad enough :) Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
* [netdevice] Provide function to retrieve the most recently opened net deviceMichael Brown2008-11-211-0/+3
| | | | | | | | | | There are currently four places within the codebase that use a heuristic to guess the "boot network device", with varying degrees of success. Add a feature to the net device core to maintain a list of open network devices, in order of opening, and provide a function last_opened_netdev() to retrieve the most recently opened net device. This should do a better job than the current assortment of guess_boot_netdev() functions.
* [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
|
* [i386] Rename __cdecl to __asmcallMichael Brown2008-11-192-4/+3Star
| | | | | __cdecl is a misleading name, since it currently encapsulates both cdecl and regparm(0) attributes. Rename to __asmcall.
* [pxe] Move all PXE files to arch/i386Michael Brown2008-11-183-2117/+0Star
| | | | | The initial PXE implementation in Etherboot had the goal of being architecture-agnostic, but this goal has not been realised.
* [elf] Kill off unused <bits/elf.h> and <bits/elf_x.h> header filesMichael Brown2008-11-181-4/+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-133-12/+14
|
* [umalloc] Formalise the user memory allocation APIMichael Brown2008-10-131-3/+51
|
* [uaccess] Formalise the uaccess APIMichael Brown2008-10-133-20/+333
| | | | | | 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-122-35/+77
| | | | | | 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
|
* [legacy] Add missing #include <gpxe/io.h>Michael Brown2008-10-121-0/+1
|
* [ioapi] Absorb virt_to_phys() and phys_to_virt() into the I/O APIMichael Brown2008-10-121-15/+35
|