mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
Define PXE types in terms of other PXE types where possible
This commit is contained in:
parent
1e0a5d8b30
commit
22b7f0ec74
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user