From patchwork Mon Nov 30 08:42:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1408083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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 4CkzHx2rtJz9sT6 for ; Mon, 30 Nov 2020 19:42:19 +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 1kjelC-0002wJ-65; Mon, 30 Nov 2020 08:42:14 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kjel9-0002wD-Bk for fwts-devel@lists.ubuntu.com; Mon, 30 Nov 2020 08:42:11 +0000 Received: from 2.general.alexhung.us.vpn ([10.172.65.255] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kjel8-0007ky-Nb; Mon, 30 Nov 2020 08:42:11 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH] dmi: dmicheck: update type 4, 9 and 17 according to spec 3.4 Date: Mon, 30 Nov 2020 01:42:07 -0700 Message-Id: <20201130084207.68723-1-alex.hung@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Signed-off-by: Alex Hung --- src/dmi/dmicheck/dmicheck.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index 259279fb..617bb52b 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -35,7 +35,7 @@ #include #include -#define DMI_VERSION (0x0330) +#define DMI_VERSION (0x0340) #define VERSION_MAJOR(v) ((v) >> 8) #define VERSION_MINOR(v) ((v) & 0xff) @@ -1357,7 +1357,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, 0x3c); + dmi_min_max_uint8_check(fw, table, addr, "Upgrade", hdr, 0x19, 0x1, 0x3e); if (hdr->length < 0x23) break; dmi_str_check(fw, table, addr, "Serial Number", hdr, 0x20); @@ -1431,7 +1431,7 @@ static void dmicheck_entry(fwts_framework *fw, if (hdr->length < 0x0c) break; dmi_str_check(fw, table, addr, "Slot Designation", hdr, 0x4); - fwts_dmi_value_range t9_ranges[] = {{1, 0x23}, {0x30, 0x30}, {0xa0, 0xbd}}; + fwts_dmi_value_range t9_ranges[] = {{1, 0x28}, {0x30, 0x30}, {0xa0, 0xc6}}; dmi_ranges_uint8_check(fw, table, addr, "Slot Type", hdr, 0x5, t9_ranges, sizeof(t9_ranges)); 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, 0x5); @@ -1439,7 +1439,7 @@ static void dmicheck_entry(fwts_framework *fw, if (hdr->length < 0x0d) break; - dmi_reserved_bits_check(fw, table, addr, "Slot Characteristics 2", hdr, sizeof(uint8_t), 0x0c, 4, 7); + dmi_reserved_bits_check(fw, table, addr, "Slot Characteristics 2", hdr, sizeof(uint8_t), 0x0c, 7, 7); if (hdr->length < 0x11) break; @@ -1594,7 +1594,7 @@ static void dmicheck_entry(fwts_framework *fw, dmi_min_max_uint8_check(fw, table, addr, "Form Factor", hdr, 0xe, 0x1, 0x10); 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, 0x21); + dmi_min_max_uint8_check(fw, table, addr, "Memory Type", hdr, 0x12, 0x1, 0x23); if (hdr->length < 0x1b) break; dmi_str_check(fw, table, addr, "Manufacturer", hdr, 0x17);