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

3655 Commits

Author SHA1 Message Date
Michael Brown 7d5dcc9299 [parseopt] Refer to online documentation for command help
The online documentation (e.g. http://ipxe.org/cmd/ifopen), though not
yet complete, is far more comprehensive than could be provided within
the iPXE binary.  Save around 200 bytes (compressed) by removing the
command descriptions from the interactive help, and instead referring
users directly to the web page describing the relevant command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-04 12:18:51 +00:00
Michael Brown 464cd1b3ce [arbel] Make driver 64-bit safe
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-04 02:00:12 +00:00
Michael Brown c0778b770c [hermon] Make driver 64-bit safe
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-04 02:00:11 +00:00
Michael Brown 960dee6dd0 [iscsi] Change default initiator IQN
The default initiator IQN is "iqn.2000-09.org.etherboot:UNKNOWN".
This is problematic for two reasons:

  a) the etherboot.org domain (and hence the associated IQN namespace)
     is not under the control of the iPXE project, and

  b) some targets (correctly) refuse to allow concurrent connections
     from different initiators using the same initiator IQN.

Solve both problems by changing the default initiator IQN to be

  iqn.2010-04.org.ipxe:<hostname> if a hostname is set, or

  iqn.2010-04.org.ipxe:<uuid> if no hostname is set.

Explicit initiator IQNs set via DHCP option 203 are not affected by
this change.

Unfortunately, this change is likely to break some existing
configurations, where ACL rules have been put in place referring to
the old default initiator IQN.  Users may need to update ACLs, or
force the use of the old IQN using an iPXE script line such as

  set initiator-iqn iqn.2000-09.org.etherboot:UNKNOWN

or a dhcpd.conf option such as

   option iscsi-initiator-iqn "iqn.2000-09.org.etherboot:UNKNOWN"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 22:23:44 +00:00
Michael Brown bbe265e08b [dns] Fix memory leak in settings applicator
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 20:09:29 +00:00
Michael Brown 48a4001152 [settings] Make fetch_string_setting_copy() easier to use
Most callers of functions in the fetch_setting() family treat any
errors as meaning "non-existent setting".  In the case of
fetch_string_setting_copy(), an existent setting can still result in
an error due to memory allocation failure.

Allow the caller to distinguish between a non-existent setting and an
error in allocating memory for the copy, by returning success (and a
NULL buffer pointer) for a non-existent setting.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 20:03:08 +00:00
Michael Brown 09695f7be9 [settings] Avoid fetch_string_setting_copy() leaving an uninitialised pointer
For consistency with other functions in the fetch_setting() family,
ensure that fetch_string_setting_copy() always initialises the pointer
to the fetched setting even if fetching fails.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 17:13:44 +00:00
Michael Brown e809985ca9 [hermon] Add BOFM support
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 02:40:12 +00:00
Michael Brown d157e249f3 [bofm] Allow garbage collection of BOFM code in non-BOFM builds
Most builds will not have BOFM enabled.  In these builds, allow all
BOFM code (including BOFM-only code within the individual drivers) to
be garbage-collected at link time in order to save space in the final
binary.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 02:40:11 +00:00
Michael Brown 85eefad90c [bofm] Add support for BOFM under EFI
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-03 02:40:04 +00:00
Michael Brown bdd00e872a [bofm] Add offline BOFM test facility
Testing BOFM involves gaining access to an IBM blade chassis, which is
often not practical.  Provide a facility for testing BOFM
functionality outside of a real IBM blade context.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 23:58:43 +00:00
Michael Brown 5597d52c21 [bofm] Add core BOFM library
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 23:58:43 +00:00
Michael Brown ce350e4314 [autoboot] Allow a SAN boot as a fallback if a filename boot returns
Currently, if both a filename and root-path are present, iPXE will
hook the SAN device but will only attempt to boot from the filename.
Change this behaviour so that both are attempted.  Users who want to
avoid booting from the SAN as a fallback can do so via the existing
"skip-san-boot" setting.

