Hello community,

here is the log from the commit of package fwts for openSUSE:Factory checked in 
at 2020-12-21 10:22:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fwts (Old)
 and      /work/SRC/openSUSE:Factory/.fwts.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fwts"

Mon Dec 21 10:22:48 2020 rev:53 rq:856824 version:20.12.00

Changes:
--------
--- /work/SRC/openSUSE:Factory/fwts/fwts.changes        2020-12-01 
14:24:03.669676048 +0100
+++ /work/SRC/openSUSE:Factory/.fwts.new.5145/fwts.changes      2020-12-21 
10:23:32.423988304 +0100
@@ -1,0 +2,6 @@
+Fri Dec 18 06:45:25 UTC 2020 - Martin Pluskal <mplus...@suse.com>
+
+- Update to version 20.12.00:
+  * See provided changelog for detailed list of changes  
+
+-------------------------------------------------------------------

Old:
----
  fwts-V20.11.00.tar.gz

New:
----
  fwts-V20.12.00.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fwts.spec ++++++
--- /var/tmp/diff_new_pack.cYtVCY/_old  2020-12-21 10:23:33.067989034 +0100
+++ /var/tmp/diff_new_pack.cYtVCY/_new  2020-12-21 10:23:33.071989038 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           fwts
-Version:        20.11.00
+Version:        20.12.00
 Release:        0
 Summary:        Firmware Test Suite
 License:        GPL-2.0-or-later

