summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2008-07-17 18:45:17 +0200
committerMichael Brown2008-07-17 18:45:17 +0200
commit03c80c12b8e9019554c3bd4545cf68926ee1ce47 (patch)
treead2217eda5c315775a86708e166c85a9f04926ff /src/include
parent[phantom] Guard against partially-written status descriptors (diff)
downloadipxe-03c80c12b8e9019554c3bd4545cf68926ee1ce47.tar.gz
ipxe-03c80c12b8e9019554c3bd4545cf68926ee1ce47.tar.xz
ipxe-03c80c12b8e9019554c3bd4545cf68926ee1ce47.zip
[iSCSI] Support Windows Server 2008 direct iSCSI installation
Add yet another ugly hack to iscsiboot.c, this time to allow the user to inhibit the shutdown/removal of the iSCSI INT13 device (and the network devices, since they are required for the iSCSI device to function). On the plus side, the fact that shutdown() now takes flags to differentiate between shutdown-for-exit and shutdown-for-boot means that another ugly hack (to allow returning via the PXE stack on BIOSes that have broken INT 18 calls) will be easier. I feel dirty.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/device.h3
-rw-r--r--src/include/gpxe/dhcp.h15
-rw-r--r--src/include/gpxe/errfile.h1
-rw-r--r--src/include/gpxe/init.h14
-rw-r--r--src/include/usr/autoboot.h2
5 files changed, 27 insertions, 8 deletions
diff --git a/src/include/gpxe/device.h b/src/include/gpxe/device.h
index caabdae5..f40cc95a 100644
--- a/src/include/gpxe/device.h
+++ b/src/include/gpxe/device.h
@@ -105,7 +105,4 @@ struct root_driver {
/** Declare a root device */
#define __root_device __table ( struct root_device, root_devices, 01 )
-extern int probe_devices ( void );
-extern void remove_devices ( void );
-
#endif /* _GPXE_DEVICE_H */
diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h
index 61445977..1c9c49fa 100644
--- a/src/include/gpxe/dhcp.h
+++ b/src/include/gpxe/dhcp.h
@@ -164,7 +164,7 @@ struct dhcp_packet;
* priority of multiple option blocks (e.g. options from non-volatile
* storage versus options from a DHCP server).
*/
-#define DHCP_EB_PRIORITY DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 1 )
+#define DHCP_EB_PRIORITY DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x01 )
/** "Your" IP address
*
@@ -172,7 +172,7 @@ struct dhcp_packet;
* field, in order to provide a consistent approach to storing and
* processing options. It should never be present in a DHCP packet.
*/
-#define DHCP_EB_YIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 2 )
+#define DHCP_EB_YIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x02 )
/** "Server" IP address
*
@@ -180,7 +180,16 @@ struct dhcp_packet;
* field, in order to provide a consistent approach to storing and
* processing options. It should never be present in a DHCP packet.
*/
-#define DHCP_EB_SIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 3 )
+#define DHCP_EB_SIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x03 )
+
+/** Keep SAN drive registered
+ *
+ * If set to a non-zero value, gPXE will not detach any SAN drive
+ * after failing to boot from it. (This option is required in order
+ * to perform a Windows Server 2008 installation direct to an iSCSI
+ * target.)
+ */
+#define DHCP_EB_KEEP_SAN DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x08 )
/*
* Tags in the range 0x10-0x7f are reserved for feature markers
diff --git a/src/include/gpxe/errfile.h b/src/include/gpxe/errfile.h
index 5717bc71..ca0abebf 100644
--- a/src/include/gpxe/errfile.h
+++ b/src/include/gpxe/errfile.h
@@ -155,6 +155,7 @@
#define ERRFILE_ibft ( ERRFILE_OTHER | 0x000c0000 )
#define ERRFILE_tls ( ERRFILE_OTHER | 0x000d0000 )
#define ERRFILE_ifmgmt ( ERRFILE_OTHER | 0x000e0000 )
+#define ERRFILE_iscsiboot ( ERRFILE_OTHER | 0x000f0000 )
/** @} */
diff --git a/src/include/gpxe/init.h b/src/include/gpxe/init.h
index c468213e..d2b450d7 100644
--- a/src/include/gpxe/init.h
+++ b/src/include/gpxe/init.h
@@ -28,6 +28,16 @@ struct init_fn {
/** @} */
+/** Shutdown flags */
+enum shutdown_flags {
+ /** Shutdown is in order to exit (return to gPXE's caller) */
+ SHUTDOWN_EXIT = 0x0001,
+ /** Shutdown is in order to boot an OS */
+ SHUTDOWN_BOOT = 0x0002,
+ /** Do not remove devices */
+ SHUTDOWN_KEEP_DEVICES = 0x0004,
+};
+
/**
* A startup/shutdown function
*
@@ -36,7 +46,7 @@ struct init_fn {
*/
struct startup_fn {
void ( * startup ) ( void );
- void ( * shutdown ) ( void );
+ void ( * shutdown ) ( int flags );
};
/** Declare a startup/shutdown function */
@@ -58,6 +68,6 @@ struct startup_fn {
extern void initialise ( void );
extern void startup ( void );
-extern void shutdown ( void );
+extern void shutdown ( int flags );
#endif /* _GPXE_INIT_H */
diff --git a/src/include/usr/autoboot.h b/src/include/usr/autoboot.h
index b451a8c1..b64cbb8e 100644
--- a/src/include/usr/autoboot.h
+++ b/src/include/usr/autoboot.h
@@ -7,6 +7,8 @@
*
*/
+extern int shutdown_exit_flags;
+
extern void autoboot ( void );
extern int boot_root_path ( const char *root_path );