diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2013-02-15 13:32:18 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2013-02-15 13:32:18 +0000 |
commit | 92b31a9099c3ba4ce7910e5a2ee5f36dbb8b336e (patch) | |
tree | 2b030e853cf8a817b9635e8158f2768a9b0b43cb /xen/arch/arm/setup.c | |
parent | 737060331078262122953a89349098794dd630ac (diff) | |
download | xen-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>
Diffstat (limited to 'xen/arch/arm/setup.c')
-rw-r--r-- | xen/arch/arm/setup.c | 7 |
1 files changed, 3 insertions, 4 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", |