summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2007-01-11 15:08:44 +0100
committerMichael Brown2007-01-11 15:08:44 +0100
commitc980cdd0aadc6ab781511bf18107a18879a8af38 (patch)
treea422db3b3384d608cd94746d5319a0959498dfce /src/include
parentAdd phys_to_user() and copy_user(). (diff)
downloadipxe-c980cdd0aadc6ab781511bf18107a18879a8af38.tar.gz
ipxe-c980cdd0aadc6ab781511bf18107a18879a8af38.tar.xz
ipxe-c980cdd0aadc6ab781511bf18107a18879a8af38.zip
Move memmap.h out of arch/i386; it no longer contains anything
architecture-dependent and is needed by the ELF code.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/memmap.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/include/gpxe/memmap.h b/src/include/gpxe/memmap.h
new file mode 100644
index 000000000..836a1b929
--- /dev/null
+++ b/src/include/gpxe/memmap.h
@@ -0,0 +1,34 @@
+#ifndef _GPXE_MEMMAP_H
+#define _GPXE_MEMMAP_H
+
+#include <stdint.h>
+
+/**
+ * @file
+ *
+ * Memory mapping
+ *
+ */
+
+/** A usable memory region */
+struct memory_region {
+ /** Physical start address */
+ uint64_t start;
+ /** Physical end address */
+ uint64_t end;
+};
+
+/** Maximum number of memory regions we expect to encounter */
+#define MAX_MEMORY_REGIONS 8
+
+/** A memory map */
+struct memory_map {
+ /** Memory regions */
+ struct memory_region regions[MAX_MEMORY_REGIONS];
+ /** Number of used regions */
+ unsigned int count;
+};
+
+extern void get_memmap ( struct memory_map *memmap );
+
+#endif /* _GPXE_MEMMAP_H */