From: Stefano Stabellini Subject: Re: [PATCH v3 1/8] hvmloader: Remove all 64-bit print arguments Date: Thu, 20 Jun 2013 18:06:46 +0100 Message-ID: References: <1371746007-19073-1-git-send-email-george.dunlap@eu.citrix.com> <1371746007-19073-2-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-2-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: George Dunlap Cc: Keir Fraser , Ian Campbell , Hanweidong , xen-devel@lists.xen.org, Stefano Stabellini , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Thu, 20 Jun 2013, George Dunlap wrote: > The printf() available to hvmloader does not handle 64-bit data types; > manually break them down as two 32-bit strings. > > Signed-off-by: George Dunlap > CC: Ian Campbell > CC: Ian Jackson > CC: Stefano Stabellini > CC: Hanweidong > CC: Keir Fraser What's the issue with implementing %llx? > tools/firmware/hvmloader/pci.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c > index c78d4d3..aa54bc1 100644 > --- a/tools/firmware/hvmloader/pci.c > +++ b/tools/firmware/hvmloader/pci.c > @@ -290,8 +290,9 @@ void pci_setup(void) > > if ( (base < resource->base) || (base > resource->max) ) > { > - printf("pci dev %02x:%x bar %02x size %llx: no space for " > - "resource!\n", devfn>>3, devfn&7, bar_reg, bar_sz); > + printf("pci dev %02x:%x bar %02x size %x%08x: no space for " > + "resource!\n", devfn>>3, devfn&7, bar_reg, > + (uint32_t)(bar_sz>>32), (uint32_t)bar_sz); > continue; > } > > @@ -300,8 +301,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 %llx: %08x\n", > - devfn>>3, devfn&7, bar_reg, bar_sz, bar_data); > + printf("pci dev %02x:%x bar %02x size %x%08x: %08x\n", > + devfn>>3, devfn&7, bar_reg, > + (uint32_t)(bar_sz>>32), (uint32_t)bar_sz, > + bar_data); > > > /* Now enable the memory or I/O mapping. */ > -- > 1.7.9.5 >