# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1180517351 -32400 # Node ID 3abdd183276efeca586f45e328679a2d39950e74 # Parent ab001aaf06238e6e112fc6133c3d2ed1e0583c7b add debug message PATCHNAME: add_debug_message Signed-off-by: Isaku Yamahata diff -r ab001aaf0623 -r 3abdd183276e xen/arch/ia64/xen/dom_fw_common.c --- a/xen/arch/ia64/xen/dom_fw_common.c Wed May 30 18:28:14 2007 +0900 +++ b/xen/arch/ia64/xen/dom_fw_common.c Wed May 30 18:29:11 2007 +0900 @@ -458,7 +458,9 @@ dom_fw_init(domain_t *d, tables->efi_tables[i].table = 0; } if (xen_ia64_is_dom0(d)) { + dump_heap_avail(); efi_systable_init_dom0(tables); + dump_heap_avail(); } else { efi_systable_init_domu(tables); } @@ -546,7 +548,9 @@ dom_fw_init(domain_t *d, /* Dom0. We must preserve ACPI data from real machine, as well as IO areas. */ + dump_heap_avail(); num_mds = complete_dom0_memmap(d, tables); + dump_heap_avail(); } if (num_mds < 0) return num_mds; diff -r ab001aaf0623 -r 3abdd183276e xen/arch/ia64/xen/dom_fw_dom0.c --- a/xen/arch/ia64/xen/dom_fw_dom0.c Wed May 30 18:28:14 2007 +0900 +++ b/xen/arch/ia64/xen/dom_fw_dom0.c Wed May 30 18:29:11 2007 +0900 @@ -207,8 +207,10 @@ setup_dom0_memmap_info(struct domain *d, sizeof(*tables) + sizeof(tables->efi_memmap[0]) * tables->num_mds); /* with this sort, md doesn't point memmap table */ + dump_heap_avail(); sort(tables->efi_memmap, tables->num_mds, sizeof(efi_memory_desc_t), efi_mdt_cmp, NULL); + dump_heap_avail(); memmap_info = domain_mpa_to_imva(d, paddr_start); memmap_info->efi_memdesc_size = sizeof(md[0]); @@ -255,8 +257,10 @@ complete_dom0_memmap(struct domain *d, s u64 efi_desc_size; int i; + dump_heap_avail(); for (i = 0; i < tables->num_mds; i++) assign_new_domain0_range(d, &tables->efi_memmap[i]); + dump_heap_avail(); /* Walk through all MDT entries. Copy all interesting entries. */ @@ -353,7 +357,10 @@ complete_dom0_memmap(struct domain *d, s EFI_PAGE_SHIFT; dom_md->attribute = EFI_MEMORY_WB; + dump_heap_avail(); assign_new_domain0_range(d, dom_md); + dump_heap_avail(); + /* * recalculate left_mem. * we might already allocated memory in @@ -395,8 +402,10 @@ complete_dom0_memmap(struct domain *d, s sizeof(*tables) + sizeof(tables->efi_memmap[0]) * tables->num_mds); + dump_heap_avail(); sort(tables->efi_memmap, tables->num_mds, sizeof(efi_memory_desc_t), efi_mdt_cmp, NULL); + dump_heap_avail(); // Map low-memory holes & unmapped MMIO for legacy drivers for (addr = 0; addr < ONE_MB; addr += PAGE_SIZE) { diff -r ab001aaf0623 -r 3abdd183276e xen/arch/ia64/xen/dom_fw_utils.c --- a/xen/arch/ia64/xen/dom_fw_utils.c Wed May 30 18:28:14 2007 +0900 +++ b/xen/arch/ia64/xen/dom_fw_utils.c Wed May 30 18:29:11 2007 +0900 @@ -194,6 +194,7 @@ int dom_fw_setup(domain_t * d, unsigned BUILD_BUG_ON(sizeof(struct fw_tables) > (FW_TABLES_END_PADDR_MIN - FW_TABLES_BASE_PADDR)); + dump_heap_avail(); if (bp_mpa == 0) { /* bp_mpa == 0 means this is domain restore case. */ @@ -204,6 +205,7 @@ int dom_fw_setup(domain_t * d, unsigned /* Create page for boot_param. */ assign_new_domain_page_if_dom0(d, bp_mpa); bp = domain_mpa_to_imva(d, bp_mpa); + dump_heap_avail(); if (d != dom0) { /* * XXX kludge. @@ -250,6 +252,7 @@ int dom_fw_setup(domain_t * d, unsigned assign_new_domain_page_if_dom0(d, FW_HYPERCALL_BASE_PADDR); imva_hypercall_base = (unsigned long)domain_mpa_to_imva (d, FW_HYPERCALL_BASE_PADDR); + dump_heap_avail(); /* estimate necessary efi memmap size and allocate memory for it */ fw_tables_size = sizeof(*fw_tables) + @@ -273,7 +276,9 @@ int dom_fw_setup(domain_t * d, unsigned fw_tables_size); return -ENOMEM; } + dump_heap_avail(); memset(fw_tables, 0, fw_tables_size); + dump_heap_avail(); BUILD_BUG_ON(FW_END_PADDR_MIN != FW_TABLES_END_PADDR_MIN); fw_tables->fw_tables_size = fw_tables_size; fw_tables->fw_end_paddr = FW_TABLES_BASE_PADDR + fw_tables_size; @@ -288,8 +293,10 @@ int dom_fw_setup(domain_t * d, unsigned gpaddr < fw_tables->fw_end_paddr; gpaddr += PAGE_SIZE) assign_new_domain_page_if_dom0(d, gpaddr); + dump_heap_avail(); ret = dom_fw_init(d, d->arch.breakimm, bp, fw_tables, imva_hypercall_base, maxmem); + dump_heap_avail(); if (ret < 0) { xfree(fw_tables); return ret; @@ -311,10 +318,13 @@ int dom_fw_setup(domain_t * d, unsigned fw_tables->fw_tables_end_paddr = 0; fw_tables->num_mds = 0; + dump_heap_avail(); /* copy fw_tables into domain pseudo physical address space */ dom_fw_copy_to(d, FW_TABLES_BASE_PADDR, fw_tables, fw_tables_size); + dump_heap_avail(); xfree(fw_tables); + dump_heap_avail(); } dom_fw_domain_init(d, domain_mpa_to_imva(d, FW_TABLES_BASE_PADDR));