|
@@ -17,7 +17,7 @@
|
17
|
17
|
|
18
|
18
|
/** @defgroup pxe_types PXE data types
|
19
|
19
|
*
|
20
|
|
- * Basic PXE data types such as #UINT16, #ADDR32, #SEGSEL etc.
|
|
20
|
+ * Basic PXE data types such as #UINT16_t, #ADDR32_t, #SEGSEL_t etc.
|
21
|
21
|
*
|
22
|
22
|
* These definitions are based on Table 1-1 ("Data Type Definitions")
|
23
|
23
|
* in the Intel PXE specification version 2.1. They have been
|
|
@@ -40,7 +40,7 @@ typedef uint32_t UINT32_t;
|
40
|
40
|
* Permitted values are #PXENV_EXIT_SUCCESS and #PXENV_EXIT_FAILURE.
|
41
|
41
|
*
|
42
|
42
|
*/
|
43
|
|
-typedef uint16_t PXENV_EXIT_t;
|
|
43
|
+typedef UINT16_t PXENV_EXIT_t;
|
44
|
44
|
#define PXENV_EXIT_SUCCESS 0x0000 /**< No error occurred */
|
45
|
45
|
#define PXENV_EXIT_FAILURE 0x0001 /**< An error occurred */
|
46
|
46
|
|
|
@@ -49,35 +49,37 @@ typedef uint16_t PXENV_EXIT_t;
|
49
|
49
|
* Status codes are defined in errno.h.
|
50
|
50
|
*
|
51
|
51
|
*/
|
52
|
|
-typedef uint16_t PXENV_STATUS_t;
|
|
52
|
+typedef UINT16_t PXENV_STATUS_t;
|
53
|
53
|
|
54
|
54
|
/** An IP address.
|
55
|
55
|
*
|
56
|
56
|
* This is an IPv4 address in host byte order.
|
57
|
57
|
*
|
58
|
58
|
*/
|
59
|
|
-typedef uint32_t IP4_t;
|
|
59
|
+typedef UINT32_t IP4_t;
|
60
|
60
|
|
61
|
61
|
/** A UDP port.
|
62
|
62
|
*
|
63
|
63
|
* @note This data type is in network (big-endian) byte order.
|
64
|
64
|
*
|
65
|
65
|
*/
|
66
|
|
-typedef uint16_t UDP_PORT_t;
|
|
66
|
+typedef UINT16_t UDP_PORT_t;
|
67
|
67
|
|
68
|
68
|
/** Maximum length of a MAC address */
|
69
|
69
|
#define MAC_ADDR_LEN 16
|
70
|
70
|
|
71
|
71
|
/** A MAC address */
|
72
|
|
-typedef uint8_t MAC_ADDR_t[MAC_ADDR_LEN];
|
|
72
|
+typedef UINT8_t MAC_ADDR_t[MAC_ADDR_LEN];
|
73
|
73
|
|
|
74
|
+#ifndef HAVE_ARCH_ADDR32
|
74
|
75
|
/** A physical address.
|
75
|
76
|
*
|
76
|
77
|
* For x86, this is a 32-bit physical address, and is therefore
|
77
|
78
|
* limited to the low 4GB.
|
78
|
79
|
*
|
79
|
80
|
*/
|
80
|
|
-typedef physaddr_t ADDR32_t;
|
|
81
|
+typedef UINT32_t ADDR32_t;
|
|
82
|
+#endif
|
81
|
83
|
|
82
|
84
|
#ifndef HAVE_ARCH_SEGSEL
|
83
|
85
|
/** A segment selector.
|
|
@@ -87,15 +89,24 @@ typedef physaddr_t ADDR32_t;
|
87
|
89
|
* segment register.
|
88
|
90
|
*
|
89
|
91
|
*/
|
90
|
|
-typedef uint16_t SEGSEL_t;
|
|
92
|
+typedef UINT16_t SEGSEL_t;
|
91
|
93
|
#endif
|
92
|
94
|
|
93
|
95
|
#ifndef HAVE_ARCH_OFF16
|
94
|
|
-/** An offset within a segment identified by #SEGSEL */
|
95
|
|
-typedef uint16_t OFF16_t;
|
|
96
|
+/** An offset within a segment identified by #SEGSEL
|
|
97
|
+ *
|
|
98
|
+ * For x86, this is a 16-bit offset.
|
|
99
|
+ *
|
|
100
|
+ */
|
|
101
|
+typedef UINT16_t OFF16_t;
|
96
|
102
|
#endif
|
97
|
103
|
|
98
|
|
-/** A segment:offset address */
|
|
104
|
+/** A segment:offset address
|
|
105
|
+ *
|
|
106
|
+ * For x86, this is a 16-bit real-mode or protected-mode
|
|
107
|
+ * segment:offset address.
|
|
108
|
+ *
|
|
109
|
+ */
|
99
|
110
|
typedef struct s_SEGOFF16 {
|
100
|
111
|
OFF16_t offset; /**< Offset within the segment */
|
101
|
112
|
SEGSEL_t segment; /**< Segment selector */
|