aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-03-27 18:20:34 +0300
committerMichael Brown <mcb30@ipxe.org>2017-03-28 19:12:48 +0300
commit7cfdd769aac76d605aa31146c69ba518b194bea7 (patch)
tree7c09e144792833f81297e6dacf0823733a2a399a /src/usr
parent414b4fc9c531ceb15607f7c6edd8a959e0bd3065 (diff)
downloadipxe-7cfdd769aac76d605aa31146c69ba518b194bea7.zip
ipxe-7cfdd769aac76d605aa31146c69ba518b194bea7.tar.gz
ipxe-7cfdd769aac76d605aa31146c69ba518b194bea7.tar.bz2
[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>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/autoboot.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index a0c7935..10ccdc1 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -128,7 +128,9 @@ int uriboot ( struct uri *filename, struct uri **root_paths,
/* Hook SAN device, if applicable */
if ( root_path_count ) {
- drive = san_hook ( drive, root_paths, root_path_count );
+ drive = san_hook ( drive, root_paths, root_path_count,
+ ( ( flags & URIBOOT_NO_SAN_DESCRIBE ) ?
+ SAN_NO_DESCRIBE : 0 ) );
if ( drive < 0 ) {
rc = drive;
printf ( "Could not open SAN device: %s\n",
@@ -140,9 +142,9 @@ int uriboot ( struct uri *filename, struct uri **root_paths,
/* Describe SAN device, if applicable */
if ( ! ( flags & URIBOOT_NO_SAN_DESCRIBE ) ) {
- if ( ( rc = san_describe ( drive ) ) != 0 ) {
- printf ( "Could not describe SAN device %#02x: %s\n",
- drive, strerror ( rc ) );
+ if ( ( rc = san_describe() ) != 0 ) {
+ printf ( "Could not describe SAN devices: %s\n",
+ strerror ( rc ) );
goto err_san_describe;
}
}