summaryrefslogtreecommitdiffstats
path: root/src/include/pxe_types.h
diff options
context:
space:
mode:
authorMichael Brown2005-05-22 04:57:14 +0200
committerMichael Brown2005-05-22 04:57:14 +0200
commit22b7f0ec743c1bd8b856183c36ae60b8784ae8f8 (patch)
tree1a712eb6749021d744c0ad2f340478db569ba5e5 /src/include/pxe_types.h
parentWorked out a sensible doxygen grouping (diff)
downloadipxe-22b7f0ec743c1bd8b856183c36ae60b8784ae8f8.tar.gz
ipxe-22b7f0ec743c1bd8b856183c36ae60b8784ae8f8.tar.xz
ipxe-22b7f0ec743c1bd8b856183c36ae60b8784ae8f8.zip
Define PXE types in terms of other PXE types where possible
Diffstat (limited to 'src/include/pxe_types.h')
-rw-r--r--src/include/pxe_types.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/include/pxe_types.h b/src/include/pxe_types.h
index ce33f4d9..74815f67 100644
--- a/src/include/pxe_types.h
+++ b/src/include/pxe_types.h
@@ -17,7 +17,7 @@
/** @defgroup pxe_types PXE data types
*
- * Basic PXE data types such as #UINT16, #ADDR32, #SEGSEL etc.
+ * Basic PXE data types such as #UINT16_t, #ADDR32_t, #SEGSEL_t etc.
*
* These definitions are based on Table 1-1 ("Data Type Definitions")
* in the Intel PXE specification version 2.1. They have been
@@ -40,7 +40,7 @@ typedef uint32_t UINT32_t;
* Permitted values are #PXENV_EXIT_SUCCESS and #PXENV_EXIT_FAILURE.
*
*/
-typedef uint16_t PXENV_EXIT_t;
+typedef UINT16_t PXENV_EXIT_t;
#define PXENV_EXIT_SUCCESS 0x0000 /**< No error occurred */
#define PXENV_EXIT_FAILURE 0x0001 /**< An error occurred */
@@ -49,35 +49,37 @@ typedef uint16_t PXENV_EXIT_t;
* Status codes are defined in errno.h.
*
*/
-typedef uint16_t PXENV_STATUS_t;
+typedef UINT16_t PXENV_STATUS_t;
/** An IP address.
*
* This is an IPv4 address in host byte order.
*
*/
-typedef uint32_t IP4_t;
+typedef UINT32_t IP4_t;
/** A UDP port.
*
* @note This data type is in network (big-endian) byte order.
*
*/
-typedef uint16_t UDP_PORT_t;
+typedef UINT16_t UDP_PORT_t;
/** Maximum length of a MAC address */
#define MAC_ADDR_LEN 16
/** A MAC address */
-typedef uint8_t MAC_ADDR_t[MAC_ADDR_LEN];
+typedef UINT8_t MAC_ADDR_t[MAC_ADDR_LEN];
+#ifndef HAVE_ARCH_ADDR32
/** A physical address.
*
* For x86, this is a 32-bit physical address, and is therefore
* limited to the low 4GB.
*
*/
-typedef physaddr_t ADDR32_t;
+typedef UINT32_t ADDR32_t;
+#endif
#ifndef HAVE_ARCH_SEGSEL
/** A segment selector.
@@ -87,15 +89,24 @@ typedef physaddr_t ADDR32_t;
* segment register.
*
*/
-typedef uint16_t SEGSEL_t;
+typedef UINT16_t SEGSEL_t;
#endif
#ifndef HAVE_ARCH_OFF16
-/** An offset within a segment identified by #SEGSEL */
-typedef uint16_t OFF16_t;
+/** An offset within a segment identified by #SEGSEL
+ *
+ * For x86, this is a 16-bit offset.
+ *
+ */
+typedef UINT16_t OFF16_t;
#endif
-/** A segment:offset address */
+/** A segment:offset address
+ *
+ * For x86, this is a 16-bit real-mode or protected-mode
+ * segment:offset address.
+ *
+ */
typedef struct s_SEGOFF16 {
OFF16_t offset; /**< Offset within the segment */
SEGSEL_t segment; /**< Segment selector */