david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

37 Commits

Author SHA1 Message Date
Michael Brown 7cfdd769aa [block] Describe all SAN devices via ACPI tables
Describe all SAN devices via ACPI tables such as the iBFT.  For tables
that can describe only a single device (i.e. the aBFT and sBFT), one
table is installed per device.  For multi-device tables (i.e. the
iBFT), all devices are described in a single table.

An underlying SAN device connection may be closed at the time that we
need to construct an ACPI table.  We therefore introduce the concept
of an "ACPI descriptor" which enables the SAN boot code to maintain an
opaque pointer to the underlying object, and an "ACPI model" which can
build tables from a list of such descriptors.  This separates the
lifecycles of ACPI descriptions from the lifecycles of the block
device interfaces, and allows for construction of the ACPI tables even
if the block device interface has been closed.

For a multipath SAN device, iPXE will wait until sufficient
information is available to describe all devices but will not wait for
all paths to connect successfully.  For example: with a multipath
iSCSI boot iPXE will wait until at least one path has become available
and name resolution has completed on all other paths.  We do this
since the iBFT has to include IP addresses rather than DNS names.  We
will commence booting without waiting for the inactive paths to either
become available or close; this avoids unnecessary boot delays.

Note that the Linux kernel will refuse to accept an iBFT with more
than two NIC or target structures.  We therefore describe only the
NICs that are actually required in order to reach the described
targets.  Any iBFT with at most two targets is therefore guaranteed to
describe at most two NICs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-03-28 19:12:48 +03:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown a667bf044a [netdevice] Allow link layer to report broadcast/multicast packets via pull()
Allow the link layer to directly report whether or not a packet is
multicast or broadcast at the time of calling pull(), rather than
relying on heuristics to determine this at a later stage.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15 18:48:46 +01:00
Michael Brown 88dd921e24 [netdevice] Pass both link-layer addresses in net_tx() and net_rx()
FCoE requires the use of fabric-provided MAC addresses, which breaks
the assumption that the net device's MAC address is implicitly the
source address for net_tx() and the (unicast) destination address for
net_rx().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-10-07 19:15:04 +01:00
Michael Brown d068049789 [aoe] Add support for identifying the underlying hardware device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 17:10:56 +01:00
Michael Brown adbe63860a [aoe] Fail immediately when network device is closed
Avoid a tedious timeout delay when attempting to issue a command over
a network device that has been closed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 16:43:37 +01:00
Michael Brown 220495f8bf [block] Replace gPXE block-device API with an iPXE asynchronous interface
The block device interface used in gPXE predates the invention of even
the old gPXE data-transfer interface, let alone the current iPXE
generic asynchronous interface mechanism.  Bring this old code up to
date, with the following benefits:

 o  Block device commands can be cancelled by the requestor.  The INT 13
    layer uses this to provide a global timeout on all INT 13 calls,
    with the result that an unexpected passive failure mode (such as
    an iSCSI target ACKing the request but never sending a response)
    will lead to a timeout that gets reported back to the INT 13 user,
    rather than simply freezing the system.

 o  INT 13,00 (reset drive) is now able to reset the underlying block
    device.  INT 13 users, such as DOS, that use INT 13,00 as a method
    for error recovery now have a chance of recovering.

 o  All block device commands are tagged, with a numerical tag that
    will show up in debugging output and in packet captures; this will
    allow easier interpretation of bug reports that include both
    sources of information.

 o  The extremely ugly hacks used to generate the boot firmware tables
    have been eradicated and replaced with a generic acpi_describe()
    method (exploiting the ability of iPXE interfaces to pass through
    methods to an underlying interface).  The ACPI tables are now
    built in a shared data block within .bss16, rather than each
    requiring dedicated space in .data16.

 o  The architecture-independent concept of a SAN device has been
    exposed to the iPXE core through the sanboot API, which provides
    calls to hook, unhook, boot, and describe SAN devices.  This
    allows for much more flexible usage patterns (such as hooking an
    empty SAN device and then running an OS installer via TFTP).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-14 20:37:15 +01:00
