[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: Fix 18874 memory clipping
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1236588191 0 # Node ID 5a981686bbf85f686bbf9f1e5f77e7da72200f8a # Parent dd489125a2e7718efa0e7afe89e7875d7909353f minios: Fix 18874 memory clipping Fix 18874's memory clipping: there are three page-sized holes between direct mapping, demand mapping, heap pages and the end of memory. Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- extras/mini-os/arch/x86/mm.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff -r dd489125a2e7 -r 5a981686bbf8 extras/mini-os/arch/x86/mm.c --- a/extras/mini-os/arch/x86/mm.c Fri Mar 06 19:18:39 2009 +0000 +++ b/extras/mini-os/arch/x86/mm.c Mon Mar 09 08:43:11 2009 +0000 @@ -778,8 +778,7 @@ void arch_init_p2m(unsigned long max_pfn void arch_init_mm(unsigned long* start_pfn_p, unsigned long* max_pfn_p) { - - unsigned long start_pfn, max_pfn, virt_pfns; + unsigned long start_pfn, max_pfn; printk(" _text: %p(VA)\n", &_text); printk(" _etext: %p(VA)\n", &_etext); @@ -794,9 +793,13 @@ void arch_init_mm(unsigned long* start_p max_pfn = start_info.nr_pages; /* We need room for demand mapping and heap, clip available memory */ - virt_pfns = DEMAND_MAP_PAGES + HEAP_PAGES; - if ( max_pfn + virt_pfns + 1 < max_pfn ) - max_pfn = -(virt_pfns + 1); +#if defined(__i386__) + { + unsigned long virt_pfns = 1 + DEMAND_MAP_PAGES + 1 + HEAP_PAGES; + if (max_pfn + virt_pfns >= 0x100000) + max_pfn = 0x100000 - virt_pfns - 1; + } +#endif printk(" start_pfn: %lx\n", start_pfn); printk(" max_pfn: %lx\n", max_pfn); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |