aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/memory.h
diff options
context:
space:
mode:
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