mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 10:02:42 +03:00
[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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
extern int shutdown_exit_flags;
|
||||
|
||||
extern void autoboot ( void );
|
||||
extern int boot_root_path ( const char *root_path );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user