From patchwork Tue Oct 23 10:22:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 988121 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42fTwN5tWNz9sNF; Tue, 23 Oct 2018 21:22:28 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gEtpQ-0003he-BU; Tue, 23 Oct 2018 10:22:24 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gEtpO-0003hU-RH for fwts-devel@lists.ubuntu.com; Tue, 23 Oct 2018 10:22:22 +0000 Received: from [175.181.155.235] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gEtpO-0005qa-3g; Tue, 23 Oct 2018 10:22:22 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] mcfg: fix MMIO config space checking Date: Tue, 23 Oct 2018 18:22:16 +0800 Message-Id: <1540290136-31422-1-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" On the newer kernel, string "reserved" from /sys/firmware/memmap/x/type is changed with capital "R", this causes the mcfg test got the false alarm result: Low failures: 1 mcfg: MCFG MMIO config space at 0xe0000000 is not reserved in the memory map table Modify with checking both "reserved" and "Reserve" Signed-off-by: Ivan Hu Acked-by: Alex Hung Acked-by: Colin Ian King --- src/lib/src/fwts_memorymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c index 26750bd..8c96f9d 100644 --- a/src/lib/src/fwts_memorymap.c +++ b/src/lib/src/fwts_memorymap.c @@ -56,7 +56,7 @@ static int fwts_memory_map_str_to_type(const char *str) if (strstr(str, "System RAM")) return FWTS_MEMORY_MAP_USABLE; - if (strstr(str, "reserved")) + if (strstr(str, "reserved") || strstr(str, "Reserved")) return FWTS_MEMORY_MAP_RESERVED; if (strstr(str, "ACPI Non-volatile Storage")) return FWTS_MEMORY_MAP_ACPI; @@ -81,7 +81,7 @@ static char *fwts_memory_map_type_to_str(const int type) { switch (type) { case FWTS_MEMORY_MAP_RESERVED: - return "(reserved)"; + return "(Reserved)"; case FWTS_MEMORY_MAP_ACPI: return "(ACPI Non-volatile Storage)"; case FWTS_MEMORY_MAP_USABLE: