summaryrefslogtreecommitdiff
path: root/gpxe/src/arch/i386/include/pxe_addr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/arch/i386/include/pxe_addr.h')
-rw-r--r--gpxe/src/arch/i386/include/pxe_addr.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gpxe/src/arch/i386/include/pxe_addr.h b/gpxe/src/arch/i386/include/pxe_addr.h
new file mode 100644
index 00000000..954551e8
--- /dev/null
+++ b/gpxe/src/arch/i386/include/pxe_addr.h
@@ -0,0 +1,17 @@
+/*
+ * Architecture-specific portion of pxe.h for Etherboot
+ *
+ * This file has to define the types SEGOFF16_t, SEGDESC_t and
+ * SEGSEL_t for use in other PXE structures. See pxe.h for details.
+ */
+
+#ifndef PXE_ADDR_H
+#define PXE_ADDR_H
+
+#define IS_NULL_SEGOFF16(x) ( ( (x).segment == 0 ) && ( (x).offset == 0 ) )
+#define SEGOFF16_TO_PTR(x) ( VIRTUAL( (x).segment, (x).offset ) )
+#define PTR_TO_SEGOFF16(ptr,segoff16) \
+ (segoff16).segment = SEGMENT(ptr); \
+ (segoff16).offset = OFFSET(ptr);
+
+#endif /* PXE_ADDR_H */