summaryrefslogtreecommitdiff
path: root/com32/include
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-23 18:14:12 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-23 18:14:12 -0800
commit3cda063b8e079ee6518d3425650d800db4227585 (patch)
tree5c31ff2924ad2d43e0174e1c7301e950543262d4 /com32/include
parent2e236fea2b554b7b72f66d96ceae9e3fa4da675a (diff)
downloadsyslinux-3cda063b8e079ee6518d3425650d800db4227585.tar.gz
core: add a direct 32-bit API
Add a direct 32-bit API to some functions; initially read file only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include')
-rw-r--r--com32/include/com32.h5
-rw-r--r--com32/include/syslinux/pmapi.h45
2 files changed, 49 insertions, 1 deletions
diff --git a/com32/include/com32.h b/com32/include/com32.h
index aa7fb4b6..9334efb8 100644
--- a/com32/include/com32.h
+++ b/com32/include/com32.h
@@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 2002-2009 H. Peter Anvin - All Rights Reserved
- * Copyright 2009 Intel Corporation; author: H. Peter Anvin
+ * Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -92,6 +92,8 @@ typedef struct {
#define EFLAGS_VIP 0x00100000
#define EFLAGS_ID 0x00200000
+struct com32_pmapi;
+
extern struct com32_sys_args {
uint32_t cs_sysargs;
char *cs_cmdline;
@@ -101,6 +103,7 @@ extern struct com32_sys_args {
void __cdecl(*cs_farcall) (uint32_t, const com32sys_t *, com32sys_t *);
int __cdecl(*cs_cfarcall) (uint32_t, const void *, uint32_t);
uint32_t cs_memsize;
+ const struct com32_pmapi *cs_pm;
} __com32;
/*
diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h
new file mode 100644
index 00000000..848a5540
--- /dev/null
+++ b/com32/include/syslinux/pmapi.h
@@ -0,0 +1,45 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2002-2009 H. Peter Anvin - All Rights Reserved
+ * Copyright 2009 Intel Corporation; author: H. Peter Anvin
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall
+ * be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * pmapi.h
+ *
+ * Definitions for the Syslinux 4 protected-mode ABI
+ */
+
+#ifndef _SYSLINUX_PMAPI_H
+#define _SYSLINUX_PMAPI_H
+
+#include <stddef.h>
+#include <inttypes.h>
+
+struct com32_pmapi {
+ size_t (*read_file)(uint16_t *, void *, size_t);
+};
+
+#endif /* _SYSLINUX_PMAPI_H */