++++++ fwts-V20.11.00.tar.gz -> fwts-V20.12.00.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debian/changelog new/debian/changelog
--- old/debian/changelog        2020-11-25 10:22:52.000000000 +0100
+++ new/debian/changelog        2020-12-17 03:15:43.000000000 +0100
@@ -1,3 +1,27 @@
+fwts (20.12.00-0ubuntu1) hirsute; urgency=medium
+
+  [Alex Hung]
+  * acpi: method: define marcos for D3hot and D3cold
+  * acpi: fadt: X_GPE0/1_BLK can be zero when not used
+  * pci: maxreadreq: skip Intel video devices
+  * acpi: method: replace revision checks by fwts_method_test_revision
+  * dmicheck: add dmi version check to SMBIOS3
+  * lib: fwts_acpi_object_eval: add fwts_method_test_revision function
+  * lib: fix a function name typo in comment
+  * dmi: dmicheck: update type 4, 9 and 17 according to spec 3.4
+
+  [Colin Ian King]
+  * lib: replace FWTS_ACPI_FADT_PREFERRED_PM_PROFILE with function
+  * Replace FWTS_ARRAY_LEN with FWTS_ARRAY_SIZE
+  * sbbr/fadt: Clean up indentation of a few lines
+  * lib: fwts_firmware: cast 1 to UL to ensure no signed extension, clean up
+    comments
+  * src: Clean-up: remove trailing spaces and tabs from lines
+  * lib: fwts_efi_module: fix flags on device open
+  * acpi: fan: skip over fan info when the type field is NULL (LP: #1906540)
+
+ -- Ivan Hu <ivan...@ubuntu.com>  Thu, 17 Dec 2020 10:14:02 +0800
+
 fwts (20.11.00-0ubuntu1) hirsute; urgency=medium
 
   [Alex Hung]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapcraft.yaml new/snapcraft.yaml
--- old/snapcraft.yaml  2020-11-25 10:22:52.000000000 +0100
+++ new/snapcraft.yaml  2020-12-17 03:15:43.000000000 +0100
@@ -1,5 +1,5 @@
 name: fwts
-version: V20.11.00
+version: V20.12.00
 summary: The Firmware Test Suite (FWTS)
 description: This is a firmware test suite that performs sanity checks on 
system firmware. It is intended to identify BIOS and ACPI errors and if 
appropriate it will try to explain the errors and give advice to help 
workaround or fix firmware bugs.  It is primarily intended to be a 
Linux-centric firmware troubleshooting tool.
 confinement: strict
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/acpi/fadt/fadt.c new/src/acpi/fadt/fadt.c
--- old/src/acpi/fadt/fadt.c    2020-11-25 10:22:52.000000000 +0100
+++ new/src/acpi/fadt/fadt.c    2020-12-17 03:15:43.000000000 +0100
@@ -425,7 +425,7 @@
 {
        fwts_log_info(fw, "FADT Preferred PM Profile: %hhu (%s)",
                fadt->preferred_pm_profile,
-               
FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(fadt->preferred_pm_profile));
+               
fwts_acpi_fadt_preferred_pm_profile(fadt->preferred_pm_profile));
 
        if (fadt->preferred_pm_profile <= 8)
                fwts_passed(fw, "FADT has a valid preferred PM profile.");
@@ -1527,21 +1527,23 @@
        if (fadt->x_gpe0_blk.access_width == 1)
                fwts_passed(fw, "FADT X_GPE0_BLK has correct byte access 
width.");
        else {
-               fwts_failed(fw, LOG_LEVEL_HIGH,
-                       "X_GPE0_BLKBadAccessWidth",
-                       "FADT X_GPE0_BLK Access width 0x%2.2" PRIx8
-                       " but it should be 1 (byte access).",
-                       fadt->x_gpe0_blk.access_width);
+               if (!fwts_acpi_data_zero((const void *) &fadt->x_gpe0_blk, 
sizeof(fwts_acpi_gas)))
+                       fwts_failed(fw, LOG_LEVEL_HIGH,
+                               "X_GPE0_BLKBadAccessWidth",
+                               "FADT X_GPE0_BLK Access width 0x%2.2" PRIx8
+                               " but it should be 1 (byte access).",
+                               fadt->x_gpe0_blk.access_width);
        }
 
        if (fadt->x_gpe1_blk.access_width == 1)
                fwts_passed(fw, "FADT X_GPE1_BLK has correct byte access 
width.");
        else {
-               fwts_failed(fw, LOG_LEVEL_HIGH,
-                       "X_GPE1_BLKBadAccessWidth",
-                       "FADT X_GPE1_BLK Access width 0x%2.2" PRIx8
-                       " but it should be 1 (byte access).",
-                       fadt->x_gpe1_blk.access_width);
+               if (!fwts_acpi_data_zero((const void *) &fadt->x_gpe1_blk, 
sizeof(fwts_acpi_gas)))
+                       fwts_failed(fw, LOG_LEVEL_HIGH,
+                               "X_GPE1_BLKBadAccessWidth",
+                               "FADT X_GPE1_BLK Access width 0x%2.2" PRIx8
+                               " but it should be 1 (byte access).",
+                               fadt->x_gpe1_blk.access_width);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/acpi/fan/fan.c new/src/acpi/fan/fan.c
--- old/src/acpi/fan/fan.c      2020-11-25 10:22:52.000000000 +0100
+++ new/src/acpi/fan/fan.c      2020-12-17 03:15:43.000000000 +0100
@@ -215,9 +215,16 @@
 
        fwts_list_foreach(item1, fans1) {
                fan_info *info1 = fwts_list_data(fan_info *, item1);
+
+               if (!info1->type)
+                       continue;
+
                fwts_list_foreach(item2, fans2) {
                        fan_info *info2 = fwts_list_data(fan_info *, item2);
 
+                       if (!info2->type)
+                               continue;
+
                        if (strcmp(info1->type, "Processor") == 0) {
                                if (strcmp(info1->name, info2->name) == 0) {
                                        if (info2->cur_state < 
info1->cur_state) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/acpi/method/method.c new/src/acpi/method/method.c
--- old/src/acpi/method/method.c        2020-11-25 10:22:52.000000000 +0100
+++ new/src/acpi/method/method.c        2020-12-17 03:15:43.000000000 +0100
@@ -262,6 +262,9 @@
  * _WED         N
  */
 
+#define DEVICE_D3HOT   3
+#define DEVICE_D3COLD  4
+
 static bool fadt_mobile_platform;      /* True if a mobile platform */
 
 #define method_test_integer(name, type)                                \
@@ -1570,7 +1573,7 @@
 #define method_test_SxD(name)                                          \
 static int method_test ## name(fwts_framework *fw)                     \
 {                                                                      \
-       uint64_t max = 3;                                               \
+       uint64_t max = DEVICE_D3HOT;                                    \
        return method_evaluate_method(fw, METHOD_OPTIONAL,              \
                # name, NULL, 0, fwts_method_test_integer_max_return, &max);    
\
 }
@@ -1583,7 +1586,7 @@
 #define method_test_SxW(name)                                          \
 static int method_test ## name(fwts_framework *fw)                     \
 {                                                                      \
-       uint64_t max = 4;                                               \
+       uint64_t max = DEVICE_D3COLD;                                   \
        return method_evaluate_method(fw, METHOD_OPTIONAL,              \
                # name, NULL, 0, fwts_method_test_integer_max_return, &max);    
\
 }
@@ -1862,7 +1865,7 @@
                fwts_failed(fw, LOG_LEVEL_HIGH,
                        "Method_CPCBadRevision",
                        "_CPC's revision is incorrect, "
-                       "expecting 1 ,2 or 3, got 0x%" PRIx8 , revision);
+                       "expecting 1, 2 or 3, got 0x%" PRIx8 , revision);
 
                return;
        }
@@ -2782,14 +2785,8 @@
                        }
 
                        if (i == 0) {
-                               if (obj->Package.Elements[i].Integer.Value != 
0) {
-                                       fwts_failed(fw, LOG_LEVEL_HIGH,
-                                               "Method_LPIBadRevision",
-                                               "%s: Expected Revision to be 0, 
"
-                                               "got 0x%4.4" PRIx64 ".", name,
-                                               
(uint64_t)obj->Package.Elements[i].Integer.Value);
+                               if (fwts_method_test_revision(fw, name, 
obj->Package.Elements[i].Integer.Value, 0) != FWTS_OK)
                                        failed = true;
-                               }
                        } else if (i == 2) {
                                if (obj->Package.Elements[i].Integer.Value != 
obj->Package.Count - 3) {
                                        fwts_failed(fw, LOG_LEVEL_HIGH,
@@ -4467,12 +4464,8 @@
                return;
 
        if (obj->Package.Elements[0].Type == ACPI_TYPE_INTEGER) {
-               if (obj->Package.Elements[0].Integer.Value != 0) {
-                       fwts_failed(fw, LOG_LEVEL_MEDIUM,
-                               "Method_FPSBadRevision",
-                               "%s element 0 is not revision 0.", name);
+               if (fwts_method_test_revision(fw, name, 
obj->Package.Elements[0].Integer.Value, 0) != FWTS_OK)
                        failed = true;
-               }
        } else {
                fwts_failed(fw, LOG_LEVEL_MEDIUM,
                        "Method_FPSBadReturnType",
@@ -4680,12 +4673,8 @@
                return;
 
        if (obj->Package.Elements[0].Type == ACPI_TYPE_INTEGER) {
-               if (obj->Package.Elements[0].Integer.Value != 0) {
-                       fwts_failed(fw, LOG_LEVEL_MEDIUM,
-                               "Method_ARTBadRevision",
-                               "%s element 0 is not revision 0.", name);
+               if (fwts_method_test_revision(fw, name, 
obj->Package.Elements[0].Integer.Value, 0) != FWTS_OK)
                        failed = true;
-               }
        } else {
                fwts_failed(fw, LOG_LEVEL_MEDIUM,
                        "Method_ARTBadReturnType",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/bios/bios_info/bios_info.c 
new/src/bios/bios_info/bios_info.c
--- old/src/bios/bios_info/bios_info.c  2020-11-25 10:22:52.000000000 +0100
+++ new/src/bios/bios_info/bios_info.c  2020-12-17 03:15:43.000000000 +0100
@@ -57,7 +57,7 @@
 
        for (i = 0; bios_info[i].dmi_field != NULL; i++) {
                char *data;
-               snprintf(path, sizeof(path), "/sys/class/dmi/id/%s", 
+               snprintf(path, sizeof(path), "/sys/class/dmi/id/%s",
                        bios_info[i].dmi_field);
                if ((data = fwts_get(path)) != NULL) {
                        fwts_chop_newline(data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/bios/ebda_region/ebda_region.c 
new/src/bios/ebda_region/ebda_region.c
--- old/src/bios/ebda_region/ebda_region.c      2020-11-25 10:22:52.000000000 
+0100
+++ new/src/bios/ebda_region/ebda_region.c      2020-12-17 03:15:43.000000000 
+0100
@@ -95,7 +95,7 @@
                        "EBDAMappedNotReserved",
                        "EBDA region mapped at 0x%lx but not reserved in the %s 
table.",
                        ebda_addr, memory_map_name);
-               
+
        return FWTS_OK;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/devicetree/dt_sysinfo/dt_sysinfo.c 
new/src/devicetree/dt_sysinfo/dt_sysinfo.c
--- old/src/devicetree/dt_sysinfo/dt_sysinfo.c  2020-11-25 10:22:52.000000000 
+0100
+++ new/src/devicetree/dt_sysinfo/dt_sysinfo.c  2020-12-17 03:15:43.000000000 
+0100
@@ -46,9 +46,9 @@
        int             n_models;
 } openpower_reference_platforms[] = {
        {"ibm,firestone", firestone_models,
-               FWTS_ARRAY_LEN(firestone_models)},
+               FWTS_ARRAY_SIZE(firestone_models)},
        {"ibm,garrison", garrison_models,
-               FWTS_ARRAY_LEN(garrison_models)},
+               FWTS_ARRAY_SIZE(garrison_models)},
 };
 
 
@@ -224,7 +224,7 @@
        struct reference_platform *plat;
        int i;
 
-       for (i = 0; i < (int)FWTS_ARRAY_LEN(openpower_reference_platforms);
+       for (i = 0; i < (int)FWTS_ARRAY_SIZE(openpower_reference_platforms);
                        i++) {
                plat = &openpower_reference_platforms[i];
                if (dt_fdt_stringlist_contains_last(compatible,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/dmi/dmicheck/dmicheck.c 
new/src/dmi/dmicheck/dmicheck.c
--- old/src/dmi/dmicheck/dmicheck.c     2020-11-25 10:22:52.000000000 +0100
+++ new/src/dmi/dmicheck/dmicheck.c     2020-12-17 03:15:43.000000000 +0100
@@ -35,7 +35,7 @@
 #include <limits.h>
 #include <fcntl.h>
 
-#define DMI_VERSION                    (0x0330)
+#define DMI_VERSION                    (0x0340)
 #define VERSION_MAJOR(v)               ((v) >> 8)
 #define VERSION_MINOR(v)               ((v) & 0xff)
 
@@ -1357,7 +1357,7 @@
                        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 @@
                        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,13 +1439,13 @@
                        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;
                        if (!((data[0x5] == 0x06) ||
-                             ((data[0x5] >= 0x0e) && (data[0x5] <= 0x23)) ||
-                             ((data[0x5] >= 0xa0) && (data[0x5] <= 0xb6)))) {
+                             ((data[0x5] >= 0x0e) && (data[0x5] <= 0x28)) ||
+                             ((data[0x5] >= 0xa0) && (data[0x5] <= 0xc6)))) {
                                if (GET_UINT16(data + 0xd) != 0xffff)
                                        fwts_failed(fw, LOG_LEVEL_MEDIUM, 
DMI_VALUE_OUT_OF_RANGE,
                                                "Invalid value 0x%4.4" PRIx16 " 
was used and 0xffff "
@@ -1594,7 +1594,7 @@
                        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);
@@ -2230,6 +2230,9 @@
                return FWTS_ERROR;
        }
 
+       if (dmi_version_check(fw, version) != FWTS_OK)
+               return FWTS_SKIP;
+
        table = dmi_table_smbios30(fw, &entry30);
        if (table == NULL)
                return FWTS_ERROR;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/example/blank/blank.c 
new/src/example/blank/blank.c
--- old/src/example/blank/blank.c       2020-11-25 10:22:52.000000000 +0100
+++ new/src/example/blank/blank.c       2020-12-17 03:15:43.000000000 +0100
@@ -44,7 +44,7 @@
 static int example_test1(fwts_framework *fw)
 {
        /* Do your test */
-       
+
        /* Log success or failure */
        fwts_passed(fw, "Test passed, hurrah!");
        /*
@@ -61,7 +61,7 @@
 static int example_test2(fwts_framework *fw)
 {
        /* Do your test */
-       
+
        /* Log success or failure */
        fwts_passed(fw, "Test passed, hurrah!");
        /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/kernel/klog/klog.c new/src/kernel/klog/klog.c
--- old/src/kernel/klog/klog.c  2020-11-25 10:22:52.000000000 +0100
+++ new/src/kernel/klog/klog.c  2020-12-17 03:15:43.000000000 +0100
@@ -63,7 +63,7 @@
                return FWTS_ERROR;
        }
 
-       if (errors > 0) 
+       if (errors > 0)
                /* Checks will log errors as failures automatically */
                fwts_log_info(fw, "Found %d unique errors in kernel log.",
                        errors);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/include/fwts_acpi.h 
new/src/lib/include/fwts_acpi.h
--- old/src/lib/include/fwts_acpi.h     2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/include/fwts_acpi.h     2020-12-17 03:15:43.000000000 +0100
@@ -105,10 +105,8 @@
 #include "fwts_framework.h"
 #include "fwts_log.h"
 
-extern const char *fwts_acpi_fadt_preferred_pm_profile[];
+const char *fwts_acpi_fadt_preferred_pm_profile(const int profile);
 
-#define FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(x)         \
-       ((x) > 8) ? "Reserved" : fwts_acpi_fadt_preferred_pm_profile[x]
 #define FWTS_ACPI_FADT_FLAGS_HW_REDUCED_ACPI (1<<20)
 
 /*
@@ -117,9 +115,9 @@
 typedef struct {
        uint8_t         address_space_id;
        uint8_t         register_bit_width;
-        uint8_t        register_bit_offset;
-        uint8_t        access_width;
-        uint64_t       address;
+       uint8_t         register_bit_offset;
+       uint8_t         access_width;
+       uint64_t        address;
 } __attribute__ ((packed)) fwts_acpi_gas;
 
 /*
@@ -1830,6 +1828,7 @@
 } __attribute__ ((packed)) 
fwts_acpi_table_hest_generic_hardware_error_source_v2;
 
 void fwts_acpi_table_get_header(fwts_acpi_table_header *hdr, uint8_t *data);
+bool fwts_acpi_data_zero(const void *data, const size_t len);
 
 /*
  * ACPI CSTR (Core System Resources Table)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/include/fwts_acpi_object_eval.h 
new/src/lib/include/fwts_acpi_object_eval.h
--- old/src/lib/include/fwts_acpi_object_eval.h 2020-11-25 10:22:52.000000000 
+0100
+++ new/src/lib/include/fwts_acpi_object_eval.h 2020-12-17 03:15:43.000000000 
+0100
@@ -119,7 +119,8 @@
 int fwts_method_package_count_min(fwts_framework *fw, const char *name, const 
char *objname, const ACPI_OBJECT *obj, const uint32_t min);
 int fwts_method_package_count_equal(fwts_framework *fw, const char *name, 
const char *objname, const ACPI_OBJECT *obj, const uint32_t count);
 int fwts_method_package_elements_all_type(fwts_framework *fw, const char 
*name, const char *objname, const ACPI_OBJECT *obj, const ACPI_OBJECT_TYPE 
type);
-int fwts_method_package_elements_type( fwts_framework *fw, const char *name, 
const char *objname, const ACPI_OBJECT *obj, const fwts_package_element *info, 
const uint32_t count);
+int fwts_method_package_elements_type(fwts_framework *fw, const char *name, 
const char *objname, const ACPI_OBJECT *obj, const fwts_package_element *info, 
const uint32_t count);
+int fwts_method_test_revision(fwts_framework *fw, const char *name, const 
uint32_t cur_revision, const uint32_t spec_revision);
 
 void fwts_method_test_integer_return(fwts_framework *fw, char *name, 
ACPI_BUFFER *buf, ACPI_OBJECT *obj, void *private);
 void fwts_method_test_string_return(fwts_framework *fw, char *name, 
ACPI_BUFFER *buf, ACPI_OBJECT *obj, void *private);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/include/fwts_framework.h 
new/src/lib/include/fwts_framework.h
--- old/src/lib/include/fwts_framework.h        2020-11-25 10:22:52.000000000 
+0100
+++ new/src/lib/include/fwts_framework.h        2020-12-17 03:15:43.000000000 
+0100
@@ -27,6 +27,7 @@
 
 typedef struct fwts_framework fwts_framework;
 
+#include "fwts.h"
 #include "fwts_arch.h"
 #include "fwts_log.h"
 #include "fwts_list.h"
@@ -259,8 +260,6 @@
        (flags & (FWTS_FLAG_INTERACTIVE | \
                  FWTS_FLAG_INTERACTIVE_EXPERIMENTAL))
 
-#define FWTS_ARRAY_LEN(s) (sizeof(s)/sizeof(s[0]))
-
 /*
  * FWTS_ASSERT(test, message)
  *     compile time assertion that throws a division by zero
@@ -275,8 +274,7 @@
 
 #define FWTS_REGISTER_FEATURES(name, ops, priority, flags, features)   \
 /* Ensure name is not too long */                                      \
-FWTS_ASSERT(FWTS_ARRAY_LEN(name) < 16,                                 \
-       fwts_register_name_too_long);                                   \
+FWTS_ASSERT(FWTS_ARRAY_SIZE(name) < 16,        fwts_register_name_too_long);   
\
                                                                        \
 static void __test_init (void) __attribute__ ((constructor));          \
                                                                        \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/include/fwts_pci.h 
new/src/lib/include/fwts_pci.h
--- old/src/lib/include/fwts_pci.h      2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/include/fwts_pci.h      2020-12-17 03:15:43.000000000 +0100
@@ -151,6 +151,8 @@
 #define FWTS_PCI_SUBCLASS_CODE_OTHER_SYSTEM_PERIPHERAL (0x80)
 #define FWTS_PCI_SUBCLASS_CODE_AUDIO_DEVICE            (0x03)
 
+/* PCI Vendor IDs */
+#define FWTS_PCI_INTEL_VENDOR_ID                       (0x8086)
 
 /*
  * PCI Express Capability Structure is defined in Section 7.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/include/fwts_version.h 
new/src/lib/include/fwts_version.h
--- old/src/lib/include/fwts_version.h  2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/include/fwts_version.h  2020-12-17 03:15:43.000000000 +0100
@@ -16,5 +16,5 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
  *
  */
-#define FWTS_VERSION "V20.11.00"
-#define FWTS_DATE    "2020-11-25 09:22:52"
+#define FWTS_VERSION "V20.12.00"
+#define FWTS_DATE    "2020-12-17 02:15:43"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_acpi.c new/src/lib/src/fwts_acpi.c
--- old/src/lib/src/fwts_acpi.c 2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_acpi.c 2020-12-17 03:15:43.000000000 +0100
@@ -30,17 +30,25 @@
 
 #if defined(FWTS_HAS_ACPI)
 
-const char *fwts_acpi_fadt_preferred_pm_profile[] = {
-       "Unspecified",
-       "Desktop",
-       "Mobile",
-       "Workstation",
-       "Enterprise Server",
-       "SOHO Server",
-       "Appliance PC",
-       "Performance Server",
-       "Tablet",
-};
+const char *fwts_acpi_fadt_preferred_pm_profile(const int profile)
+{
+       static const char *pm_profiles[] = {
+               "Unspecified",
+               "Desktop",
+               "Mobile",
+               "Workstation",
+               "Enterprise Server",
+               "SOHO Server",
+               "Appliance PC",
+               "Performance Server",
+               "Tablet"
+       };
+
+       if ((profile < 0) || profile >= (int)(FWTS_ARRAY_SIZE(pm_profiles)))
+               return "Reserved";
+
+       return pm_profiles[profile];
+}
 
 /*
  *  fwts_acpi_table_get_header()
@@ -51,4 +59,15 @@
        memcpy(hdr, data, sizeof(fwts_acpi_table_header));
 }
 
+bool fwts_acpi_data_zero(const void *data, const size_t len) {
+       uint8_t *ptr = (uint8_t *) data;
+       uint8_t i;
+
+       for (i = 0; i < len; i++)
+               if (*ptr++)
+                       return false;
+
+       return true;
+}
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_acpi_object_eval.c 
new/src/lib/src/fwts_acpi_object_eval.c
--- old/src/lib/src/fwts_acpi_object_eval.c     2020-11-25 10:22:52.000000000 
+0100
+++ new/src/lib/src/fwts_acpi_object_eval.c     2020-12-17 03:15:43.000000000 
+0100
@@ -708,6 +708,31 @@
        return failed ? FWTS_ERROR: FWTS_OK;
 }
 
+int fwts_method_test_revision(
+       fwts_framework *fw,
+       const char *name,
+       const uint32_t cur_revision,
+       const uint32_t spec_revision)
+{
+       char method[5];
+       char tag[22];
+
+       if (strlen(name) < 4)
+               return FWTS_ERROR;
+
+       memcpy(method, name + strlen(name) - 4, 4);
+       method[4] = '\0';
+       snprintf(tag, 22, "Method%sBadRevision", method);
+
+       if (cur_revision != spec_revision) {
+               fwts_failed(fw, LOG_LEVEL_MEDIUM, tag,
+                       "%s revision is not revision %" PRIu32 ".", name, 
spec_revision);
+               return FWTS_ERROR;
+       }
+
+       return FWTS_OK;
+}
+
 /*
  *  fwts_method_test_integer_return
  *     check if an integer object was returned
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_efi_module.c 
new/src/lib/src/fwts_efi_module.c
--- old/src/lib/src/fwts_efi_module.c   2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_efi_module.c   2020-12-17 03:15:43.000000000 +0100
@@ -172,7 +172,7 @@
        if (!efi_dev_name)
                return -1;
 
-       return open(efi_dev_name, O_WRONLY | O_RDWR);
+       return open(efi_dev_name, O_RDWR);
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_fileio.c 
new/src/lib/src/fwts_fileio.c
--- old/src/lib/src/fwts_fileio.c       2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_fileio.c       2020-12-17 03:15:43.000000000 +0100
@@ -45,7 +45,7 @@
 }
 
 /*
- *  fwts_file_read()
+ *  fwts_file_open_and_read()
  *     open and read file and return contents as a list of lines
  */
 fwts_list* fwts_file_open_and_read(const char *file)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_firmware.c 
new/src/lib/src/fwts_firmware.c
--- old/src/lib/src/fwts_firmware.c     2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_firmware.c     2020-12-17 03:15:43.000000000 +0100
@@ -78,7 +78,6 @@
        }
 
        /* just check for IPMI device presence */
-
        if (!stat("/dev/ipmi0", &ipmi_statbuf))
                features |= FWTS_FW_FEATURE_IPMI;
 
@@ -87,21 +86,23 @@
 
 const char *fwts_firmware_feature_string(const fwts_firmware_feature features)
 {
-       const int n = FWTS_ARRAY_LEN(feature_names);
+       const int n = FWTS_ARRAY_SIZE(feature_names);
        static const char sep[] = ", ";
        static char str[60];
        size_t len;
        char *p;
        int i;
 
-       /* ensure we have enough space in str to store n names, plus n-1
-        * separators, plus a trailing nul */
+       /*
+        * ensure we have enough space in str to store n names, plus n-1
+        * separators, plus a trailing nul
+        */
        FWTS_ASSERT((n * (sizeof(feature_names[0].name) - 1)) +
                                ((n-1) * (sizeof(sep) - 1)) + 1 <
                        sizeof(str), str_too_small);
 
        /* ensure we have a name defined for all features */
-       FWTS_ASSERT(((1 << n) - 1) == FWTS_FW_FEATURE_ALL,
+       FWTS_ASSERT(((1UL << n) - 1) == FWTS_FW_FEATURE_ALL,
                        invalid_feature_names);
 
        for (p = str, i = 0; i < n; i++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_interactive.c 
new/src/lib/src/fwts_interactive.c
--- old/src/lib/src/fwts_interactive.c  2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_interactive.c  2020-12-17 03:15:43.000000000 +0100
@@ -66,7 +66,7 @@
 {
        int len;
        va_list ap;
-       
+
        FWTS_UNUSED(fw);
 
        va_start(ap, fmt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_ioport.c 
new/src/lib/src/fwts_ioport.c
--- old/src/lib/src/fwts_ioport.c       2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_ioport.c       2020-12-17 03:15:43.000000000 +0100
@@ -146,7 +146,7 @@
  *  set to ~0.
  */
 int fwts_inb(uint32_t port, uint8_t *value)
-{      
+{
        FWTS_UNUSED(port);
 
        *value = ~0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/lib/src/fwts_oops.c new/src/lib/src/fwts_oops.c
--- old/src/lib/src/fwts_oops.c 2020-11-25 10:22:52.000000000 +0100
+++ new/src/lib/src/fwts_oops.c 2020-12-17 03:15:43.000000000 +0100
@@ -71,7 +71,7 @@
                 * We are looking for an Oops message within 5 lines of a "BUG:"
                 * or we've got a WARN_ON then, OK, otherwise abort.
                 */
-               if ((lines > 5) && 
+               if ((lines > 5) &&
                    (!(dumpable & (FWTS_OOPS_GOT_OOPS | 
FWTS_OOPS_GOT_WARN_ON))))
                        return;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/libfwtsacpica/fwts_acpica.c 
new/src/libfwtsacpica/fwts_acpica.c
--- old/src/libfwtsacpica/fwts_acpica.c 2020-11-25 10:22:52.000000000 +0100
+++ new/src/libfwtsacpica/fwts_acpica.c 2020-12-17 03:15:43.000000000 +0100
@@ -60,7 +60,7 @@
 #define ACPI_ADR_SPACE_USER_DEFINED1   (0x80)
 #define ACPI_ADR_SPACE_USER_DEFINED2   (0xE4)
 
-/* 
+/*
  *  Semaphore accounting info
  */
 typedef struct {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/pci/maxreadreq/maxreadreq.c 
new/src/pci/maxreadreq/maxreadreq.c
--- old/src/pci/maxreadreq/maxreadreq.c 2020-11-25 10:22:52.000000000 +0100
+++ new/src/pci/maxreadreq/maxreadreq.c 2020-12-17 03:15:43.000000000 +0100
@@ -63,6 +63,7 @@
                int fd;
                ssize_t n;
                uint8_t offset = 0;
+               uint16_t vendor_id;
 
                if (entry->d_name[0] == '.')
                        continue;
@@ -97,6 +98,12 @@
                    (config[FWTS_PCI_CONFIG_SUBCLASS] == 
FWTS_PCI_SUBCLASS_CODE_AUDIO_DEVICE))
                        continue;
 
+               /* Ignore Intel's Video Device */
+               vendor_id = config[FWTS_PCI_CONFIG_VENDOR_ID] + 
((config[FWTS_PCI_CONFIG_VENDOR_ID  + 1]) << 8);
+               if ((config[FWTS_PCI_CONFIG_CLASS_CODE] == 
FWTS_PCI_CLASS_CODE_DISPLAY_CONTROLLER) &&
+                   (vendor_id == FWTS_PCI_INTEL_VENDOR_ID))
+                       continue;
+
                /* config region too small, do next */
                if (n < FWTS_PCI_CONFIG_TYPE0_CAPABILITIES_POINTER)
                        continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/sbbr/fadt/fadt.c new/src/sbbr/fadt/fadt.c
--- old/src/sbbr/fadt/fadt.c    2020-11-25 10:22:52.000000000 +0100
+++ new/src/sbbr/fadt/fadt.c    2020-12-17 03:15:43.000000000 +0100
@@ -378,11 +378,11 @@
 
        fwts_log_info(fw, "FADT Preferred PM Profile: %hhu (%s)",
                fadt->preferred_pm_profile,
-               
FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(fadt->preferred_pm_profile));
+               
fwts_acpi_fadt_preferred_pm_profile(fadt->preferred_pm_profile));
 
        if ((fadt->preferred_pm_profile == SBBR_ENT_SERVER)  ||
-       (fadt->preferred_pm_profile == SBBR_SOHO_SERVER) ||
-       (fadt->preferred_pm_profile == SBBR_PERF_SERVER))
+            (fadt->preferred_pm_profile == SBBR_SOHO_SERVER) ||
+            (fadt->preferred_pm_profile == SBBR_PERF_SERVER))
                fwts_passed(fw, "FADT has a recommended server PM profile.");
        else
                fwts_failed(fw, LOG_LEVEL_MEDIUM, "fadt_profile:", "FADT 
preferred PM profile is not recommended.");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/uefi/securebootcert/securebootcert.c 
new/src/uefi/securebootcert/securebootcert.c
--- old/src/uefi/securebootcert/securebootcert.c        2020-11-25 
10:22:52.000000000 +0100
+++ new/src/uefi/securebootcert/securebootcert.c        2020-12-17 
03:15:43.000000000 +0100
@@ -487,7 +487,7 @@
                                "Secureboot or deployed mode on, but the 
variable KEK not found.");
        } else {
                if (!(var_found & VAR_DB_FOUND))
-                       fwts_log_info(fw, "Not in readiness for secureboot, 
variable DB not found.");           
+                       fwts_log_info(fw, "Not in readiness for secureboot, 
variable DB not found.");
                if (!(var_found & VAR_KEK_FOUND))
                        fwts_log_info(fw, "Not in readiness for secureboot, 
variable KEK not found.");
        }
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to