summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/pxe_addr.h
diff options
context:
space:
mode:
authorMichael Brown2005-05-24 00:45:48 +0200
committerMichael Brown2005-05-24 00:45:48 +0200
commit8becf0f65f8b7ca7afe1f9862c8fb4c49cff3640 (patch)
tree2f446f7b3b1dc2188b136df83d4b78abcf52058e /src/arch/i386/include/pxe_addr.h
parentthe uncontroversal gcc 4.0 compilation fixes (diff)
downloadipxe-8becf0f65f8b7ca7afe1f9862c8fb4c49cff3640.tar.gz
ipxe-8becf0f65f8b7ca7afe1f9862c8fb4c49cff3640.tar.xz
ipxe-8becf0f65f8b7ca7afe1f9862c8fb4c49cff3640.zip
Rearranging PXE header files
Diffstat (limited to 'src/arch/i386/include/pxe_addr.h')
-rw-r--r--src/arch/i386/include/pxe_addr.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/arch/i386/include/pxe_addr.h b/src/arch/i386/include/pxe_addr.h
new file mode 100644
index 000000000..b7cc6f843
--- /dev/null
+++ b/src/arch/i386/include/pxe_addr.h
@@ -0,0 +1,35 @@
+/*
+ * 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
+
+/* SEGOFF16_t defined in separate header
+ */
+#include "realmode.h"
+typedef segoff_t I386_SEGOFF16_t;
+#define SEGOFF16_t I386_SEGOFF16_t
+
+#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);
+
+typedef struct {
+ uint16_t Seg_Addr;
+ uint32_t Phy_Addr;
+ uint16_t Seg_Size;
+} PACKED I386_SEGDESC_t; /* PACKED is required, otherwise gcc pads
+ * this out to 12 bytes -
+ * mbrown@fensystems.co.uk (mcb30) 17/5/03 */
+#define SEGDESC_t I386_SEGDESC_t
+
+typedef uint16_t I386_SEGSEL_t;
+#define SEGSEL_t I386_SEGSEL_t
+
+#endif /* PXE_ADDR_H */