This allows for seamless deployment to a SAN target using Windows
Deployment Services (and similar products).  A user simply has to
define the root-path option in DHCP and then use WDS to deploy the
system.  No further configuration should be required.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 20:01:26 +00:00
Michael Brown 8a61e37e2e [autoboot] Tidy up output following NBP execution
If the NBP returns, then always print a trailing newline, since some
NBPs (e.g. wdsnbp.com) leave the cursor in a random position halfway
across the screen.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 19:39:39 +00:00
Michael Brown 3c9c27b8e6 [image] Allow download job to complete before acting upon image
Allow the monojob controlling the download to complete before calling
register_image() and friends.  This allows the trailing "ok" from
monojob.c to be printed before the image starts executing (and
possibly printing output of its own).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 19:29:24 +00:00
Michael Brown 560cc637f9 [int13] Automatically reopen underlying block device as needed
We currently use INT 13,00 as an opportunity to reopen the underlying
block device, which works well for callers such as DOS that will use
INT 13,00 in response to any disk errors.  However, some callers (such
as Windows Server 2008) do not attempt to reset the disk, and so any
failures become effectively permanent.

Fix this by automatically reopening the underlying block device
whenever we might want to access it.

This makes direct installation of Windows to an iSCSI target much more
reliable.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 15:52:25 +00:00
Michael Brown 90563f69be [prefix] Set the "size" bit in the GDT entry for the flat data segment
The "size" bit (aka the D/B) bit should (as far as I can tell) be
irrelevant for accesses to a non-code, non-stack, expand-upwards
segment.  However, VirtualBox fails on some accesses via this segment
if this bit is not set.

This change allows iPXE to boot under VirtualBox without having to
disable VT-x/AMD-V support.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-01 16:09:09 +00:00
Michael Brown 17ef28414f [prefix] Add rudimentary debugging messages to libprefix
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-01 14:49:25 +00:00
Michael Brown 3f13e3d5d2 [build] Allow DEBUG=... to affect builds of assembler source files
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-01 14:18:35 +00:00
Michael Brown e583afb977 [autoboot] Use a custom error number for "nothing to boot"
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-28 18:43:54 +00:00
Michael Brown 7617e36f9e [autoboot] Add an iPXE error URI to the "nothing to boot" message
Change the message "No filename or root path specified" to include an
iPXE error URI.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-28 18:35:56 +00:00
Michael Brown 27578ec8c1 [linux] Remove Linux-specific code from default (non-Linux) build
Building the Linux-specific code (tap.o et al) requires external
headers that have proven to be extremely variable across systems,
causing frequent build failures.

Until this situation is rectified, remove the Linux-specific code from
the default (non-Linux build).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-25 17:46:56 +00:00
Michael Brown ef87c4ad08 [iscsi] Clarify support for NOP-In
After a more accurate reading of RFC 3720, it becomes clear how NOPs
are supposed to work.  The current implementation (which just ignores
NOP-Ins) is sufficient to cope with NOP-Ins sent to update CmdSN, but
will need to be extended before it can cope with NOP-Ins sent as iSCSI
keepalives.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-25 11:11:30 +00:00
Michael Brown 9625132bf5 [iscsi] Verify the correct tag in NOP-In PDUs
We should be checking the target transfer tag, rather than the
initiator task tag.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-25 10:41:23 +00:00
Michael Brown def5b67560 [iscsi] Fix minor typo in ibft_set_ipaddr()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-24 23:39:38 +00:00
Michael Brown 711df439df [iscsi] Accept NOP-In PDUs sent by the target
Some iSCSI targets (observed with a Synology DS207+ NAS) send
unsolicited NOP-Ins to the initiator.  RFC 3720 is remarkably unclear
and possibly self-contradictory on how NOPs are supposed to work, but
it seems as though we can legitimately just ignore any unsolicited
NOP-In PDU.

Reported-by: Marc Lecuyer <marc@maxiscreen.com>
Originally-implemented-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-24 13:25:32 +00:00
Michael Brown 030e5a064e [build] Use unique entry symbols for each prefix
Some binutils versions will drag in an object to satisfy the entry
symbol; some won't.  Try to cope with this exciting variety of
behaviour by ensuring that all entry symbols are unique.

Remove the explicit inclusion of the prefix object on the linker
command line, since the entry symbol now provides all the information
needed to identify the prefix.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-23 21:12:56 +00:00
Michael Brown 295c2fd671 [build] Ensure an entry point symbol exists in all builds
Commit 623469d ("[build] Eliminate unused sections at link-time")
introduced a regression in several build formats, in which the prefix
would end up being garbage-collected out of existence.  Fix by
ensuring that an entry symbol exists in each possible prefix, and is
required by the linker script.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-23 20:23:03 +00:00
Michael Brown 7ef314514c [iscsi] Disambiguate the expected target errors in the login response
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-23 09:52:02 +00:00
Michael Brown 623469de5d [build] Eliminate unused sections at link-time
Use -ffunction-sections, -fdata-sections, and --gc-sections to
automatically prune out any unreferenced sections.

