From patchwork Sat Jun 30 00:55:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 937244 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41HZnz4WZsz9s2B; Sat, 30 Jun 2018 10:56:07 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fZ4BJ-0000VC-3W; Sat, 30 Jun 2018 00:56:05 +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 1fZ4BG-0000Ux-HE for fwts-devel@lists.ubuntu.com; Sat, 30 Jun 2018 00:56:02 +0000 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fZ4BF-0003wU-UJ; Sat, 30 Jun 2018 00:56:02 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/4] dmicheck: update Processor Upgrade field in Type 4 Date: Fri, 29 Jun 2018 17:55:53 -0700 Message-Id: <1530320156-8606-2-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> References: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> 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" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/dmi/dmicheck/dmicheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index 3cca9db..c75eebf 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -1240,7 +1240,7 @@ static void dmicheck_entry(fwts_framework *fw, dmi_min_max_uint8_check(fw, table, addr, "Processor Type", hdr, 0x5, 0x1, 0x6); dmi_str_check(fw, table, addr, "Processor Manufacturer", hdr, 0x7); dmi_str_check(fw, table, addr, "Processor Version", hdr, 0x10); - dmi_min_max_uint8_check(fw, table, addr, "Upgrade", hdr, 0x19, 0x1, 0x38); + dmi_min_max_uint8_check(fw, table, addr, "Upgrade", hdr, 0x19, 0x1, 0x3c); if (hdr->length < 0x23) break; dmi_str_check(fw, table, addr, "Serial Number", hdr, 0x20); From patchwork Sat Jun 30 00:55:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 937245 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41HZp04M52z9ry1; Sat, 30 Jun 2018 10:56:08 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fZ4BK-0000Vo-6g; Sat, 30 Jun 2018 00:56:06 +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 1fZ4BJ-0000VA-2s for fwts-devel@lists.ubuntu.com; Sat, 30 Jun 2018 00:56:05 +0000 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fZ4BI-0003x0-Gm; Sat, 30 Jun 2018 00:56:04 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/4] dmicheck: update connection and port types in Type 8 Date: Fri, 29 Jun 2018 17:55:54 -0700 Message-Id: <1530320156-8606-3-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> References: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> 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" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/dmi/dmicheck/dmicheck.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index c75eebf..522f590 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -1300,32 +1300,32 @@ static void dmicheck_entry(fwts_framework *fw, if (hdr->length < 0x09) break; dmi_str_check(fw, table, addr, "Internal Reference Designator", hdr, 0x4); - if (!((data[0x5] <= 0x22) || + if (!((data[0x5] <= 0x23) || (data[0x5] == 0xff) || ((data[0x5] >= 0xa0) && (data[0x5] <= 0xa4)))) fwts_failed(fw, LOG_LEVEL_HIGH, DMI_VALUE_OUT_OF_RANGE, "Out of range value 0x%2.2" PRIx8 " " - "(range allowed 0x00..0x22, 0xa0..0xa4, 0xff) " + "(range allowed 0x00..0x23, 0xa0..0xa4, 0xff) " "while accessing entry '%s' @ " "0x%8.8" PRIx32 ", field '%s', offset 0x%2.2x", data[0x5], table, addr, "Internal Connector Type", 0x5); dmi_str_check(fw, table, addr, "External Reference Designator", hdr, 0x6); - if (!((data[0x7] <= 0x22) || + if (!((data[0x7] <= 0x23) || (data[0x7] == 0xff) || ((data[0x7] >= 0xa0) && (data[0x7] <= 0xa4)))) fwts_failed(fw, LOG_LEVEL_HIGH, DMI_VALUE_OUT_OF_RANGE, "Out of range value 0x%2.2" PRIx8 " " - "(range allowed 0x00..0x22, 0xa0..0xa4, 0xff) " + "(range allowed 0x00..0x23, 0xa0..0xa4, 0xff) " "while accessing entry '%s' @ " "0x%8.8" PRIx32 ", field '%s', offset 0x%2.2x", data[0x7], table, addr, "Internal Connector Type", 0x7); - if (!((data[0x8] <= 0x21) || + if (!((data[0x8] <= 0x23) || (data[0x8] == 0xff) || ((data[0x8] >= 0xa0) && (data[0x8] <= 0xa1)))) fwts_failed(fw, LOG_LEVEL_HIGH, DMI_VALUE_OUT_OF_RANGE, "Out of range value 0x%2.2" PRIx8 " " - "(range allowed 0x00..0x21, 0xa0..0xa1, 0xff) " + "(range allowed 0x00..0x23, 0xa0..0xa1, 0xff) " "while accessing entry '%s' @ 0x%8.8" PRIx32 ", " "field '%s', offset 0x%2.2x", data[0x8], table, addr, "Port Type", 0x8); From patchwork Sat Jun 30 00:55:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 937246 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41HZp35GKkz9ry1; Sat, 30 Jun 2018 10:56:11 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fZ4BN-0000XM-AJ; Sat, 30 Jun 2018 00:56:09 +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 1fZ4BL-0000Wg-MW for fwts-devel@lists.ubuntu.com; Sat, 30 Jun 2018 00:56:07 +0000 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fZ4BL-0003x6-4K; Sat, 30 Jun 2018 00:56:07 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 3/4] dmicheck: update Usage and Characteristics 2 fields in Type 9 Date: Fri, 29 Jun 2018 17:55:55 -0700 Message-Id: <1530320156-8606-4-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> References: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> 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" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/dmi/dmicheck/dmicheck.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index 522f590..b508799 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -1345,17 +1345,13 @@ static void dmicheck_entry(fwts_framework *fw, "field '%s', offset 0x%2.2x", data[0x5], table, addr, "Slot Type", 0x5); dmi_min_max_uint8_check(fw, table, addr, "Slot Data Bus Width", hdr, 0x6, 0x1, 0xe); - dmi_min_max_uint8_check(fw, table, addr, "Current Usage", hdr, 0x7, 0x1, 0x4); + dmi_min_max_uint8_check(fw, table, addr, "Current Usage", hdr, 0x7, 0x1, 0x5); dmi_min_max_uint8_check(fw, table, addr, "Slot Length", hdr, 0x8, 0x1, 0x6); if (hdr->length < 0x0d) break; - if (data[0xc] & 0xf8) - fwts_failed(fw, LOG_LEVEL_MEDIUM, DMI_RESERVED_VALUE_USED, - "Reserved bits 0x%2.2" PRIx8 " was used" - "bits 3..7 would be reserved while accessing entry '%s' @ " - "0x%8.8" PRIx32 ", field '%s', offset 0x%2.2x", - data[0xc], - table, addr, "Slot Characteristics 2", 0xc); + + dmi_reserved_bits_check(fw, table, addr, "Slot Characteristics 2", hdr, sizeof(uint8_t), 0x0c, 4, 7); + if (hdr->length < 0x11) break; if (!((data[0x5] == 0x06) || From patchwork Sat Jun 30 00:55:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 937247 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41HZp55k7zz9ry1; Sat, 30 Jun 2018 10:56:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fZ4BP-0000YC-CU; Sat, 30 Jun 2018 00:56:11 +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 1fZ4BO-0000Xn-AB for fwts-devel@lists.ubuntu.com; Sat, 30 Jun 2018 00:56:10 +0000 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fZ4BN-0003xI-MT; Sat, 30 Jun 2018 00:56:10 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 4/4] dmicheck: update memory type and add nvdimm fields for Type 17 Date: Fri, 29 Jun 2018 17:55:56 -0700 Message-Id: <1530320156-8606-5-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> References: <1530320156-8606-1-git-send-email-alex.hung@canonical.com> 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" Nvdimm is added in SMBIOS 3.2 Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/dmi/dmicheck/dmicheck.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index b508799..a911b43 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -1514,7 +1514,7 @@ static void dmicheck_entry(fwts_framework *fw, dmi_min_max_uint8_check(fw, table, addr, "Form Factor", hdr, 0xe, 0x1, 0xf); dmi_str_check(fw, table, addr, "Locator", hdr, 0x10); dmi_str_check(fw, table, addr, "Bank Locator", hdr, 0x11); - dmi_min_max_uint8_check(fw, table, addr, "Memory Type", hdr, 0x12, 0x1, 0x1e); + dmi_min_max_uint8_check(fw, table, addr, "Memory Type", hdr, 0x12, 0x1, 0x1f); if (hdr->length < 0x1b) break; dmi_str_check(fw, table, addr, "Manufacturer", hdr, 0x17); @@ -1525,6 +1525,11 @@ static void dmicheck_entry(fwts_framework *fw, break; dmi_reserved_bits_check(fw, table, addr, "Attributes", hdr, sizeof(uint8_t), 0x1b, 4, 7); dmi_reserved_bits_check(fw, table, addr, "Extended Size", hdr, sizeof(uint32_t), 0x1c, 31, 31); + if (hdr->length < 0x28) + break; + dmi_min_max_uint8_check(fw, table, addr, "Memory Technology", hdr, 0x28, 0x1, 0x7); + dmi_reserved_bits_check(fw, table, addr, "Memory Operating Mode Cap", hdr, sizeof(uint16_t), 0x29, 6, 15); + break; case 18: /* 7.19 */