[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Ensure multiboot modules are mapped when we copy them.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1186669011 -3600 # Node ID db21f714d37fd931f363b9ab89460cc8b4db19de # Parent b55fe44438bce1171f45f1b24dc2baf99fc8d201 Ensure multiboot modules are mapped when we copy them. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/setup.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) diff -r b55fe44438bc -r db21f714d37f xen/arch/x86/setup.c --- a/xen/arch/x86/setup.c Thu Aug 09 10:14:38 2007 +0100 +++ b/xen/arch/x86/setup.c Thu Aug 09 15:16:51 2007 +0100 @@ -282,9 +282,28 @@ static void __init srat_detect_node(int printk(KERN_INFO "CPU %d APIC %d -> Node %d\n", cpu, apicid, node); } +/* + * Ensure a given physical memory range is present in the bootstrap mappings. + * Use superpage mappings to ensure that pagetable memory needn't be allocated. + */ +static void __init bootstrap_map(unsigned long start, unsigned long end) +{ + unsigned long mask = (1UL << L2_PAGETABLE_SHIFT) - 1; + start = start & ~mask; + end = (end + mask) & ~mask; + if ( end > BOOTSTRAP_DIRECTMAP_END ) + panic("Cannot access memory beyond end of " + "bootstrap direct-map area\n"); + map_pages_to_xen( + (unsigned long)maddr_to_bootstrap_virt(start), + start >> PAGE_SHIFT, (end-start) >> PAGE_SHIFT, PAGE_HYPERVISOR); +} + static void __init move_memory( unsigned long dst, unsigned long src_start, unsigned long src_end) { + bootstrap_map(src_start, src_end); + bootstrap_map(dst, dst + src_end - src_start); memmove(maddr_to_bootstrap_virt(dst), maddr_to_bootstrap_virt(src_start), src_end - src_start); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |