aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/include
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-07 22:41:29 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-07 22:41:29 -0700
commitc14f98ab23dbc912aa9db26d86434a4d2bd80a5f (patch)
treea0b1d6fd48ad30f8af19a88d11a8f4e61cebf52f /gpxe/src/include
parent3506d7fb195922b04c941650b1512440bdcc89e4 (diff)
downloadsyslinux.git-c14f98ab23dbc912aa9db26d86434a4d2bd80a5f.tar.gz
syslinux.git-c14f98ab23dbc912aa9db26d86434a4d2bd80a5f.tar.xz
syslinux.git-c14f98ab23dbc912aa9db26d86434a4d2bd80a5f.zip
gPXE: update gPXE to current git
Update gPXE to current git. gpxe-for-syslinux e3ef2094cfa26f874c5f8dbd687eb311830efcf0 gpxe main tree 8223084afc206000312611a3fcfa30a28500d1a3
Diffstat (limited to 'gpxe/src/include')
-rw-r--r--gpxe/src/include/gpxe/chap.h16
-rw-r--r--gpxe/src/include/gpxe/device.h3
-rw-r--r--gpxe/src/include/gpxe/dhcp.h37
-rw-r--r--gpxe/src/include/gpxe/errfile.h2
-rw-r--r--gpxe/src/include/gpxe/features.h1
-rw-r--r--gpxe/src/include/gpxe/hidemem.h12
-rw-r--r--gpxe/src/include/gpxe/init.h14
-rw-r--r--gpxe/src/include/gpxe/initrd.h14
-rw-r--r--gpxe/src/include/gpxe/iscsi.h30
-rw-r--r--gpxe/src/include/gpxe/netdevice.h26
-rw-r--r--gpxe/src/include/gpxe/pci.h1
-rw-r--r--gpxe/src/include/gpxe/retry.h16
-rw-r--r--gpxe/src/include/gpxe/settings.h1
-rw-r--r--gpxe/src/include/gpxe/vsprintf.h3
-rw-r--r--gpxe/src/include/usr/autoboot.h2
15 files changed, 119 insertions, 59 deletions
diff --git a/gpxe/src/include/gpxe/chap.h b/gpxe/src/include/gpxe/chap.h
index 0ea7ac5c..a7059cdb 100644
--- a/gpxe/src/include/gpxe/chap.h
+++ b/gpxe/src/include/gpxe/chap.h
@@ -12,8 +12,8 @@
struct crypto_algorithm;
-/** A CHAP challenge/response */
-struct chap_challenge {
+/** A CHAP response */
+struct chap_response {
/** Digest algorithm used for the response */
struct crypto_algorithm *digest;
/** Context used by the digest algorithm */
@@ -24,24 +24,24 @@ struct chap_challenge {
size_t response_len;
};
-extern int chap_init ( struct chap_challenge *chap,
+extern int chap_init ( struct chap_response *chap,
struct crypto_algorithm *digest );
-extern void chap_update ( struct chap_challenge *chap, const void *data,
+extern void chap_update ( struct chap_response *chap, const void *data,
size_t len );
-extern void chap_respond ( struct chap_challenge *chap );
-extern void chap_finish ( struct chap_challenge *chap );
+extern void chap_respond ( struct chap_response *chap );
+extern void chap_finish ( struct chap_response *chap );
/**
* Add identifier data to the CHAP challenge
*
- * @v chap CHAP challenge/response
+ * @v chap CHAP response
* @v identifier CHAP identifier
*
* The CHAP identifier is the first byte of the CHAP challenge. This
* function is a notational convenience for calling chap_update() for
* the identifier byte.
*/
-static inline void chap_set_identifier ( struct chap_challenge *chap,
+static inline void chap_set_identifier ( struct chap_response *chap,
unsigned int identifier ) {
uint8_t ident_byte = identifier;
diff --git a/gpxe/src/include/gpxe/device.h b/gpxe/src/include/gpxe/device.h
index caabdae5..f40cc95a 100644
--- a/gpxe/src/include/gpxe/device.h
+++ b/gpxe/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/gpxe/src/include/gpxe/dhcp.h b/gpxe/src/include/gpxe/dhcp.h
index 61445977..c5ed0ead 100644
--- a/gpxe/src/include/gpxe/dhcp.h
+++ b/gpxe/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
@@ -232,6 +241,24 @@ struct dhcp_packet;
*/
#define DHCP_EB_PASSWORD DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbf )
+/** Reverse username
+ *
+ * This will be used as the reverse username (i.e. the username
+ * provided by the server) for any required authentication. It is
+ * expected that this option's value will be held in non-volatile
+ * storage, rather than transmitted as part of a DHCP packet.
+ */
+#define DHCP_EB_REVERSE_USERNAME DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc0 )
+
+/** Reverse password
+ *
+ * This will be used as the reverse password (i.e. the password
+ * provided by the server) for any required authentication. It is
+ * expected that this option's value will be held in non-volatile
+ * storage, rather than transmitted as part of a DHCP packet.
+ */
+#define DHCP_EB_REVERSE_PASSWORD DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc1 )
+
/** iSCSI primary target IQN */
#define DHCP_ISCSI_PRIMARY_TARGET_IQN 201
@@ -439,6 +466,10 @@ struct dhcphdr {
/** Maximum time that we will wait for ProxyDHCP responses */
#define PROXYDHCP_WAIT_TIME ( TICKS_PER_SEC * 1 )
+/** Timeouts for sending DHCP packets */
+#define DHCP_MIN_TIMEOUT ( 1 * TICKS_PER_SEC )
+#define DHCP_MAX_TIMEOUT ( 10 * TICKS_PER_SEC )
+
/** Settings block name used for DHCP responses */
#define DHCP_SETTINGS_NAME "dhcp"
diff --git a/gpxe/src/include/gpxe/errfile.h b/gpxe/src/include/gpxe/errfile.h
index a0591952..ca0abebf 100644
--- a/gpxe/src/include/gpxe/errfile.h
+++ b/gpxe/src/include/gpxe/errfile.h
@@ -105,6 +105,7 @@
#define ERRFILE_e1000 ( ERRFILE_DRIVER | 0x00480000 )
#define ERRFILE_e1000_hw ( ERRFILE_DRIVER | 0x00490000 )
#define ERRFILE_mtnic ( ERRFILE_DRIVER | 0x004a0000 )
+#define ERRFILE_phantom ( ERRFILE_DRIVER | 0x004b0000 )
#define ERRFILE_scsi ( ERRFILE_DRIVER | 0x00700000 )
#define ERRFILE_arbel ( ERRFILE_DRIVER | 0x00710000 )
@@ -154,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/gpxe/src/include/gpxe/features.h b/gpxe/src/include/gpxe/features.h
index 70daac37..107ff085 100644
--- a/gpxe/src/include/gpxe/features.h
+++ b/gpxe/src/include/gpxe/features.h
@@ -45,6 +45,7 @@
#define DHCP_EB_FEATURE_NBI 0x20 /**< NBI format */
#define DHCP_EB_FEATURE_PXE 0x21 /**< PXE format */
#define DHCP_EB_FEATURE_ELF 0x22 /**< ELF format */
+#define DHCP_EB_FEATURE_COMBOOT 0x23 /**< COMBOOT format */
/** @} */
diff --git a/gpxe/src/include/gpxe/hidemem.h b/gpxe/src/include/gpxe/hidemem.h
index 547f8881..010fdb58 100644
--- a/gpxe/src/include/gpxe/hidemem.h
+++ b/gpxe/src/include/gpxe/hidemem.h
@@ -8,16 +8,8 @@
*
*/
-/**
- * Unique IDs for hidden regions
- */
-enum hidemem_region_id {
- TEXT = 0,
- BASEMEM,
- EXTMEM,
-};
+#include <stdint.h>
-extern void hide_region ( unsigned int region_id, physaddr_t start,
- physaddr_t end );
+extern void hide_umalloc ( physaddr_t start, physaddr_t end );
#endif /* _GPXE_HIDEMEM_H */
diff --git a/gpxe/src/include/gpxe/init.h b/gpxe/src/include/gpxe/init.h
index c468213e..d2b450d7 100644
--- a/gpxe/src/include/gpxe/init.h
+++ b/gpxe/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/gpxe/src/include/gpxe/initrd.h b/gpxe/src/include/gpxe/initrd.h
deleted file mode 100644
index 1871bf78..00000000
--- a/gpxe/src/include/gpxe/initrd.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _GPXE_INITRD_H
-#define _GPXE_INITRD_H
-
-/**
- * @file
- *
- * Linux initrd image format
- *
- */
-
-#include <gpxe/image.h>
-extern struct image_type initrd_image_type __image_type ( PROBE_NORMAL );
-
-#endif /* _GPXE_INITRD_H */
diff --git a/gpxe/src/include/gpxe/iscsi.h b/gpxe/src/include/gpxe/iscsi.h
index 5c446757..fd96fdfe 100644
--- a/gpxe/src/include/gpxe/iscsi.h
+++ b/gpxe/src/include/gpxe/iscsi.h
@@ -522,12 +522,25 @@ struct iscsi_session {
*/
int retry_count;
- /** Username (if any) */
- char *username;
- /** Password (if any) */
- char *password;
- /** CHAP challenge/response */
- struct chap_challenge chap;
+ /** Initiator username (if any) */
+ char *initiator_username;
+ /** Initiator password (if any) */
+ char *initiator_password;
+ /** Target username (if any) */
+ char *target_username;
+ /** Target password (if any) */
+ char *target_password;
+ /** Target has authenticated acceptably */
+ int target_auth_ok;
+ /** CHAP challenge (for target auth only)
+ *
+ * This is a block of random data; the first byte is used as
+ * the CHAP identifier (CHAP_I) and the remainder as the CHAP
+ * challenge (CHAP_C).
+ */
+ unsigned char chap_challenge[17];
+ /** CHAP response (used for both initiator and target auth) */
+ struct chap_response chap;
/** Target session identifying handle
*
@@ -642,8 +655,11 @@ struct iscsi_session {
/** iSCSI session needs to send the CHAP response */
#define ISCSI_STATUS_STRINGS_CHAP_RESPONSE 0x0400
+/** iSCSI session needs to send the mutual CHAP challenge */
+#define ISCSI_STATUS_STRINGS_CHAP_CHALLENGE 0x0800
+
/** iSCSI session needs to send the operational negotiation strings */
-#define ISCSI_STATUS_STRINGS_OPERATIONAL 0x0800
+#define ISCSI_STATUS_STRINGS_OPERATIONAL 0x1000
/** Mask for all iSCSI "needs to send" flags */
#define ISCSI_STATUS_STRINGS_MASK 0xff00
diff --git a/gpxe/src/include/gpxe/netdevice.h b/gpxe/src/include/gpxe/netdevice.h
index 1ef648e1..cdc8cbad 100644
--- a/gpxe/src/include/gpxe/netdevice.h
+++ b/gpxe/src/include/gpxe/netdevice.h
@@ -76,7 +76,7 @@ struct ll_protocol {
/** Protocol name */
const char *name;
/**
- * Transmit network-layer packet via network device
+ * Add link-layer header
*
* @v iobuf I/O buffer
* @v netdev Network device
@@ -85,24 +85,28 @@ struct ll_protocol {
* @ret rc Return status code
*
* This method should prepend in the link-layer header
- * (e.g. the Ethernet DIX header) and transmit the packet.
- * This method takes ownership of the I/O buffer.
+ * (e.g. the Ethernet DIX header).
*/
- int ( * tx ) ( struct io_buffer *iobuf, struct net_device *netdev,
- struct net_protocol *net_protocol,
- const void *ll_dest );
+ int ( * push ) ( struct io_buffer *iobuf, struct net_device *netdev,
+ struct net_protocol *net_protocol,
+ const void *ll_dest );
/**
- * Handle received packet
+ * Remove link-layer header
*
* @v iobuf I/O buffer
* @v netdev Network device
+ * @v net_proto Network-layer protocol, in network-byte order
+ * @v ll_source Source link-layer address
+ * @ret rc Return status code
*
* This method should strip off the link-layer header
- * (e.g. the Ethernet DIX header) and pass the packet to
- * net_rx(). This method takes ownership of the packet
- * buffer.
+ * (e.g. the Ethernet DIX header) and return the protocol and
+ * source link-layer address. The method must not alter the
+ * packet content, and may return the link-layer address as a
+ * pointer to data within the packet.
*/
- int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev );
+ int ( * pull ) ( struct io_buffer *iobuf, struct net_device *netdev,
+ uint16_t *net_proto, const void **ll_source );
/**
* Transcribe link-layer address
*
diff --git a/gpxe/src/include/gpxe/pci.h b/gpxe/src/include/gpxe/pci.h
index fdcecb6d..90721574 100644
--- a/gpxe/src/include/gpxe/pci.h
+++ b/gpxe/src/include/gpxe/pci.h
@@ -156,6 +156,7 @@
#define PCI_CAP_ID_SLOTID 0x04 /* Slot Identification */
#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */
+#define PCI_CAP_ID_EXP 0x10 /* PCI Express */
#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */
#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */
#define PCI_CAP_SIZEOF 4
diff --git a/gpxe/src/include/gpxe/retry.h b/gpxe/src/include/gpxe/retry.h
index 71982fca..ec57db9e 100644
--- a/gpxe/src/include/gpxe/retry.h
+++ b/gpxe/src/include/gpxe/retry.h
@@ -9,12 +9,28 @@
#include <gpxe/list.h>
+/** Default timeout value */
+#define DEFAULT_MIN_TIMEOUT ( TICKS_PER_SEC / 4 )
+
+/** Limit after which the timeout will be deemed permanent */
+#define DEFAULT_MAX_TIMEOUT ( 10 * TICKS_PER_SEC )
+
/** A retry timer */
struct retry_timer {
/** List of active timers */
struct list_head list;
/** Timeout value (in ticks) */
unsigned long timeout;
+ /** Minimum timeout value (in ticks)
+ *
+ * A value of zero means "use default timeout."
+ */
+ unsigned long min_timeout;
+ /** Maximum timeout value before failure (in ticks)
+ *
+ * A value of zero means "use default timeout."
+ */
+ unsigned long max_timeout;
/** Start time (in ticks)
*
* A start time of zero indicates a stopped timer.
diff --git a/gpxe/src/include/gpxe/settings.h b/gpxe/src/include/gpxe/settings.h
index ae5a259d..78f3e698 100644
--- a/gpxe/src/include/gpxe/settings.h
+++ b/gpxe/src/include/gpxe/settings.h
@@ -215,6 +215,7 @@ extern struct setting password_setting __setting;
extern struct setting priority_setting __setting;
extern struct setting bios_drive_setting __setting;
extern struct setting uuid_setting __setting;
+extern struct setting next_server_setting __setting;
/**
* Initialise a settings block
diff --git a/gpxe/src/include/gpxe/vsprintf.h b/gpxe/src/include/gpxe/vsprintf.h
index 9360f29b..aa8f8a33 100644
--- a/gpxe/src/include/gpxe/vsprintf.h
+++ b/gpxe/src/include/gpxe/vsprintf.h
@@ -66,6 +66,7 @@ extern size_t vcprintf ( struct printf_context *ctx, const char *fmt,
va_list args );
extern int vssnprintf ( char *buf, ssize_t ssize, const char *fmt,
va_list args );
-extern int ssnprintf ( char *buf, ssize_t ssize, const char *fmt, ... );
+extern int __attribute__ (( format ( printf, 3, 4 ) ))
+ssnprintf ( char *buf, ssize_t ssize, const char *fmt, ... );
#endif /* _GPXE_VSPRINTF_H */
diff --git a/gpxe/src/include/usr/autoboot.h b/gpxe/src/include/usr/autoboot.h
index b451a8c1..b64cbb8e 100644
--- a/gpxe/src/include/usr/autoboot.h
+++ b/gpxe/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 );