aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/memory.h
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-05-02 08:52:55 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-05-02 08:52:55 -0700
commitb82f770d01303e1a5a0dedb006b992e01f6b6276 (patch)
treee106fac651f988e1a32373b13d88a1ebcd152a45 /com32/gplinclude/memory.h
parent146c95f97bf8818278be0662f7fefce42c9c0626 (diff)
downloadsyslinux-b82f770d01303e1a5a0dedb006b992e01f6b6276.tar.gz
syslinux-b82f770d01303e1a5a0dedb006b992e01f6b6276.tar.xz
syslinux-b82f770d01303e1a5a0dedb006b992e01f6b6276.zip
gpllib: Add detect_memory_e820 call
detect_memory_e820 populates an array of struct e820entry using INT 15, AX = E820h. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/gplinclude/memory.h')
-rw-r--r--com32/gplinclude/memory.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/com32/gplinclude/memory.h b/com32/gplinclude/memory.h
new file mode 100644
index 00000000..b5232f53
--- /dev/null
+++ b/com32/gplinclude/memory.h
@@ -0,0 +1,35 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2009 Pierre-Alexandre Meyer
+ *
+ * Some parts borrowed from meminfo.c32:
+ *
+ * Copyright 2003-2009 H. Peter Anvin - All Rights Reserved
+ * Copyright 2009 Intel Corporation; author: H. Peter Anvin
+ *
+ * Some parts borrowed from Linux:
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ * Copyright 2007 rPath, Inc. - All Rights Reserved
+ * Copyright 2009 Intel Corporation; author H. Peter Anvin
+ *
+ * This file is part of Syslinux, and is made available under
+ * the terms of the GNU General Public License version 2.
+ *
+ * ----------------------------------------------------------------------- */
+
+#ifndef _MEMORY_H_
+#define _MEMORY_H_
+#include <stdint.h>
+
+struct e820entry {
+ uint64_t addr; /* start of memory segment */
+ uint64_t size; /* size of memory segment */
+ uint64_t type; /* type of memory segment */
+} __attribute__((packed));
+
+const char * const e820_types[5];
+
+void get_type(int, char*, int);
+void detect_memory_e820(struct e820entry *desc, int size_map, int *size_found);
+#endif