From patchwork Sun Sep 23 19:03:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 186260 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id A4C1E2C00A0 for ; Mon, 24 Sep 2012 05:04:18 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TFrRA-000362-QP; Sun, 23 Sep 2012 19:01:52 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TFrR7-00035A-B6 for fwts-devel@lists.ubuntu.com; Sun, 23 Sep 2012 19:01:49 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginmedia.com ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TFrTR-0004Qe-QC; Sun, 23 Sep 2012 19:04:13 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com, colin.king@canonical.com Subject: [PATCH 10/18] bios: mtrr: print format using inttypes Date: Sun, 23 Sep 2012 20:03:53 +0100 Message-Id: <1348427041-4913-11-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1348427041-4913-1-git-send-email-colin.king@canonical.com> References: <1348427041-4913-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Ivan Hu --- src/bios/mtrr/mtrr.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c index 56f348f..d66ea80 100644 --- a/src/bios/mtrr/mtrr.c +++ b/src/bios/mtrr/mtrr.c @@ -35,6 +35,7 @@ #include #include #include +#include static fwts_list *klog; static fwts_list *mtrr_list; @@ -311,9 +312,9 @@ static int check_vga_controller_address(fwts_framework *fw) mtrr = fwts_list_data(struct mtrr_entry *, mtrr_bios_item); if (start >= mtrr->start && (start+size)<= mtrr->end) { found = 1; - fwts_passed(fw, "Found VGA memory region in BIOS initialised MTRR space: %llx - %llx\n", - (unsigned long long int)mtrr->start, - (unsigned long long int)mtrr->end); + fwts_passed(fw, "Found VGA memory region in BIOS initialised MTRR space: %" PRIx64 " - %" PRIx64 "\n", + mtrr->start, + mtrr->end); break; } } @@ -460,9 +461,9 @@ static int validate_iomem(fwts_framework *fw) failed++; fwts_failed(fw, LOG_LEVEL_MEDIUM, "MTRRIncorrectAttr", - "Memory range 0x%llx to 0x%llx (%s) has incorrect attribute%s.", - (unsigned long long int)start, - (unsigned long long int)end, + "Memory range 0x%" PRIx64 " to 0x%" PRIx64 " (%s) " + "has incorrect attribute%s.", + start, end, c2, cache_to_string(type & type_mustnot)); fwts_tag_failed(fw, FWTS_TAG_BIOS); if (type_must == UNCACHED) @@ -477,9 +478,9 @@ static int validate_iomem(fwts_framework *fw) failed++; fwts_failed(fw, LOG_LEVEL_MEDIUM, "MTRRLackingAttr", - "Memory range 0x%llx to 0x%llx (%s) is lacking attribute%s.", - (unsigned long long int)start, - (unsigned long long int)end, + "Memory range 0x%" PRIx64 " to 0x%" PRIx64 " (%s) " + "is lacking attribute%s.", + start, end, c2, cache_to_string( (type & type_must) ^ type_must)); fwts_tag_failed(fw, FWTS_TAG_BIOS); @@ -508,11 +509,11 @@ static void do_mtrr_resource(fwts_framework *fw) fwts_log_info_verbatum(fw, "Reg %hhu: disabled", entry->reg); else fwts_log_info_verbatum(fw, - "Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB) %s", + "Reg %hhu: 0x%16.16" PRIx64 " - 0x%16.16" PRIx64 " (%6" PRId64 " %cB) %s", entry->reg, - (unsigned long long int)entry->start, - (unsigned long long int)entry->end, - (unsigned long long int)(entry->size >= (1024*1024) ? entry->size / (1024*1024) : (entry->size / 1024)), + entry->start, + entry->end, + (entry->size >= (1024*1024) ? entry->size / (1024*1024) : (entry->size / 1024)), entry->size >= (1024*1024) ? 'M' : 'K', cache_to_string(entry->type)); } fwts_log_nl(fw);