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

3842 Commits

Author SHA1 Message Date
Malte Starostik 69b7d57265 [http] Include port in HTTP Host header as needed
According to section 14.23 of RFC2616, an HTTP Host header without
port implies the default port is used.  Thus, when fetching from
anywhere but port 80 for HTTP or 443 for HTTPS, the port ought to be
explicitly given in that header.  Otherwise, some servers might fail
to associate the request with the correct virtual host or generate
incorrect self-referencing URLs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15 16:46:58 +01:00
Thomas Miletich 5d23fb1bb4 [igb] Remove __BIG_ENDIAN conditional
Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15 16:44:57 +01:00
Michael Brown 9cf2f9dc2b [dhcp] Add symbolic definitions for DHCP client architecture values
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-06 15:26:43 +01:00
Michael Brown 66cbae73bd [libc] Allow for zero-padded decimals in printf()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-06 14:52:53 +01:00
Michael Brown 1b8984eb5d [iscsi] Avoid duplicate calls to iscsi_tx_done()
The iSCSI TX process can now be woken up by the TCP socket via
xfer_window_changed(), so it is no longer valid to assume that
iscsi_tx_step() can be called in state ISCSI_TX_IDLE only immediately
after completing a transmission.

Fix by calling iscsi_tx_done() only upon a transition into state
ISCSI_TX_IDLE.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-29 14:52:30 +01:00
Michael Brown 95d82bb2a2 [build] Avoid using -ffunction-sections on some older versions of gcc
Some older versions of gcc issue a warning if -ffunction-sections is
used in combination with -g (gcc bug #18553).  Inhibit
-ffunction-sections when building with such a version of gcc.

Reported-by: zhengwei <zw111_2001@126.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-29 11:48:29 +01:00
Michael Brown 00afad8122 [http] Fix size_t format specifiers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-29 11:48:29 +01:00
Michael Brown 2988b26653 [http] Support read-only HTTP block devices
Provide support for HTTP range requests, and expose this functionality
via the iPXE block device API.  This allows SAN booting from a root
path such as:

    sanboot http://boot.ipxe.org/freedos/fdfullcd.iso

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:14 +01:00
Michael Brown 69f5b2e8dc [int13] Provide a permanently closed window via the control interface
Allow objects to support both streaming and block device protocols, by
starting streaming data only when the data transfer window opens.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:13 +01:00
Michael Brown 5eb60f4883 [tls] Eliminate polling while TX state machine is idle
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:12 +01:00
Michael Brown bce34e87df [iscsi] Eliminate polling while waiting for window to open
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:12 +01:00
Michael Brown 3ad1a1a60a [http] Eliminate polling while waiting for window to open
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:12 +01:00
Michael Brown 5c9c39e299 [scsi] Eliminate polling while waiting for window to open
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:12 +01:00
Michael Brown 3915b660fd [hw] Eliminate polling while waiting for window to open
Polling for the data-transfer window to become open is wasteful.  We
can eliminate the polling loop by using hw_step() as the handler for
an xfer_window_changed() event.

If the window is already open at the time of instantiation, then
xfer_window_changed() may never be called.  We can cover this case by
using hw_step() as the step() method of a one-shot process.  Since the
signature for an xfer_window_changed() method is identical to the
signature for a process step() method, the same function can be used
for both.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:11 +01:00
Michael Brown 019d4c1c18 [infiniband] Use a one-shot process for CMRC shutdown
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:11 +01:00
Michael Brown ce3bc9e88b [fc] Use a one-shot process for Fibre Channel name server queries
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:10 +01:00
Michael Brown 08ac74b708 [fc] Use a one-shot process for Fibre Channel ELS requests
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:10 +01:00
Michael Brown 5694b71b11 [resolv] Use a one-shot process for the numeric resolver
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:09 +01:00
Michael Brown ccc2655540 [process] Add support for one-shot processes
Some processes execute only once, and exist solely in order to defer
execution until after the relevant instantiator method has returned.
Such processes do not need to be automatically rescheduled when
executing.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:09 +01:00
Michael Brown e01ec74601 [process] Pass containing object pointer to process step() methods
Give the step() method a pointer to the containing object, rather than
a pointer to the process.  This is consistent with the operation of
interface methods, and allows a single function to serve as both an
interface method and a process step() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:08 +01:00
Michael Brown ba3633782b [xfer] Send xfer_window_changed() after xfer_vredirect()
Modify the default action for xfer_vredirect() to automatically send
xfer_window_changed() messages to both the new child and the parent
interfaces.  This will allow the elimination of processes that simply
poll on xfer_window() to determine when a redirection has completed
successfully.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:08 +01:00
Michael Brown c68bf14559 [tcp] Send xfer_window_changed() when window opens
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:08 +01:00
Michael Brown 1e90ff0eb7 [infiniband] Send xfer_window_changed() when CMRC connection is established
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:07 +01:00
Michael Brown 0cc03ac76a [tls] Send xfer_window_changed() when TLS session is established
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:07 +01:00
Michael Brown 5f608a44a5 [fc] Send xfer_window_changed() when FCP link is established
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:07 +01:00
Michael Brown bf8bfa23e2 [fc] Maintain a list of Fibre Channel upper-layer protocol users
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:01 +01:00
Michael Brown 5763472b34 [ftp] Remove redundant ftp_data_deliver() method
ftp_data_deliver() does nothing except pass through the received data
to the xfer interface, and so can be eliminated by using a
pass-through interface.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 13:39:14 +01:00
Michael Brown be600ed996 [prefix] Cope with BOOT_IMAGE= anywhere within command line
Some bootloaders seem to add "BOOT_IMAGE=..." at the end of the
command line; some at the start.  Cope with either variation.

Reported-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 11:33:39 +01:00
Michael Brown cc7c2a9dcd [ipv4] Record ARP resolution errors
At the time of attempting ARP resolution, we already know the
transmitting network device.  We can therefore record ARP errors using
netdev_tx_err() so that they show up in the output of "ifstat".

Inspired-by: Dominik Russenberger <dominik.russenberger@terreactive.ch>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 10:21:30 +01:00
Michael Brown d6115c91cf [netdevice] Allow non-completion TX errors to be recorded
Allow TX errors to be recorded against a network device even when the
packet didn't make it as far as netdev_tx().

Inspired-by: Dominik Russenberger <dominik.russenberger@terreactive.ch>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 10:19:23 +01:00
Dominic Cleal 3fc139362c [build] Allow APPEND lines in ipxe.iso to function as expected
Signed-off-by: Dominic Cleal <dcleal@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-19 12:03:18 +01:00
Michael Brown c49659c4f2 [parseopt] Disambiguate the various EINVAL errors
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-18 09:39:27 +01:00
Michael Brown d4f0c5d088 [romprefix] Force PnP header to a 16-byte boundary for IBM BIOSes
IBM BIOSes ignore the PnP header offset stored at address 0x1a and
instead scan for the $PnP signature on a 16-byte boundary.  (This
alignment is not mandated by the PnP specification.)

Force PnP header to a 16-byte boundary to work around these BIOSes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-17 22:48:52 +01:00
Michael Brown fcd55f7500 [romprefix] Do not fall back to hooking INT19 by default
Several BIOSes (including most IBM BIOSes and many virtual machine
BIOSes) do not provide detectable PnP support, but will use the BEV
entry point for a PnP option ROM.  On these semi-PnP BIOSes, iPXE will
respond to the absence of detectable PnP support by hooking INT19,
which disrupts the boot order.

BIOSes that genuinely require hooking INT19 seem to be very rare
nowadays.  It may therefore be preferable to assume that the absence
of detectable PnP support indicates a semi-PnP BIOS rather than a
non-PnP BIOS.

Change the default behaviour so that INT19 will never be hooked unless
the compile-time option NONPNP_HOOK_INT19 is enabled.  Leave the
redundant PnP detection routine in-place to allow for debugging via
the ROM banner line.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-17 15:35:23 +01:00
Michael Brown 058b69d033 [romprefix] Remove special treatment for IBM BIOSes
Revert commit 38cd351 ("[romprefix] Attempt to gracefully handle
semi-PnP IBM BIOSes"), since the test for the "IBM " signature in %edi
is not sufficient to identify an IBM BIOS.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-17 15:27:47 +01:00
Floris Bos b7d923f468 [contrib] Update rom-o-matic to build iPXE
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-06 18:33:05 +01:00
Michael Brown c1cc769ef4 [ipv4] Include network device metadata in packet traces
(Ab)use the "ident" field in transmitted IPv4 packets to convey
metadata about the network device.  In particular:

    bits 0-3 represent the low bits of the "RX" good packet counter
    bits 4-7 represent the low bits of the "RXE" bad packet counter
    bits 8-15 represent the transmitted packet sequence number

This allows some relevant information about the internal state of the
network device to be read out from a packet trace from a non-debug
build of iPXE.  In particular, it allows a packet trace containing
packets transmitted by iPXE to indicate whether or not any packets
have been received by iPXE.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-05 18:10:31 +01:00
Michael Brown e58e4238b6 [bofm] Pass BOFM version 2 table to SetStatus() if applicable
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-05 16:52:44 +01:00
Michael Brown 8f51db233a [http] Support chunked transfer encoding
Booting from an HTTP SAN will require HTTP range requests, which are
defined only in HTTP/1.1 and above.  HTTP/1.1 mandates support for
"Transfer-Encoding: chunked", so we must support it.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-05 15:32:34 +01:00
Michael Brown e316684450 [bofm] Increase amount of debugging available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-05 12:16:28 +01:00
Michael Brown b6cad3c0eb [forcedeth] Ensure that IRQ line is deasserted when disabling interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 19:22:52 +01:00
Michael Brown c738a635cb [hermon] Remove temporary workaround for missing BOFM mport support
This reverts commit 15c1200 ("[hermon] Work around missing mport
support in current BOFM implementations").

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 17:00:05 +01:00
Michael Brown bfd8b3bff9 [bofm] Report {slot,port} to {bus:dev.fn,mport} mapping on newer BOFM builds
Newer BOFM builds provide support for mapping multiple physical ports
to a single PCI bus:dev.fn via PCI VPD descriptions.  These builds
will also leave the {slot,port} field intact, and will populate the
mport field with a meaningful value.

Older BOFM builds will zero out the {slot,port} field.  A zero value
in this field may indicate either a genuine zero value (i.e. slot 0
first port) or an older build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 12:14:37 +01:00
Michael Brown 7fc1a0a1c5 [bofm] Use "mport" rather than "port" to describe mport value
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 10:19:28 +01:00
Michael Brown 44689343c0 [bofm] Match port numbering as used in CSV file
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 10:14:47 +01:00
Michael Brown 38cd351243 [romprefix] Attempt to gracefully handle semi-PnP IBM BIOSes
Some IBM BIOSes provide partial support for PnP: they will use the BEV
entry point but will not advertise PnP support.  This causes iPXE to
hook INT 19, which disrupts the boot process.

Attempt to improve this situation by detecting an IBM BIOS and
treating it as a PnP BIOS despite the absence of a PnP signature.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 10:04:43 +01:00
Michael Brown 0b6808aadc [netdevice] Improve detection of bugs in drivers' TX completion handling
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-03 20:07:30 +01:00
Michael Brown df58a19015 [list] Add list_check_contains()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-03 20:02:07 +01:00
Michael Brown 9e3604168a [netdevice] Move high-frequency debug messages to DBGLVL_EXTRA
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-03 20:01:11 +01:00
Michael Brown 0a71888792 [efi] Ensure that each HII package list and formset has a unique GUID
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-03 18:55:05 +01:00