aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch/x86/mm.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2008-02-14 09:34:27 -0700
committerAlex Williamson <alex.williamson@hp.com>2008-02-14 09:34:27 -0700
commite38c4f55fe6ef6c393388ae181630ab3a92f77dd (patch)
tree24970faea32f21f96b9048f8a36c8e8d9dafe2b2 /extras/mini-os/arch/x86/mm.c
parent03c9b741df33f676c99c7885ca7f795190df37d5 (diff)
parentdf5b25e9af9248d8e00d0ef7e4ce3eec9eb44f97 (diff)
downloadxen-e38c4f55fe6ef6c393388ae181630ab3a92f77dd.tar.gz
xen-e38c4f55fe6ef6c393388ae181630ab3a92f77dd.tar.bz2
xen-e38c4f55fe6ef6c393388ae181630ab3a92f77dd.zip
merge with xen-unstable.hg
Diffstat (limited to 'extras/mini-os/arch/x86/mm.c')
-rw-r--r--extras/mini-os/arch/x86/mm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c
index 082527d098..dd556e4741 100644
--- a/extras/mini-os/arch/x86/mm.c
+++ b/extras/mini-os/arch/x86/mm.c
@@ -448,6 +448,15 @@ static unsigned long demand_map_area_start;
#define DEMAND_MAP_PAGES ((2ULL << 30) / PAGE_SIZE)
#endif
+#ifdef HAVE_LIBC
+unsigned long heap, brk, heap_mapped, heap_end;
+#ifdef __x86_64__
+#define HEAP_PAGES ((128ULL << 30) / PAGE_SIZE)
+#else
+#define HEAP_PAGES ((1ULL << 30) / PAGE_SIZE)
+#endif
+#endif
+
void arch_init_demand_mapping_area(unsigned long cur_pfn)
{
cur_pfn++;
@@ -455,6 +464,14 @@ void arch_init_demand_mapping_area(unsigned long cur_pfn)
demand_map_area_start = (unsigned long) pfn_to_virt(cur_pfn);
cur_pfn += DEMAND_MAP_PAGES;
printk("Demand map pfns at %lx-%lx.\n", demand_map_area_start, pfn_to_virt(cur_pfn));
+
+#ifdef HAVE_LIBC
+ cur_pfn++;
+ heap_mapped = brk = heap = (unsigned long) pfn_to_virt(cur_pfn);
+ cur_pfn += HEAP_PAGES;
+ heap_end = (unsigned long) pfn_to_virt(cur_pfn);
+ printk("Heap resides at %lx-%lx.\n", brk, heap_end);
+#endif
}
#define MAP_BATCH ((STACK_SIZE / 2) / sizeof(mmu_update_t))