4 /** @addtogroup pxe Preboot eXecution Environment (PXE) API
15 #include "pxe_addr.h" /* Architecture-specific PXE definitions */
16 #include "errno.h" /* PXE status codes */
18 /** @defgroup pxe_types PXE data types
20 * These definitions are based on Table 1-1 ("Data Type Definitions")
21 * in the Intel PXE specification version 2.1. They have been
22 * generalised to non-x86 architectures where possible.
27 /** An 8-bit unsigned integer */
28 typedef uint8_t UINT8;
30 /** A 16-bit unsigned integer */
31 typedef uint16_t UINT16;
33 /** A 32-bit unsigned integer */
34 typedef uint32_t UINT32;
38 * Permitted values are PXENV_EXIT_SUCCESS and PXENV_EXIT_FAILURE.
41 typedef uint16_t PXENV_EXIT;
43 /** A PXE status code.
45 * Status codes are defined in errno.h.
48 typedef uint16_t PXENV_STATUS;
52 * This is an IPv4 address in host byte order.
59 * Note that this is in network (big-endian) byte order.
62 typedef uint16_t UDP_PORT;
64 /** Maximum length of a MAC address */
65 #define MAC_ADDR_LEN 16
68 typedef uint8_t MAC_ADDR[MAC_ADDR_LEN];
70 /** A physical address.
72 * For x86, this is a 32-bit physical address, and is therefore
73 * limited to the low 4GB.
76 typedef physaddr_t ADDR32;
78 #ifndef HAVE_ARCH_SEGSEL
79 /** A segment selector.
81 * For x86, this is a real mode segment (0x0000-0xffff), or a
82 * protected-mode segment selector, such as could be loaded into a
86 typedef uint16_t SEGSEL;
89 #ifndef HAVE_ARCH_OFF16
90 /** An offset within a segment identified by #SEGSEL */
91 typedef uint16_t OFF16;
94 /** A segment:offset address */
95 typedef struct s_SEGOFF16 {
96 OFF16 offset; /**< Offset within the segment */
97 SEGSEL segment; /**< Segment selector */
98 } SEGOFF16 __attribute__ (( packed ));
100 /** A segment descriptor */
101 typedef struct s_SEGDESC {
102 SEGSEL segment_address; /**< Segment selector */
103 ADDR32 physical_address; /**< Base address of the segment */
104 OFF16 seg_size; /**< Size of the segment */
105 } SEGDESC __attribute__ (( packed ));
107 /** @} */ /* defgroup */
110 /** @} */ /* addtogroup */
112 #endif /* PXE_TYPES_H */