[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 1/8] hvmloader: Remove all 64-bit print arguments
The printf() available to hvmloader does not handle 64-bit data types; manually break them down as two 32-bit strings. v4: - Make macros for the requisite format and bit shifting Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> CC: Ian Campbell <ian.campbell@xxxxxxxxxx> CC: Ian Jackson <ian.jackson@xxxxxxxxxx> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx> CC: Hanweidong <hanweidong@xxxxxxxxxx> CC: Keir Fraser <keir@xxxxxxx> --- tools/firmware/hvmloader/pci.c | 11 +++++++---- tools/firmware/hvmloader/util.h | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c index c78d4d3..c1cb1e9 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 "PRIllx": no space for " + "resource!\n", devfn>>3, devfn&7, bar_reg, + PRIllx_arg(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 "PRIllx": %08x\n", + devfn>>3, devfn&7, bar_reg, + PRIllx_arg(bar_sz), + bar_data); /* Now enable the memory or I/O mapping. */ diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h index 7913259..9ccb905 100644 --- a/tools/firmware/hvmloader/util.h +++ b/tools/firmware/hvmloader/util.h @@ -168,6 +168,8 @@ void byte_to_hex(char *digits, uint8_t byte); void uuid_to_string(char *dest, uint8_t *uuid); /* Debug output */ +#define PRIllx "%x%08x" +#define PRIllx_arg(ll) (uint32_t)((ll)>>32), (uint32_t)(ll) int printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); int vprintf(const char *fmt, va_list ap); -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |