aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-02-15 13:32:18 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-02-15 13:32:18 +0000
commit92b31a9099c3ba4ce7910e5a2ee5f36dbb8b336e (patch)
tree2b030e853cf8a817b9635e8158f2768a9b0b43cb
parent737060331078262122953a89349098794dd630ac (diff)
downloadxen-92b31a9099c3ba4ce7910e5a2ee5f36dbb8b336e.tar.gz
xen-92b31a9099c3ba4ce7910e5a2ee5f36dbb8b336e.tar.bz2
xen-92b31a9099c3ba4ce7910e5a2ee5f36dbb8b336e.zip
xen/arm: move setup_mm right after setup_pagetables
At the moment we destroy the DTB mappings we have in setup_pagetables and we restore them only in setup_mm. Move setup_mm right after setup_pagetables. This ensures we have a valid DTB mapping while running the subsequent initialization code. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- s/atag_paddr/fdt_paddr/ ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
-rw-r--r--xen/arch/arm/setup.c7
-rw-r--r--xen/common/page_alloc.c6
2 files changed, 3 insertions, 10 deletions
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 0837db365e..fbcde6f9c7 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -246,11 +246,11 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
} while ( xenheap_pages > 128<<(20-PAGE_SHIFT) );
if ( ! e )
- panic("Not not enough space for xenheap\n");
+ early_panic("Not not enough space for xenheap\n");
domheap_pages = heap_pages - xenheap_pages;
- printk("Xen heap: %lu pages Dom heap: %lu pages\n", xenheap_pages, domheap_pages);
+ early_printk("Xen heap: %lu pages Dom heap: %lu pages\n", xenheap_pages, domheap_pages);
setup_xenheap_mappings((e >> PAGE_SHIFT) - xenheap_pages, xenheap_pages);
@@ -348,6 +348,7 @@ void __init start_xen(unsigned long boot_phys_offset,
cmdline_parse(device_tree_bootargs(fdt));
setup_pagetables(boot_phys_offset, get_xen_paddr());
+ setup_mm(fdt_paddr, fdt_size);
#ifdef EARLY_UART_ADDRESS
/* TODO Need to get device tree or command line for UART address */
@@ -365,8 +366,6 @@ void __init start_xen(unsigned long boot_phys_offset,
set_current((struct vcpu *)0xfffff000); /* debug sanity */
idle_vcpu[0] = current;
- setup_mm(fdt_paddr, fdt_size);
-
/* Setup Hyp vector base */
WRITE_CP32((uint32_t) hyp_traps_vector, HVBAR);
printk("Set hyp vector base to %"PRIx32" (expected %p)\n",
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 6b8bc39897..6c2215b1d2 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -182,12 +182,6 @@ void __init init_boot_pages(paddr_t ps, paddr_t pe)
else if ( *p != '\0' )
break;
- if ( bad_epfn == bad_spfn )
- printk("Marking page %lx as bad\n", bad_spfn);
- else
- printk("Marking pages %lx through %lx as bad\n",
- bad_spfn, bad_epfn);
-
bootmem_region_zap(bad_spfn, bad_epfn+1);
}
}