aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-08-28 02:45:55 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-08-28 02:45:55 -0700
commite3f74a218f641d6d17d3241b271dc70320b8a979 (patch)
treefbf5c8becef28e908ab6cf12541caee1b3cb4a9b
parentca2232343b4a9d919710d96ee84e16e948869992 (diff)
downloadsyslinux-elf-e3f74a218f641d6d17d3241b271dc70320b8a979.tar.gz
syslinux-elf-e3f74a218f641d6d17d3241b271dc70320b8a979.tar.xz
syslinux-elf-e3f74a218f641d6d17d3241b271dc70320b8a979.zip
Include file updates
-rw-r--r--com32/include/com32.h22
-rw-r--r--com32/include/math.h8
-rw-r--r--com32/include/sys/fpu.h6
3 files changed, 36 insertions, 0 deletions
diff --git a/com32/include/com32.h b/com32/include/com32.h
index 5706683c..16cd792b 100644
--- a/com32/include/com32.h
+++ b/com32/include/com32.h
@@ -122,4 +122,26 @@ static inline void *MK_PTR(uint16_t __seg, uint16_t __offs)
return (void *)((__seg << 4) + __offs);
}
+/* Some tools to handle 16:16 far pointers in memory */
+
+struct __far_ptr {
+ uint32_t __ptr;
+} __attribute__((packed));
+
+typedef struct __far_ptr far_ptr_t;
+
+
+static inline void *GET_PTR(far_ptr_t __fptr)
+{
+ return MK_PTR(__fptr.__ptr >> 16, __fptr.__ptr);
+}
+
+static inline far_ptr_t FAR_PTR(void *__ptr)
+{
+ far_ptr_t __fptr;
+
+ __fptr.__ptr = (SEG(__ptr) << 16) + OFFS(__ptr);
+ return __fptr;
+}
+
#endif /* _COM32_H */
diff --git a/com32/include/math.h b/com32/include/math.h
new file mode 100644
index 00000000..5aaa9ada
--- /dev/null
+++ b/com32/include/math.h
@@ -0,0 +1,8 @@
+#ifndef _MATH_H
+#define _MATH_H
+
+double pow(double, double);
+double fabs(double);
+double strtod(const char *, char **);
+
+#endif /* _MATH_H */
diff --git a/com32/include/sys/fpu.h b/com32/include/sys/fpu.h
new file mode 100644
index 00000000..134ae596
--- /dev/null
+++ b/com32/include/sys/fpu.h
@@ -0,0 +1,6 @@
+#ifndef _SYS_FPU_H
+#define _SYS_FPU_H
+
+extern int x86_init_fpu(void);
+
+#endif /* _SYS_FPU_H */