From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: [PATCH v4 2/8] hvmloader: Make the printfs more informative Date: Fri, 21 Jun 2013 11:46:28 +0100 Message-ID: <1371811594-31135-3-git-send-email-george.dunlap@eu.citrix.com> References: <1371811594-31135-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371811594-31135-1-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Keir Fraser , Ian Campbell , Hanweidong , George Dunlap , Stefano Stabellini , Ian Jackson List-Id: xen-devel@lists.xenproject.org * 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 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(-) diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c index c1cb1e9..44168e2 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. */ -- 1.7.9.5