This saves around 744 bytes (uncompressed) from the rtl8139.rom build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-22 21:02:00 +00:00
Michael Brown f3c72660a7 [int13] Add missing "static" modifier
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-22 19:26:33 +00:00
Michael Brown 14a8b4bfef [efi] Provide space for storing the EFI driver name
Commit d7736fb ("[efi] Allow EFI to control PCI bus enumeration")
introduced a bug in which the EFI driver name became an
(uninitialised) pointer rather than an array.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-22 17:12:18 +00:00
Michael Brown d7736fbb7b [efi] Allow EFI to control PCI bus enumeration
EFI performs its own PCI bus enumeration.  Respect this, and start
controlling devices only when instructed to do so by EFI.

As a side benefit, we should now correctly create multiple SNP
instances for multi-port devices.

This should also fix the problem of failing to enumerate devices
because the PCI bridges have not yet been enabled at the time the iPXE
driver is loaded.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 02:56:55 +00:00
Michael Brown e2b5a58869 [efi] Rename efi_pci.h to efi_pci_api.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:59:30 +00:00
Michael Brown 4f4c214621 [pci] Modularise PCI device support
Some operating environments require (or at least prefer) that we do
not perform our own PCI bus scan, but deal only with specified
devices.  Modularise the PCI core to allow for this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:59:24 +00:00
Michael Brown 5bde349e55 [pci] Make driver PCI ID a property of the PCI device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:12 +00:00
Michael Brown abb5590b29 [pci] Replace pci_max_bus() with pci_num_bus()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:11 +00:00
Michael Brown f9b3fae8d4 [pci] Use single "busdevfn" field in struct pci_device
Merge the "bus" and "devfn" fields into a single "busdevfn" field, to
match the format used by the majority of external code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:11 +00:00
Michael Brown 00f5ba701f [bitops] Add missing __attribute__ (( packed ))
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:10 +00:00
Michael Brown e8c636fe75 [hermon] Add missing __attribute__ (( packed ))
On 64-bit builds, MLX_DECLARE_STRUCT() produces a structure that is
always a multiple of 64 bits long, causing the HCR structure to be
over-length by one dword.  This in turn causes hermon_cmd() to write
beyond the end of the HCR, which causes commands to fail.

Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:10 +00:00
Itay Gazit 0e878b30fe [hermon] Force link speed to SDR
SDR link comes up much faster than other speeds.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:10 +00:00
Itay Gazit 1b84a80442 [hermon] Use circular event queue
Avoid memory leak of untreated events by having circular event queue
operation.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:09 +00:00
Itay Gazit 399be05865 [hermon] Update PRM file with latest changes
Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:09 +00:00
Itay Gazit 56b6613e94 [hermon] Fix hermon_cmd_sense_port() to use inline output
Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:08 +00:00
Eduardo Habkost 3293eb8e73 [pcbios] Merge adjacent memory regions of same type
Some BIOSes can report multiple memory regions which may be adjacent
and the same type.  Since only the first region is used in the
mboot.c32 layer it's possible to run out of memory when loading all of
the boot modules.  One may get around this problem by having iPXE
merge these memory regions internally.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:08 +00:00
Thomas Miletich 72d387eac1 [3c90x] Clean up reset code
Remove duplicate hardware resets, remove network interface logic
reset.

This also fixes a bug where some 3c905C variants would return bogus
EEPROM values because of a too short delay after the network reset.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Reported-by: Peter Huewe <peterhuewe@gmx.de>
Tested-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-08 19:10:55 +00:00
Thomas Miletich db331b535a [3c90x] More fine-grained debugging levels
DBG is reserved for errors and important warnings only.
DBG2 for additional information, e.g. "received packet".
DBGP is used to print the name of every function as it is called.

Signed-off-by: Thomas Miletich<thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-08 19:10:45 +00:00
Michael Brown 88b8aa0f65 [autoboot] Cope properly with empty DHCP filenames
This (hopefully) fixes a regression introduced in commit e088892
("[autoboot] Connect SAN disk during a filename boot, if applicable").

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-01 04:26:19 +00:00
Michael Brown d77b183f10 [uri] Add uri_has_path()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-01 04:25:19 +00:00
Michael Brown a3252028d7 [autoboot] Avoid using uri_dup() for constructed TFTP URI
uri_dup() chokes on duplicating a URI with a path that does not begin
with a slash.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-01 02:56:06 +00:00