aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/device_tree.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-02-13 14:24:49 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2012-02-13 14:24:49 +0000
commit3e99c95ba1c8a9508b3dc5e94c67f0ae46c7d360 (patch)
tree6505c04f294b81aa344a1a6b6aa18e789f685d74 /xen/include/xen/device_tree.h
parentc5a41f505852d764e96cbbbd17cfee460c822278 (diff)
downloadxen-3e99c95ba1c8a9508b3dc5e94c67f0ae46c7d360.tar.gz
xen-3e99c95ba1c8a9508b3dc5e94c67f0ae46c7d360.tar.bz2
xen-3e99c95ba1c8a9508b3dc5e94c67f0ae46c7d360.zip
arm, device tree: parse the DTB for RAM location and size
Prior to setting up the page tables, parse the DTB for the location and size of RAM. Use this information to get the physical address to relocate Xen to in setup_pagetables(). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/include/xen/device_tree.h')
-rw-r--r--xen/include/xen/device_tree.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
new file mode 100644
index 0000000000..ae3e344495
--- /dev/null
+++ b/xen/include/xen/device_tree.h
@@ -0,0 +1,36 @@
+/*
+ * Device Tree
+ *
+ * Copyright (C) 2012 Citrix Systems, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __XEN_DEVICE_TREE_H__
+#define __XEN_DEVICE_TREE_H__
+
+#include <xen/types.h>
+
+#define NR_MEM_BANKS 8
+
+struct membank {
+ paddr_t start;
+ paddr_t size;
+};
+
+struct dt_mem_info {
+ int nr_banks;
+ struct membank bank[NR_MEM_BANKS];
+};
+
+struct dt_early_info {
+ struct dt_mem_info mem;
+};
+
+extern struct dt_early_info early_info;
+
+void device_tree_early_init(const void *fdt);
+paddr_t device_tree_get_xen_paddr(void);
+
+#endif