From 91993aee68cd6b43f72e1ada33b295388fa5c4c1 Mon Sep 17 00:00:00 2001 From: George Dunlap Date: Wed, 19 Jun 2013 14:47:46 +0100 Subject: hvmloader: Make the printfs more informative * Warn that you're relocating some BARs to 64-bit * Warn that you're relocating guest pages, and how many * Include upper 32-bits of the base register when printing the bar placement info v4: - Move message about relocating guest pages into loop, include number of pages and guest paddr - Fixed minor brace style issue Signed-off-by: George Dunlap Acked-by: Ian Jackson Acked-by: Stefano Stabellini CC: Ian Campbell CC: Ian Jackson CC: Stefano Stabellini CC: Hanweidong CC: Keir Fraser --- tools/firmware/hvmloader/pci.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tools/firmware') diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c index c1cb1e9eab..44168e2929 100644 --- a/tools/firmware/hvmloader/pci.c +++ b/tools/firmware/hvmloader/pci.c @@ -214,7 +214,11 @@ void pci_setup(void) pci_mem_start <<= 1; if ( (pci_mem_start << 1) != 0 ) + { + printf("Low MMIO hole not large enough for all devices," + " relocating some BARs to 64-bit\n"); bar64_relocate = 1; + } /* Relocate RAM that overlaps PCI space (in 64k-page chunks). */ while ( (pci_mem_start >> PAGE_SHIFT) < hvm_info->low_mem_pgend ) @@ -227,6 +231,11 @@ void pci_setup(void) if ( hvm_info->high_mem_pgend == 0 ) hvm_info->high_mem_pgend = 1ull << (32 - PAGE_SHIFT); hvm_info->low_mem_pgend -= nr_pages; + printf("Relocating 0x%x pages from "PRIllx" to "PRIllx\ + " for lowmem MMIO hole\n", + nr_pages, + PRIllx_arg(((uint64_t)hvm_info->low_mem_pgend)<high_mem_pgend)<low_mem_pgend; @@ -301,10 +310,10 @@ void pci_setup(void) pci_writel(devfn, bar_reg, bar_data); if (using_64bar) pci_writel(devfn, bar_reg + 4, bar_data_upper); - printf("pci dev %02x:%x bar %02x size "PRIllx": %08x\n", + printf("pci dev %02x:%x bar %02x size "PRIllx": %x%08x\n", devfn>>3, devfn&7, bar_reg, PRIllx_arg(bar_sz), - bar_data); + bar_data_upper, bar_data); /* Now enable the memory or I/O mapping. */ -- cgit v1.2.3