Michael Brown 28934eef81 [retry] Hold reference while timer is running and during expiry callback
Guarantee that a retry timer cannot go out of scope while the timer is
running, and provide a guarantee to the expiry callback that the timer
will remain in scope during the entire callback (similar to the
guarantee provided to interface methods).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-03 21:28:43 +01:00
Piotr Jaroszyński b9eaf24df2 [build] Fix misaligned table entries when using gcc 4.5
Declarations without the accompanying __table_entry cause misalignment
of the table entries when using gcc 4.5.  Fix by adding the
appropriate __table_entry macro or (where possible) by removing
unnecessary forward declarations.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-20 10:13:04 +01:00
Michael Brown c760ac3022 [retry] Add timer_init() wrapper function
Standardise on using timer_init() to initialise an embedded retry
timer, to match the coding style used by other embedded objects.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 14:30:20 +01:00
Michael Brown 4bfd5b52c1 [refcnt] Add ref_init() wrapper function
Standardise on using ref_init() to initialise an embedded reference
count, to match the coding style used by other embedded objects.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 14:26:40 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Michael Brown d09290161e [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocol
IPoIB has a link-layer broadcast address that varies according to the
partition key.  We currently go through several contortions to pretend
that the link-layer address is a fixed constant; by making the
broadcast address a property of the network device rather than the
link-layer protocol it will be possible to simplify IPoIB's broadcast
handling.
2009-07-17 23:02:48 +01:00
Michael Brown 54ec3673cc [ata] Make ATA command issuing partially asynchronous
Move the icky call to step() from aoe.c to ata.c; this takes it at
least one step further away from where it really doesn't belong.

Unfortunately, AoE has the ugly aoe_discover() mechanism which means
that we still have a step() loop in aoe.c for now; this needs to be
replaced at some future point.
2009-07-17 23:01:20 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 246ddf5ee4 [aoe] Use an AoE config query to identify the target MAC address
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>
2008-11-19 21:42:33 +00:00
Michael Brown 43aa69d7b3 [aoe] Start retry timer before potential temporary transmission failure
The retry timer needs to be running as soon as we know that we are
trying to transmit a command.  If transmission fails because of a
temporary error condition, then the timer will allow us to retry the
transmission later.
2008-11-08 04:36:42 +00:00
Michael Brown 9fd6a0418f Allowed zero-cost enforced ordering of features in startup banner
list.

Added FEATURE() macros to most relevant (non-driver) files.
2007-08-02 14:51:03 +01:00
Michael Brown 67afe84292 Use otherwise-useless byte in DHCP feature option as a version number 2007-08-02 04:36:00 +01:00
Michael Brown 0acb016840 Add FEATURE() macro, plus code to display features at startup time,
and generate DHCP options to indicate features to DHCP server (and to
PXE NBPs).
2007-08-02 04:24:39 +01:00
Michael Brown 43013da9bf Quick hack to get AoE back in to the tree, on a par with the current
iSCSI hack.
2007-07-29 02:31:14 +01:00
Michael Brown f77815f2b1 Kill off hotplug.h and just make net devices normal reference-counted
structures.

DHCP still broken and #if 0'd out.
2007-06-27 14:48:31 +01:00
Michael Brown 3e2c6b6736 pkbuff->iobuf changeover
Achieved via Perl using:

perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \
	-e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \
	-e 's/pkb/iobuf/g; s/PKB/IOB/g;'
2007-05-19 18:39:40 +00:00
Michael Brown 73b09ecba6 Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00
Michael Brown 4e20d73bb5 Gave asynchronous operations approximate POSIX signal semantics. This
will enable us to cascade async operations, which is necessary in order to
properly support DNS.  (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).

Anything other than HTTP is probably broken right now; I'll fix the others
up asap.
2007-01-15 08:49:10 +00:00
Michael Brown b22d4405c0 An AoE session holds a persistent reference to a net device. 2007-01-04 03:21:45 +00:00
Marty Connor ee9ae8130a Remove _PROTOCOL macros for gcc 3.2 compatibility 2006-08-09 04:42:14 +00:00
Michael Brown 3c8aafa209 Simplify RX data path.
Kill off the static single net device and move to proper dynamic
registration (which we need with the new device model).

Break the (flawed) assumption that all network-layer protocols can use
ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP
protocol using ARP_NET_PROTOCOL() and provide a single method for checking
the existence of a local network-layer address.
2006-06-17 22:36:27 +00:00
Michael Brown bbd9e28061 Simplify TX datapath. 2006-06-16 00:19:46 +00:00
Michael Brown d78581297b Improve tcpdump legibility. 2006-06-01 19:23:52 +00:00
Michael Brown 48fb6c6dc2 Updated retry timer mechanism to incorporate smoothed RTT estimation.
AoE now uses the retry timer mechanism.
2006-06-01 14:33:52 +00:00
Michael Brown f6d20bb0f4 Put in a method to get the MAC address for the AoE target. (It's not
elegant, but it works).
2006-05-31 19:12:17 +00:00
Michael Brown 99ef98d0bf ATA devices are now asynchronous. The ATA layer itself now performs the
async_wait(), though we may wish to move this higher up the stack, and
consider making the block device model asynchronous.  (There is only a
marginal cost for synchronous devices, since they can simply call
async_done() before returning; async_wait() will work seamlessly in this
situation).
2006-05-31 18:57:11 +00:00
Michael Brown 68125bc441 Added generic asynchronous operations code.
Removed data_in_len and data_out_len from ata_command structure; the
lengths are implied by the sector count and the presence of the data_in
or data_out pointers.

Changed AoE code to use subcommands by default, and made aoe_issue()
nonblocking (with completion via async_wait()).
2006-05-31 14:34:17 +00:00
Michael Brown 6541338897 Handle multi-sector reads by splitting them into subcommands. 2006-05-29 08:25:31 +00:00
Michael Brown 9a2a52693d Initial AoE implementation. Limitations are:
Cannot yet handle reads of more than two sectors

  No retransmission

  No way to find out a target's MAC address (this proof of concept uses
  broadcasts)

These limitations shall not last long!  :)
2006-05-28 23:29:43 +00:00