aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/e820.h
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-12-30 11:46:55 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-12-30 11:46:55 +0000
commit5b1748e026bd4eb012d12c72dec5202daebda85c (patch)
tree4167daf9bda1649848ac8e2fd9b14aed6de8f1c8 /xen/include/asm-x86/e820.h
parent43ac1bd5c3c751223062e91e852c7607c9920fc2 (diff)
downloadxen-5b1748e026bd4eb012d12c72dec5202daebda85c.tar.gz
xen-5b1748e026bd4eb012d12c72dec5202daebda85c.tar.bz2
xen-5b1748e026bd4eb012d12c72dec5202daebda85c.zip
bitkeeper revision 1.1159.170.72 (41d3eaaftC1Zqz_rl9bIUUcTSZFIjg)
Add e820 parsing to Xen. Currently not hooked into heap initialisation: this is the next step.
Diffstat (limited to 'xen/include/asm-x86/e820.h')
-rw-r--r--xen/include/asm-x86/e820.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/xen/include/asm-x86/e820.h b/xen/include/asm-x86/e820.h
new file mode 100644
index 0000000000..0767642570
--- /dev/null
+++ b/xen/include/asm-x86/e820.h
@@ -0,0 +1,33 @@
+#ifndef __E820_HEADER
+#define __E820_HEADER
+
+#include <asm/page.h>
+
+#define E820MAX 32
+
+#define E820_RAM 1
+#define E820_RESERVED 2
+#define E820_ACPI 3
+#define E820_NVS 4
+
+#ifndef __ASSEMBLY__
+struct e820entry {
+ u64 addr;
+ u64 size;
+ u32 type;
+} __attribute__((packed));
+
+struct e820map {
+ int nr_map;
+ struct e820entry map[E820MAX];
+};
+
+extern unsigned long init_e820(struct e820entry *, int);
+extern struct e820map e820;
+
+#endif /*!__ASSEMBLY__*/
+
+#define PFN_DOWN(_p) ((_p)&PAGE_MASK)
+#define PFN_UP(_p) (((_p)+(PAGE_SIZE-1))&PAGE_MASK)
+
+#endif /*__E820_HEADER*/