From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: [PATCH v3 2/8] hvmloader: Make the printfs more informative Date: Thu, 20 Jun 2013 17:33:21 +0100 Message-ID: <1371746007-19073-3-git-send-email-george.dunlap@eu.citrix.com> References: <1371746007-19073-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: <1371746007-19073-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 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, 10 insertions(+), 3 deletions(-) diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c index aa54bc1..d8592b0 100644 --- a/tools/firmware/hvmloader/pci.c +++ b/tools/firmware/hvmloader/pci.c @@ -213,10 +213,17 @@ void pci_setup(void) ((pci_mem_start << 1) != 0) ) pci_mem_start <<= 1; - if ( (pci_mem_start << 1) != 0 ) + 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). */ + if ( (pci_mem_start >> PAGE_SHIFT) < hvm_info->low_mem_pgend ) + printf("Relocating 0x%lx pages to highmem for lowmem MMIO hole\n", + hvm_info->low_mem_pgend - (pci_mem_start >> PAGE_SHIFT)); + while ( (pci_mem_start >> PAGE_SHIFT) < hvm_info->low_mem_pgend ) { struct xen_add_to_physmap xatp; @@ -301,10 +308,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 %x%08x: %08x\n", + printf("pci dev %02x:%x bar %02x size %x%08x: %x%08x\n", devfn>>3, devfn&7, bar_reg, (uint32_t)(bar_sz>>32), (uint32_t)bar_sz, - bar_data); + bar_data_upper, bar_data); /* Now enable the memory or I/O mapping. */ -- 1.7.9.5