diff mbox series

[V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Message ID 20211122021517.1416178-1-alex.hung@canonical.com
State Superseded
Headers show
Series [V3] dmicheck: skip scanning smbios in /dev/mem on aarch64 | expand

Commit Message

Alex Hung Nov. 22, 2021, 2:15 a.m. UTC
Buglink: https://bugs.launchpad.net/bugs/1947786

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/dmi/dmicheck/dmicheck.c   | 14 +++++++
 src/lib/include/fwts.h        |  1 +
 src/lib/include/fwts_kernel.h | 25 ++++++++++++
 src/lib/src/Makefile.am       |  1 +
 src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 src/lib/include/fwts_kernel.h
 create mode 100644 src/lib/src/fwts_kernel.c

Comments

Sunny Wang Nov. 22, 2021, 9:44 p.m. UTC | #1
Hi Alex,

Edhaya and I just tested the v2 patch by cherry-picking it into our ACS FWTS, and then somehow this fix doesn’t work.
Does it work on your side? Could you build the FWTS live image with this fix and offline share it with us for verification?

Best Regards,
Sunny
-----Original Message-----
From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex Hung
Sent: 22 November 2021 02:15
To: fwts-devel@lists.ubuntu.com
Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Buglink: https://bugs.launchpad.net/bugs/1947786

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/dmi/dmicheck/dmicheck.c   | 14 +++++++
 src/lib/include/fwts.h        |  1 +
 src/lib/include/fwts_kernel.h | 25 ++++++++++++
 src/lib/src/Makefile.am       |  1 +
 src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 src/lib/include/fwts_kernel.h
 create mode 100644 src/lib/src/fwts_kernel.c

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 7f6a90c4..3985b126 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw, fwts_smbios_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
@@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS3 table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 551a4e09..be754a99 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -185,6 +185,7 @@
 #include "fwts_iasl.h"
 #include "fwts_ipmi.h"
 #include "fwts_klog.h"
+#include "fwts_kernel.h"
 #include "fwts_olog.h"
 #include "fwts_pipeio.h"
 #include "fwts_stringextras.h"
diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
new file mode 100644
index 00000000..a89576ae
--- /dev/null
+++ b/src/lib/include/fwts_kernel.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_KERNEL_H__
+#define __FWTS_KERNEL_H__
+
+bool fwts_kernel_config_set(const char *config);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 55c52b41..0a39882a 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
        fwts_ioport.c           \
        fwts_ipmi.c             \
        fwts_json.c             \
+       fwts_kernel.c           \
        fwts_keymap.c           \
        fwts_klog.c             \
        fwts_olog.c             \
diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
new file mode 100644
index 00000000..10d11a99
--- /dev/null
+++ b/src/lib/src/fwts_kernel.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <sys/utsname.h>
+
+#include "fwts.h"
+#include "fwts_kernel.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <bsd/string.h>
+
+#define CONFIG_FILE_PREFIX     "/boot/config-"
+
+/*
+ *  fwts_kernel_config_set
+ *      check whether a kernel config is set, ex.
+ *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
+ */
+bool fwts_kernel_config_set(const char *config)
+{
+       const size_t config_str_len = strlen(config) + 3;
+       char config_file[PATH_MAX];
+       char config_str[255];
+       size_t config_file_len;
+       fwts_list* config_list;
+       fwts_list_link *item;
+       struct utsname buf;
+
+       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
+       uname(&buf);
+       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release) + 1;
+       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
+       (void)strlcat(config_file, buf.release, config_file_len);
+
+       config_list = fwts_file_open_and_read(config_file);
+       if (config_list == NULL)
+               return false;
+
+       fwts_list_foreach(item, config_list) {
+               /* check built-in, i.e. =y */
+               (void)strlcpy(config_str, config, config_str_len);
+               (void)strlcat(config_str, "=y", config_str_len);
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+
+               /* check module, i.e. =m */
+               config_str[strlen(config_str) - 1] = 'm';
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+       }
+
+       fwts_list_free(config_list, free);
+       return false;
+}
--
2.32.0


--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Alex Hung Nov. 22, 2021, 10:46 p.m. UTC | #2
On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com> wrote:

> Hi Alex,
>
> Edhaya and I just tested the v2 patch by cherry-picking it into our ACS
> FWTS, and then somehow this fix doesn’t work.
> Does it work on your side? Could you build the FWTS live image with this
> fix and offline share it with us for verification?
>

Yes it worked on my RPI4. The attached results.log contains two runs: 1st
run with patch (runs to completion) and 2nd run without the patch (stopped
in test 1)

The fwts-live requires released version of fwts so it's not possible
without major modifications. If it doesn't work I think the patch may not
fix but hide the error on my systems. We will have to revisit the bug again.



>
> Best Regards,
> Sunny
> -----Original Message-----
> From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex
> Hung
> Sent: 22 November 2021 02:15
> To: fwts-devel@lists.ubuntu.com
> Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64
>
> Buglink: https://bugs.launchpad.net/bugs/1947786
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c   | 14 +++++++
>  src/lib/include/fwts.h        |  1 +
>  src/lib/include/fwts_kernel.h | 25 ++++++++++++
>  src/lib/src/Makefile.am       |  1 +
>  src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
>  5 files changed, 115 insertions(+)
>  create mode 100644 src/lib/include/fwts_kernel.h
>  create mode 100644 src/lib/src/fwts_kernel.c
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 7f6a90c4..3985b126 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw,
> fwts_smbios_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS table in memory
> for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> @@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw,
> fwts_smbios30_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS3 table in
> memory for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
> index 551a4e09..be754a99 100644
> --- a/src/lib/include/fwts.h
> +++ b/src/lib/include/fwts.h
> @@ -185,6 +185,7 @@
>  #include "fwts_iasl.h"
>  #include "fwts_ipmi.h"
>  #include "fwts_klog.h"
> +#include "fwts_kernel.h"
>  #include "fwts_olog.h"
>  #include "fwts_pipeio.h"
>  #include "fwts_stringextras.h"
> diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
> new file mode 100644
> index 00000000..a89576ae
> --- /dev/null
> +++ b/src/lib/include/fwts_kernel.h
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#ifndef __FWTS_KERNEL_H__
> +#define __FWTS_KERNEL_H__
> +
> +bool fwts_kernel_config_set(const char *config);
> +
> +#endif
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 55c52b41..0a39882a 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
>         fwts_ioport.c           \
>         fwts_ipmi.c             \
>         fwts_json.c             \
> +       fwts_kernel.c           \
>         fwts_keymap.c           \
>         fwts_klog.c             \
>         fwts_olog.c             \
> diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
> new file mode 100644
> index 00000000..10d11a99
> --- /dev/null
> +++ b/src/lib/src/fwts_kernel.c
> @@ -0,0 +1,74 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#include <sys/utsname.h>
> +
> +#include "fwts.h"
> +#include "fwts_kernel.h"
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <bsd/string.h>
> +
> +#define CONFIG_FILE_PREFIX     "/boot/config-"
> +
> +/*
> + *  fwts_kernel_config_set
> + *      check whether a kernel config is set, ex.
> + *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
> + */
> +bool fwts_kernel_config_set(const char *config)
> +{
> +       const size_t config_str_len = strlen(config) + 3;
> +       char config_file[PATH_MAX];
> +       char config_str[255];
> +       size_t config_file_len;
> +       fwts_list* config_list;
> +       fwts_list_link *item;
> +       struct utsname buf;
> +
> +       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
> +       uname(&buf);
> +       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release)
> + 1;
> +       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
> +       (void)strlcat(config_file, buf.release, config_file_len);
> +
> +       config_list = fwts_file_open_and_read(config_file);
> +       if (config_list == NULL)
> +               return false;
> +
> +       fwts_list_foreach(item, config_list) {
> +               /* check built-in, i.e. =y */
> +               (void)strlcpy(config_str, config, config_str_len);
> +               (void)strlcat(config_str, "=y", config_str_len);
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +
> +               /* check module, i.e. =m */
> +               config_str[strlen(config_str) - 1] = 'm';
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +       }
> +
> +       fwts_list_free(config_list, free);
> +       return false;
> +}
> --
> 2.32.0
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
Alex Hung Nov. 22, 2021, 10:59 p.m. UTC | #3
It is also possible that your ACS uses a different approach for kernel
config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If
that's the case, this patch can be improved to include more ways for kernel
config.

On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com> wrote:

>
>
> On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
>> Hi Alex,
>>
>> Edhaya and I just tested the v2 patch by cherry-picking it into our ACS
>> FWTS, and then somehow this fix doesn’t work.
>> Does it work on your side? Could you build the FWTS live image with this
>> fix and offline share it with us for verification?
>>
>
> Yes it worked on my RPI4. The attached results.log contains two runs: 1st
> run with patch (runs to completion) and 2nd run without the patch (stopped
> in test 1)
>
> The fwts-live requires released version of fwts so it's not possible
> without major modifications. If it doesn't work I think the patch may not
> fix but hide the error on my systems. We will have to revisit the bug again.
>
>
>
>>
>> Best Regards,
>> Sunny
>> -----Original Message-----
>> From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex
>> Hung
>> Sent: 22 November 2021 02:15
>> To: fwts-devel@lists.ubuntu.com
>> Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64
>>
>> Buglink: https://bugs.launchpad.net/bugs/1947786
>>
>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
>> ---
>>  src/dmi/dmicheck/dmicheck.c   | 14 +++++++
>>  src/lib/include/fwts.h        |  1 +
>>  src/lib/include/fwts_kernel.h | 25 ++++++++++++
>>  src/lib/src/Makefile.am       |  1 +
>>  src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
>>  5 files changed, 115 insertions(+)
>>  create mode 100644 src/lib/include/fwts_kernel.h
>>  create mode 100644 src/lib/src/fwts_kernel.c
>>
>> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
>> index 7f6a90c4..3985b126 100644
>> --- a/src/dmi/dmicheck/dmicheck.c
>> +++ b/src/dmi/dmicheck/dmicheck.c
>> @@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw,
>> fwts_smbios_entry *entry)
>>                 free(table);
>>         }
>>
>> +#ifdef FWTS_ARCH_AARCH64
>> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
>> +               fwts_warning(fw, "Skipping scanning SMBIOS table in
>> memory for arm64 systems");
>> +               return NULL;
>> +       }
>> +#endif
>> +
>>         mem = fwts_mmap(addr, length);
>>         if (mem != FWTS_MAP_FAILED) {
>>                 /* Can we safely copy the table? */
>> @@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw,
>> fwts_smbios30_entry *entry)
>>                 free(table);
>>         }
>>
>> +#ifdef FWTS_ARCH_AARCH64
>> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
>> +               fwts_warning(fw, "Skipping scanning SMBIOS3 table in
>> memory for arm64 systems");
>> +               return NULL;
>> +       }
>> +#endif
>> +
>>         mem = fwts_mmap(addr, length);
>>         if (mem != FWTS_MAP_FAILED) {
>>                 /* Can we safely copy the table? */
>> diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
>> index 551a4e09..be754a99 100644
>> --- a/src/lib/include/fwts.h
>> +++ b/src/lib/include/fwts.h
>> @@ -185,6 +185,7 @@
>>  #include "fwts_iasl.h"
>>  #include "fwts_ipmi.h"
>>  #include "fwts_klog.h"
>> +#include "fwts_kernel.h"
>>  #include "fwts_olog.h"
>>  #include "fwts_pipeio.h"
>>  #include "fwts_stringextras.h"
>> diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
>> new file mode 100644
>> index 00000000..a89576ae
>> --- /dev/null
>> +++ b/src/lib/include/fwts_kernel.h
>> @@ -0,0 +1,25 @@
>> +/*
>> + * Copyright (C) 2021 Canonical
>> + *
>> + * This program is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License
>> + * as published by the Free Software Foundation; either version 2
>> + * of the License, or (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>> 02110-1301, USA.
>> + *
>> + */
>> +
>> +#ifndef __FWTS_KERNEL_H__
>> +#define __FWTS_KERNEL_H__
>> +
>> +bool fwts_kernel_config_set(const char *config);
>> +
>> +#endif
>> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
>> index 55c52b41..0a39882a 100644
>> --- a/src/lib/src/Makefile.am
>> +++ b/src/lib/src/Makefile.am
>> @@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
>>         fwts_ioport.c           \
>>         fwts_ipmi.c             \
>>         fwts_json.c             \
>> +       fwts_kernel.c           \
>>         fwts_keymap.c           \
>>         fwts_klog.c             \
>>         fwts_olog.c             \
>> diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
>> new file mode 100644
>> index 00000000..10d11a99
>> --- /dev/null
>> +++ b/src/lib/src/fwts_kernel.c
>> @@ -0,0 +1,74 @@
>> +/*
>> + * Copyright (C) 2021 Canonical
>> + *
>> + * This program is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License
>> + * as published by the Free Software Foundation; either version 2
>> + * of the License, or (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>> 02110-1301, USA.
>> + *
>> + */
>> +
>> +#include <sys/utsname.h>
>> +
>> +#include "fwts.h"
>> +#include "fwts_kernel.h"
>> +#include <stdlib.h>
>> +#include <stdio.h>
>> +#include <bsd/string.h>
>> +
>> +#define CONFIG_FILE_PREFIX     "/boot/config-"
>> +
>> +/*
>> + *  fwts_kernel_config_set
>> + *      check whether a kernel config is set, ex.
>> + *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
>> + */
>> +bool fwts_kernel_config_set(const char *config)
>> +{
>> +       const size_t config_str_len = strlen(config) + 3;
>> +       char config_file[PATH_MAX];
>> +       char config_str[255];
>> +       size_t config_file_len;
>> +       fwts_list* config_list;
>> +       fwts_list_link *item;
>> +       struct utsname buf;
>> +
>> +       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
>> +       uname(&buf);
>> +       config_file_len = strlen(CONFIG_FILE_PREFIX) +
>> strlen(buf.release) + 1;
>> +       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
>> +       (void)strlcat(config_file, buf.release, config_file_len);
>> +
>> +       config_list = fwts_file_open_and_read(config_file);
>> +       if (config_list == NULL)
>> +               return false;
>> +
>> +       fwts_list_foreach(item, config_list) {
>> +               /* check built-in, i.e. =y */
>> +               (void)strlcpy(config_str, config, config_str_len);
>> +               (void)strlcat(config_str, "=y", config_str_len);
>> +               if (!strncmp(fwts_text_list_text(item), config_str,
>> strlen(config_str))) {
>> +                       fwts_list_free(config_list, free);
>> +                       return true;
>> +               }
>> +
>> +               /* check module, i.e. =m */
>> +               config_str[strlen(config_str) - 1] = 'm';
>> +               if (!strncmp(fwts_text_list_text(item), config_str,
>> strlen(config_str))) {
>> +                       fwts_list_free(config_list, free);
>> +                       return true;
>> +               }
>> +       }
>> +
>> +       fwts_list_free(config_list, free);
>> +       return false;
>> +}
>> --
>> 2.32.0
>>
>>
>> --
>> fwts-devel mailing list
>> fwts-devel@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
>> IMPORTANT NOTICE: The contents of this email and any attachments are
>> confidential and may also be privileged. If you are not the intended
>> recipient, please notify the sender immediately and do not disclose the
>> contents to any other person, use it for any purpose, or store or copy the
>> information in any medium. Thank you.
>>
>
>
> --
> Cheers,
> Alex Hung
>
Sunny Wang Nov. 23, 2021, 11:18 a.m. UTC | #4
You’re right, Alex.
Edhaya and I just checked this. Our kernel config is in /proc/config.gz. Could you add code to handle /proc/config.gz?
For more information, please check https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system.

Best Regards,
Sunny
From: Alex Hung <alex.hung@canonical.com>
Sent: 22 November 2021 22:59
To: Sunny Wang <Sunny.Wang@arm.com>
Cc: fwts-devel@lists.ubuntu.com; G Edhaya Chandran <Edhaya.Chandran@arm.com>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

It is also possible that your ACS uses a different approach for kernel config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If that's the case, this patch can be improved to include more ways for kernel config.

On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>> wrote:


On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
Hi Alex,

Edhaya and I just tested the v2 patch by cherry-picking it into our ACS FWTS, and then somehow this fix doesn’t work.
Does it work on your side? Could you build the FWTS live image with this fix and offline share it with us for verification?

Yes it worked on my RPI4. The attached results.log contains two runs: 1st run with patch (runs to completion) and 2nd run without the patch (stopped in test 1)

The fwts-live requires released version of fwts so it's not possible without major modifications. If it doesn't work I think the patch may not fix but hide the error on my systems. We will have to revisit the bug again.



Best Regards,
Sunny
-----Original Message-----
From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com<mailto:fwts-devel-bounces@lists.ubuntu.com>> On Behalf Of Alex Hung
Sent: 22 November 2021 02:15
To: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Buglink: https://bugs.launchpad.net/bugs/1947786

Signed-off-by: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
---
 src/dmi/dmicheck/dmicheck.c   | 14 +++++++
 src/lib/include/fwts.h        |  1 +
 src/lib/include/fwts_kernel.h | 25 ++++++++++++
 src/lib/src/Makefile.am       |  1 +
 src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 src/lib/include/fwts_kernel.h
 create mode 100644 src/lib/src/fwts_kernel.c

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 7f6a90c4..3985b126 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw, fwts_smbios_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
@@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS3 table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 551a4e09..be754a99 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -185,6 +185,7 @@
 #include "fwts_iasl.h"
 #include "fwts_ipmi.h"
 #include "fwts_klog.h"
+#include "fwts_kernel.h"
 #include "fwts_olog.h"
 #include "fwts_pipeio.h"
 #include "fwts_stringextras.h"
diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
new file mode 100644
index 00000000..a89576ae
--- /dev/null
+++ b/src/lib/include/fwts_kernel.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_KERNEL_H__
+#define __FWTS_KERNEL_H__
+
+bool fwts_kernel_config_set(const char *config);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 55c52b41..0a39882a 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
        fwts_ioport.c           \
        fwts_ipmi.c             \
        fwts_json.c             \
+       fwts_kernel.c           \
        fwts_keymap.c           \
        fwts_klog.c             \
        fwts_olog.c             \
diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
new file mode 100644
index 00000000..10d11a99
--- /dev/null
+++ b/src/lib/src/fwts_kernel.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <sys/utsname.h>
+
+#include "fwts.h"
+#include "fwts_kernel.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <bsd/string.h>
+
+#define CONFIG_FILE_PREFIX     "/boot/config-"
+
+/*
+ *  fwts_kernel_config_set
+ *      check whether a kernel config is set, ex.
+ *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
+ */
+bool fwts_kernel_config_set(const char *config)
+{
+       const size_t config_str_len = strlen(config) + 3;
+       char config_file[PATH_MAX];
+       char config_str[255];
+       size_t config_file_len;
+       fwts_list* config_list;
+       fwts_list_link *item;
+       struct utsname buf;
+
+       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
+       uname(&buf);
+       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release) + 1;
+       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
+       (void)strlcat(config_file, buf.release, config_file_len);
+
+       config_list = fwts_file_open_and_read(config_file);
+       if (config_list == NULL)
+               return false;
+
+       fwts_list_foreach(item, config_list) {
+               /* check built-in, i.e. =y */
+               (void)strlcpy(config_str, config, config_str_len);
+               (void)strlcat(config_str, "=y", config_str_len);
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+
+               /* check module, i.e. =m */
+               config_str[strlen(config_str) - 1] = 'm';
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+       }
+
+       fwts_list_free(config_list, free);
+       return false;
+}
--
2.32.0


--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Alex Hung Nov. 25, 2021, 4:39 p.m. UTC | #5
On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com> wrote:

> You’re right, Alex.
>
> Edhaya and I just checked this. Our kernel config is in /proc/config.gz.
> Could you add code to handle /proc/config.gz?
>

Please share a copy of config.gz for further analysis.

> For more information, please check
> https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system
> .
>
>
>
> Best Regards,
>
> Sunny
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 22 November 2021 22:59
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> It is also possible that your ACS uses a different approach for kernel
> config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If
> that's the case, this patch can be improved to include more ways for kernel
> config.
>
>
>
> On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com> wrote:
>
>
>
>
>
> On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> Hi Alex,
>
> Edhaya and I just tested the v2 patch by cherry-picking it into our ACS
> FWTS, and then somehow this fix doesn’t work.
> Does it work on your side? Could you build the FWTS live image with this
> fix and offline share it with us for verification?
>
>
>
> Yes it worked on my RPI4. The attached results.log contains two runs: 1st
> run with patch (runs to completion) and 2nd run without the patch (stopped
> in test 1)
>
>
>
> The fwts-live requires released version of fwts so it's not possible
> without major modifications. If it doesn't work I think the patch may not
> fix but hide the error on my systems. We will have to revisit the bug again.
>
>
>
>
>
>
> Best Regards,
> Sunny
> -----Original Message-----
> From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex
> Hung
> Sent: 22 November 2021 02:15
> To: fwts-devel@lists.ubuntu.com
> Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64
>
> Buglink: https://bugs.launchpad.net/bugs/1947786
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c   | 14 +++++++
>  src/lib/include/fwts.h        |  1 +
>  src/lib/include/fwts_kernel.h | 25 ++++++++++++
>  src/lib/src/Makefile.am       |  1 +
>  src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
>  5 files changed, 115 insertions(+)
>  create mode 100644 src/lib/include/fwts_kernel.h
>  create mode 100644 src/lib/src/fwts_kernel.c
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 7f6a90c4..3985b126 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw,
> fwts_smbios_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS table in memory
> for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> @@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw,
> fwts_smbios30_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS3 table in
> memory for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
> index 551a4e09..be754a99 100644
> --- a/src/lib/include/fwts.h
> +++ b/src/lib/include/fwts.h
> @@ -185,6 +185,7 @@
>  #include "fwts_iasl.h"
>  #include "fwts_ipmi.h"
>  #include "fwts_klog.h"
> +#include "fwts_kernel.h"
>  #include "fwts_olog.h"
>  #include "fwts_pipeio.h"
>  #include "fwts_stringextras.h"
> diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
> new file mode 100644
> index 00000000..a89576ae
> --- /dev/null
> +++ b/src/lib/include/fwts_kernel.h
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#ifndef __FWTS_KERNEL_H__
> +#define __FWTS_KERNEL_H__
> +
> +bool fwts_kernel_config_set(const char *config);
> +
> +#endif
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 55c52b41..0a39882a 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
>         fwts_ioport.c           \
>         fwts_ipmi.c             \
>         fwts_json.c             \
> +       fwts_kernel.c           \
>         fwts_keymap.c           \
>         fwts_klog.c             \
>         fwts_olog.c             \
> diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
> new file mode 100644
> index 00000000..10d11a99
> --- /dev/null
> +++ b/src/lib/src/fwts_kernel.c
> @@ -0,0 +1,74 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#include <sys/utsname.h>
> +
> +#include "fwts.h"
> +#include "fwts_kernel.h"
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <bsd/string.h>
> +
> +#define CONFIG_FILE_PREFIX     "/boot/config-"
> +
> +/*
> + *  fwts_kernel_config_set
> + *      check whether a kernel config is set, ex.
> + *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
> + */
> +bool fwts_kernel_config_set(const char *config)
> +{
> +       const size_t config_str_len = strlen(config) + 3;
> +       char config_file[PATH_MAX];
> +       char config_str[255];
> +       size_t config_file_len;
> +       fwts_list* config_list;
> +       fwts_list_link *item;
> +       struct utsname buf;
> +
> +       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
> +       uname(&buf);
> +       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release)
> + 1;
> +       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
> +       (void)strlcat(config_file, buf.release, config_file_len);
> +
> +       config_list = fwts_file_open_and_read(config_file);
> +       if (config_list == NULL)
> +               return false;
> +
> +       fwts_list_foreach(item, config_list) {
> +               /* check built-in, i.e. =y */
> +               (void)strlcpy(config_str, config, config_str_len);
> +               (void)strlcat(config_str, "=y", config_str_len);
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +
> +               /* check module, i.e. =m */
> +               config_str[strlen(config_str) - 1] = 'm';
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +       }
> +
> +       fwts_list_free(config_list, free);
> +       return false;
> +}
> --
> 2.32.0
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
>
>
> --
>
> Cheers,
> Alex Hung
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
Sunny Wang Nov. 25, 2021, 5:39 p.m. UTC | #6
Here you go.

Best Regards,
Sunny

From: Alex Hung <alex.hung@canonical.com>
Sent: 25 November 2021 16:39
To: Sunny Wang <Sunny.Wang@arm.com>
Cc: fwts-devel@lists.ubuntu.com; G Edhaya Chandran <Edhaya.Chandran@arm.com>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64



On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
You’re right, Alex.
Edhaya and I just checked this. Our kernel config is in /proc/config.gz. Could you add code to handle /proc/config.gz?

Please share a copy of config.gz for further analysis.
For more information, please check https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system.

Best Regards,
Sunny
From: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
Sent: 22 November 2021 22:59
To: Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>>
Cc: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

It is also possible that your ACS uses a different approach for kernel config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If that's the case, this patch can be improved to include more ways for kernel config.

On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>> wrote:


On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
Hi Alex,

Edhaya and I just tested the v2 patch by cherry-picking it into our ACS FWTS, and then somehow this fix doesn’t work.
Does it work on your side? Could you build the FWTS live image with this fix and offline share it with us for verification?

Yes it worked on my RPI4. The attached results.log contains two runs: 1st run with patch (runs to completion) and 2nd run without the patch (stopped in test 1)

The fwts-live requires released version of fwts so it's not possible without major modifications. If it doesn't work I think the patch may not fix but hide the error on my systems. We will have to revisit the bug again.



Best Regards,
Sunny
-----Original Message-----
From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com<mailto:fwts-devel-bounces@lists.ubuntu.com>> On Behalf Of Alex Hung
Sent: 22 November 2021 02:15
To: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Buglink: https://bugs.launchpad.net/bugs/1947786

Signed-off-by: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
---
 src/dmi/dmicheck/dmicheck.c   | 14 +++++++
 src/lib/include/fwts.h        |  1 +
 src/lib/include/fwts_kernel.h | 25 ++++++++++++
 src/lib/src/Makefile.am       |  1 +
 src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 src/lib/include/fwts_kernel.h
 create mode 100644 src/lib/src/fwts_kernel.c

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 7f6a90c4..3985b126 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw, fwts_smbios_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
@@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS3 table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 551a4e09..be754a99 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -185,6 +185,7 @@
 #include "fwts_iasl.h"
 #include "fwts_ipmi.h"
 #include "fwts_klog.h"
+#include "fwts_kernel.h"
 #include "fwts_olog.h"
 #include "fwts_pipeio.h"
 #include "fwts_stringextras.h"
diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
new file mode 100644
index 00000000..a89576ae
--- /dev/null
+++ b/src/lib/include/fwts_kernel.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_KERNEL_H__
+#define __FWTS_KERNEL_H__
+
+bool fwts_kernel_config_set(const char *config);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 55c52b41..0a39882a 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
        fwts_ioport.c           \
        fwts_ipmi.c             \
        fwts_json.c             \
+       fwts_kernel.c           \
        fwts_keymap.c           \
        fwts_klog.c             \
        fwts_olog.c             \
diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
new file mode 100644
index 00000000..10d11a99
--- /dev/null
+++ b/src/lib/src/fwts_kernel.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <sys/utsname.h>
+
+#include "fwts.h"
+#include "fwts_kernel.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <bsd/string.h>
+
+#define CONFIG_FILE_PREFIX     "/boot/config-"
+
+/*
+ *  fwts_kernel_config_set
+ *      check whether a kernel config is set, ex.
+ *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
+ */
+bool fwts_kernel_config_set(const char *config)
+{
+       const size_t config_str_len = strlen(config) + 3;
+       char config_file[PATH_MAX];
+       char config_str[255];
+       size_t config_file_len;
+       fwts_list* config_list;
+       fwts_list_link *item;
+       struct utsname buf;
+
+       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
+       uname(&buf);
+       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release) + 1;
+       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
+       (void)strlcat(config_file, buf.release, config_file_len);
+
+       config_list = fwts_file_open_and_read(config_file);
+       if (config_list == NULL)
+               return false;
+
+       fwts_list_foreach(item, config_list) {
+               /* check built-in, i.e. =y */
+               (void)strlcpy(config_str, config, config_str_len);
+               (void)strlcat(config_str, "=y", config_str_len);
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+
+               /* check module, i.e. =m */
+               config_str[strlen(config_str) - 1] = 'm';
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+       }
+
+       fwts_list_free(config_list, free);
+       return false;
+}
--
2.32.0


--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Alex Hung Dec. 7, 2021, 10:58 p.m. UTC | #7
Hi Sunny,

The attached patch also checks /proc/config.gz.

Please give it a try and let me know whether it works or needs improvement.

On Thu, Nov 25, 2021 at 10:39 AM Sunny Wang <Sunny.Wang@arm.com> wrote:

> Here you go.
>
>
>
> Best Regards,
>
> Sunny
>
>
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 25 November 2021 16:39
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
>
>
>
>
> On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> You’re right, Alex.
>
> Edhaya and I just checked this. Our kernel config is in /proc/config.gz.
> Could you add code to handle /proc/config.gz?
>
>
>
> Please share a copy of config.gz for further analysis.
>
> For more information, please check
> https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system
> .
>
>
>
> Best Regards,
>
> Sunny
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 22 November 2021 22:59
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> It is also possible that your ACS uses a different approach for kernel
> config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If
> that's the case, this patch can be improved to include more ways for kernel
> config.
>
>
>
> On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com> wrote:
>
>
>
>
>
> On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> Hi Alex,
>
> Edhaya and I just tested the v2 patch by cherry-picking it into our ACS
> FWTS, and then somehow this fix doesn’t work.
> Does it work on your side? Could you build the FWTS live image with this
> fix and offline share it with us for verification?
>
>
>
> Yes it worked on my RPI4. The attached results.log contains two runs: 1st
> run with patch (runs to completion) and 2nd run without the patch (stopped
> in test 1)
>
>
>
> The fwts-live requires released version of fwts so it's not possible
> without major modifications. If it doesn't work I think the patch may not
> fix but hide the error on my systems. We will have to revisit the bug again.
>
>
>
>
>
>
> Best Regards,
> Sunny
> -----Original Message-----
> From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex
> Hung
> Sent: 22 November 2021 02:15
> To: fwts-devel@lists.ubuntu.com
> Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64
>
> Buglink: https://bugs.launchpad.net/bugs/1947786
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c   | 14 +++++++
>  src/lib/include/fwts.h        |  1 +
>  src/lib/include/fwts_kernel.h | 25 ++++++++++++
>  src/lib/src/Makefile.am       |  1 +
>  src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
>  5 files changed, 115 insertions(+)
>  create mode 100644 src/lib/include/fwts_kernel.h
>  create mode 100644 src/lib/src/fwts_kernel.c
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 7f6a90c4..3985b126 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw,
> fwts_smbios_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS table in memory
> for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> @@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw,
> fwts_smbios30_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS3 table in
> memory for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
> index 551a4e09..be754a99 100644
> --- a/src/lib/include/fwts.h
> +++ b/src/lib/include/fwts.h
> @@ -185,6 +185,7 @@
>  #include "fwts_iasl.h"
>  #include "fwts_ipmi.h"
>  #include "fwts_klog.h"
> +#include "fwts_kernel.h"
>  #include "fwts_olog.h"
>  #include "fwts_pipeio.h"
>  #include "fwts_stringextras.h"
> diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
> new file mode 100644
> index 00000000..a89576ae
> --- /dev/null
> +++ b/src/lib/include/fwts_kernel.h
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#ifndef __FWTS_KERNEL_H__
> +#define __FWTS_KERNEL_H__
> +
> +bool fwts_kernel_config_set(const char *config);
> +
> +#endif
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 55c52b41..0a39882a 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
>         fwts_ioport.c           \
>         fwts_ipmi.c             \
>         fwts_json.c             \
> +       fwts_kernel.c           \
>         fwts_keymap.c           \
>         fwts_klog.c             \
>         fwts_olog.c             \
> diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
> new file mode 100644
> index 00000000..10d11a99
> --- /dev/null
> +++ b/src/lib/src/fwts_kernel.c
> @@ -0,0 +1,74 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#include <sys/utsname.h>
> +
> +#include "fwts.h"
> +#include "fwts_kernel.h"
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <bsd/string.h>
> +
> +#define CONFIG_FILE_PREFIX     "/boot/config-"
> +
> +/*
> + *  fwts_kernel_config_set
> + *      check whether a kernel config is set, ex.
> + *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
> + */
> +bool fwts_kernel_config_set(const char *config)
> +{
> +       const size_t config_str_len = strlen(config) + 3;
> +       char config_file[PATH_MAX];
> +       char config_str[255];
> +       size_t config_file_len;
> +       fwts_list* config_list;
> +       fwts_list_link *item;
> +       struct utsname buf;
> +
> +       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
> +       uname(&buf);
> +       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release)
> + 1;
> +       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
> +       (void)strlcat(config_file, buf.release, config_file_len);
> +
> +       config_list = fwts_file_open_and_read(config_file);
> +       if (config_list == NULL)
> +               return false;
> +
> +       fwts_list_foreach(item, config_list) {
> +               /* check built-in, i.e. =y */
> +               (void)strlcpy(config_str, config, config_str_len);
> +               (void)strlcat(config_str, "=y", config_str_len);
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +
> +               /* check module, i.e. =m */
> +               config_str[strlen(config_str) - 1] = 'm';
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +       }
> +
> +       fwts_list_free(config_list, free);
> +       return false;
> +}
> --
> 2.32.0
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
>
>
> --
>
> Cheers,
> Alex Hung
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
G Edhaya Chandran Dec. 13, 2021, 7:48 a.m. UTC | #8
Hello Alex,

   Thank you. The solution does work on our ACS Image.
Attached are the logs.


However I did find a build issue for including the .h file:
#include <zlib.h>

In the Ubuntu installation that I have this file exists in
/usr/include

When I included this path though -I/usr/include in Makefile.md, it gave redefinition errors for other symbols.
So I updated the code to
#include </usr/include/zlib.h>
to complete the build.

With Warm Regards,
Edhay



From: Alex Hung <alex.hung@canonical.com>
Sent: 08 December 2021 04:28
To: Sunny Wang <Sunny.Wang@arm.com>
Cc: fwts-devel@lists.ubuntu.com; G Edhaya Chandran <Edhaya.Chandran@arm.com>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Hi Sunny,

The attached patch also checks /proc/config.gz.

Please give it a try and let me know whether it works or needs improvement.

On Thu, Nov 25, 2021 at 10:39 AM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
Here you go.

Best Regards,
Sunny

From: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
Sent: 25 November 2021 16:39
To: Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>>
Cc: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64



On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
You’re right, Alex.
Edhaya and I just checked this. Our kernel config is in /proc/config.gz. Could you add code to handle /proc/config.gz?

Please share a copy of config.gz for further analysis.
For more information, please check https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system.

Best Regards,
Sunny
From: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
Sent: 22 November 2021 22:59
To: Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>>
Cc: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

It is also possible that your ACS uses a different approach for kernel config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If that's the case, this patch can be improved to include more ways for kernel config.

On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>> wrote:


On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
Hi Alex,

Edhaya and I just tested the v2 patch by cherry-picking it into our ACS FWTS, and then somehow this fix doesn’t work.
Does it work on your side? Could you build the FWTS live image with this fix and offline share it with us for verification?

Yes it worked on my RPI4. The attached results.log contains two runs: 1st run with patch (runs to completion) and 2nd run without the patch (stopped in test 1)

The fwts-live requires released version of fwts so it's not possible without major modifications. If it doesn't work I think the patch may not fix but hide the error on my systems. We will have to revisit the bug again.



Best Regards,
Sunny
-----Original Message-----
From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com<mailto:fwts-devel-bounces@lists.ubuntu.com>> On Behalf Of Alex Hung
Sent: 22 November 2021 02:15
To: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Buglink: https://bugs.launchpad.net/bugs/1947786

Signed-off-by: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
---
 src/dmi/dmicheck/dmicheck.c   | 14 +++++++
 src/lib/include/fwts.h        |  1 +
 src/lib/include/fwts_kernel.h | 25 ++++++++++++
 src/lib/src/Makefile.am       |  1 +
 src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 src/lib/include/fwts_kernel.h
 create mode 100644 src/lib/src/fwts_kernel.c

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 7f6a90c4..3985b126 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw, fwts_smbios_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
@@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS3 table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 551a4e09..be754a99 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -185,6 +185,7 @@
 #include "fwts_iasl.h"
 #include "fwts_ipmi.h"
 #include "fwts_klog.h"
+#include "fwts_kernel.h"
 #include "fwts_olog.h"
 #include "fwts_pipeio.h"
 #include "fwts_stringextras.h"
diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
new file mode 100644
index 00000000..a89576ae
--- /dev/null
+++ b/src/lib/include/fwts_kernel.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_KERNEL_H__
+#define __FWTS_KERNEL_H__
+
+bool fwts_kernel_config_set(const char *config);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 55c52b41..0a39882a 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
        fwts_ioport.c           \
        fwts_ipmi.c             \
        fwts_json.c             \
+       fwts_kernel.c           \
        fwts_keymap.c           \
        fwts_klog.c             \
        fwts_olog.c             \
diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
new file mode 100644
index 00000000..10d11a99
--- /dev/null
+++ b/src/lib/src/fwts_kernel.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <sys/utsname.h>
+
+#include "fwts.h"
+#include "fwts_kernel.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <bsd/string.h>
+
+#define CONFIG_FILE_PREFIX     "/boot/config-"
+
+/*
+ *  fwts_kernel_config_set
+ *      check whether a kernel config is set, ex.
+ *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
+ */
+bool fwts_kernel_config_set(const char *config)
+{
+       const size_t config_str_len = strlen(config) + 3;
+       char config_file[PATH_MAX];
+       char config_str[255];
+       size_t config_file_len;
+       fwts_list* config_list;
+       fwts_list_link *item;
+       struct utsname buf;
+
+       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
+       uname(&buf);
+       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release) + 1;
+       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
+       (void)strlcat(config_file, buf.release, config_file_len);
+
+       config_list = fwts_file_open_and_read(config_file);
+       if (config_list == NULL)
+               return false;
+
+       fwts_list_foreach(item, config_list) {
+               /* check built-in, i.e. =y */
+               (void)strlcpy(config_str, config, config_str_len);
+               (void)strlcat(config_str, "=y", config_str_len);
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+
+               /* check module, i.e. =m */
+               config_str[strlen(config_str) - 1] = 'm';
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+       }
+
+       fwts_list_free(config_list, free);
+       return false;
+}
--
2.32.0


--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Arm ACS Version: v1.0
Results generated by fwts: Version V21.08.00 (2021-08-25 05:50:00).

Some of this work - Copyright (c) 1999 - 2021, Intel Corp. All rights reserved.
Some of this work - Copyright (c) 2010 - 2021, Canonical.
Some of this work - Copyright (c) 2016 - 2021, IBM.
Some of this work - Copyright (c) 2017 - 2021, ARM Ltd.

This test run on 09/12/21 at 08:17:34 on host Linux (none)
5.13.0-00001-gddf0fe9dbb06 #1 SMP PREEMPT Tue Nov 16 18:09:40 IST 2021 aarch64.

Command: "fwts -r stdout -q --sbbr esrt uefibootpath".
Running tests: esrt uefibootpath uefirtmisc uefirtvariable uefirttime dmicheck
xsdt spcr rsdp_sbbr pptt method mcfg madt gtdt fadt_sbbr dbg2 acpi_sbbr
acpitables.

esrt: Sanity check UEFI ESRT Table.
--------------------------------------------------------------------------------
Cannot find ESRT table, firmware seems not supported. Aborted.
Aborted test, initialisation failed.
================================================================================
0 passed, 0 failed, 0 warning, 1 aborted, 0 skipped, 0 info only.
================================================================================

uefibootpath: Sanity check for UEFI Boot Path Boot####.
--------------------------------------------------------------------------------
Test 1 of 1: Test UEFI Boot Path Boot####.
SKIPPED: Test 1, Cannot find any UEFI variables.

================================================================================
0 passed, 0 failed, 0 warning, 0 aborted, 1 skipped, 0 info only.
================================================================================

uefirtmisc: UEFI miscellaneous runtime service interface tests.
--------------------------------------------------------------------------------
Test 1 of 4: Test for UEFI miscellaneous runtime service interfaces.
Testing UEFI runtime service GetNextHighMonotonicCount interface.
PASSED: Test 1, UEFI runtime service GetNextHighMonotonicCount interface test
passed.
Testing UEFI runtime service QueryCapsuleCapabilities interface.
SKIPPED: Test 1, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x0: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 1, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x10000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 1, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x30000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 1, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x50000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 1, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x70000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.


Test 2 of 4: Stress test for UEFI miscellaneous runtime service interfaces.
Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.
PASSED: Test 2, UEFI runtime service GetNextHighMonotonicCount interface test
passed.
Stress testing UEFI runtime service QueryCapsuleCapabilities interface.
SKIPPED: Test 2, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x0: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 2, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x10000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 2, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x30000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 2, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x50000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.

SKIPPED: Test 2, Not support the UEFI QueryCapsuleCapabilities runtime interface
with flag value 0x70000: cannot test.

ADVICE: Firmware also needs to check if the revision of system table is correct
or not. Linux kernel returns EFI_UNSUPPORTED as well, if the FirmwareRevision of
system table is less than EFI_2_00_SYSTEM_TABLE_REVISION.


Test 3 of 4: Test GetNextHighMonotonicCount with invalid NULL parameter.
PASSED: Test 3, Test with invalid NULL parameter returned EFI_INVALID_PARAMETER
as expected.

Test 4 of 4: Test UEFI miscellaneous runtime services unsupported status.
SKIPPED: Test 4, GetNextHighMonotonicCount runtime service supported, skip test.

================================================================================
3 passed, 0 failed, 0 warning, 0 aborted, 11 skipped, 0 info only.
================================================================================

uefirtvariable: UEFI Runtime service variable interface tests.
--------------------------------------------------------------------------------
Test 1 of 9: Test UEFI RT service get variable interface.
PASSED: Test 1, UEFI runtime service GetVariable interface test passed.

Test 2 of 9: Test UEFI RT service get next variable name interface.
The runtime service GetNextVariableName interface function test.
PASSED: Test 2, The runtime service GetNextVariableName interface function test
passed.
Check the GetNextVariableName returned value of VariableNameSize is equal to the
length of VariableName.
PASSED: Test 2, Check the GetNextVariableName returned value of VariableNameSize
is equal to the length of VariableName passed.
Test GetNextVariableName interface returns unique variables.
PASSED: Test 2, Test GetNextVariableName interface returns unique variables
passed.
The GetNextVariableName interface conformance tests.
PASSED: Test 2, The runtime service GetNextVariableName interface conformance
tests passed.

Test 3 of 9: Test UEFI RT service set variable interface.
Testing SetVariable on two different GUIDs and the same variable name.
PASSED: Test 3, SetVariable on two different GUIDs and the same variable name
passed.
Testing SetVariable on the same and different variable data.
PASSED: Test 3, SetVariable on the same and different variable data passed.
Testing SetVariable on similar variable name.
PASSED: Test 3, SetVariable on similar variable name passed.
Testing SetVariable on DataSize is 0.
PASSED: Test 3, SetVariable on DataSize is 0 passed.
Testing SetVariable on Attributes is 0.
PASSED: Test 3, SetVariable on Attributes is 0 passed.
Testing SetVariable on Invalid Attributes.
PASSED: Test 3, SetVariable on Invalid Attributes passed.
Testing SetVariable with both Authenticated Attributes set.
PASSED: Test 3, Testing SetVariable with both Authenticated Attributes set
passed.
Testing SetVariable with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS Attributes.
WARNING: Test 3, EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated (UEFI
2.7) and should not be used. Platforms should return EFI_UNSUPPORTED if a caller
to SetVariable() specifies this attribute.
Return status: EFI_INVALID_PARAMETER. A parameter was incorrect.

Test 4 of 9: Test UEFI RT service query variable info interface.
PASSED: Test 4, UEFI runtime service query variable info interface test passed.

Test 5 of 9: Test UEFI RT service variable interface stress test.
Testing GetVariable on getting the variable 1024 times.
PASSED: Test 5, GetVariable on getting the variable multiple times passed.
Testing GetNextVariableName on getting the variable multiple times.
PASSED: Test 5, GetNextVariableName on getting the next variable name multiple
times passed.

Test 6 of 9: Test UEFI RT service set variable interface stress test.
Testing SetVariable on setting the variable with the same data 40 times.
PASSED: Test 6, SetVariable on setting the variable with the same data multiple
times passed.
Testing SetVariable on setting the variable with different data 40 times.
PASSED: Test 6, Testing SetVariable on setting the variable with different data
multiple times passed.
Testing SetVariable on setting the variable with different name 40 times.
PASSED: Test 6, Testing SetVariable on setting the variable with different name
multiple times passed.
Testing SetVariable on setting the variable with different name and data 40
times.
PASSED: Test 6, Testing SetVariable on setting the variable with different name
and data multiple times passed.

Test 7 of 9: Test UEFI RT service query variable info interface stress test.
Testing QueryVariableInfo on querying the variable 1024 times.
PASSED: Test 7, UEFI runtime service query variable info interface stress test
passed.

Test 8 of 9: Test UEFI RT service get variable interface, invalid parameters.
Testing GetVariable with NULL variable name.
PASSED: Test 8, GetVariable with NULL variable name returned error
EFI_INVALID_PARAMETER as expected.
Testing GetVariable with NULL vendor GUID.
PASSED: Test 8, GetVariable with NULL vendor GUID returned error
EFI_INVALID_PARAMETER as expected.
Testing GetVariable with NULL datasize.
PASSED: Test 8, GetVariable with NULL datasize returned error
EFI_INVALID_PARAMETER as expected.
Testing GetVariable with NULL data.
PASSED: Test 8, GetVariable with NULL data returned error EFI_INVALID_PARAMETER
as expected.
Testing GetVariable with NULL variable name, vendor GUID, datasize and data.
PASSED: Test 8, GetVariable with NULL variable name, vendor GUID, datasize and
data returned error EFI_INVALID_PARAMETER as expected.

Test 9 of 9: Test UEFI RT variable services unsupported status.
SKIPPED: Test 9, SetVariable runtime service supported, skip test.
SKIPPED: Test 9, GetVariable runtime service supported, skip test.
SKIPPED: Test 9, GetNextVarName runtime service supported, skip test.
SKIPPED: Test 9, QueryVarInfo runtime service supported, skip test.

================================================================================
25 passed, 0 failed, 1 warning, 0 aborted, 4 skipped, 0 info only.
================================================================================

uefirttime: UEFI Runtime service time interface tests.
--------------------------------------------------------------------------------
Test 1 of 36: Test UEFI RT service get time interface.
PASSED: Test 1, UEFI runtime service GetTime interface test passed.

Test 2 of 36: Test UEFI RT service get time interface, NULL time parameter.
PASSED: Test 2, UEFI runtime service GetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 3 of 36: Test UEFI RT service get time interface, NULL time and NULL
capabilities parameters.
PASSED: Test 3, UEFI runtime service GetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 4 of 36: Test UEFI RT service set time interface.
PASSED: Test 4, UEFI runtime service SetTime interface test passed.

Test 5 of 36: Test UEFI RT service set time interface, invalid year 1899.
PASSED: Test 5, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 6 of 36: Test UEFI RT service set time interface, invalid year 10000.
PASSED: Test 6, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 7 of 36: Test UEFI RT service set time interface, invalid month 0.
PASSED: Test 7, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 8 of 36: Test UEFI RT service set time interface, invalid month 13.
PASSED: Test 8, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 9 of 36: Test UEFI RT service set time interface, invalid day 0.
PASSED: Test 9, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 10 of 36: Test UEFI RT service set time interface, invalid day 32.
PASSED: Test 10, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 11 of 36: Test UEFI RT service set time interface, invalid hour 24.
PASSED: Test 11, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 12 of 36: Test UEFI RT service set time interface, invalid minute 60.
PASSED: Test 12, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 13 of 36: Test UEFI RT service set time interface, invalid second 60.
PASSED: Test 13, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 14 of 36: Test UEFI RT service set time interface, invalid nanosecond
1000000000.
PASSED: Test 14, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 15 of 36: Test UEFI RT service set time interface, invalid timezone -1441.
PASSED: Test 15, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 16 of 36: Test UEFI RT service set time interface, invalid timezone 1441.
PASSED: Test 16, UEFI runtime service SetTime interface test passed, returned
EFI_INVALID_PARAMETER as expected.

Test 17 of 36: Test UEFI RT service get wakeup time interface.
SKIPPED: Test 17, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 18 of 36: Test UEFI RT service get wakeup time interface, NULL enabled
parameter.
PASSED: Test 18, UEFI runtime service GetTimeWakeupTime interface test passed,
returned EFI_INVALID_PARAMETER as expected.

Test 19 of 36: Test UEFI RT service get wakeup time interface, NULL pending
parameter.
PASSED: Test 19, UEFI runtime service GetTimeWakeupTime interface test passed,
returned EFI_INVALID_PARAMETER as expected.

Test 20 of 36: Test UEFI RT service get wakeup time interface, NULL time
parameter.
PASSED: Test 20, UEFI runtime service GetTimeWakeupTime interface test passed,
returned EFI_INVALID_PARAMETER as expected.

Test 21 of 36: Test UEFI RT service get wakeup time interface, NULL enabled,
pending and time parameters.
PASSED: Test 21, UEFI runtime service GetTimeWakeupTime interface test passed,
returned EFI_INVALID_PARAMETER as expected.

Test 22 of 36: Test UEFI RT service set wakeup time interface.
SKIPPED: Test 22, Skipping test, SetWakeupTime runtime service is not supported
on this platform.

Test 23 of 36: Test UEFI RT service set wakeup time interface, NULL time
parameter.
SKIPPED: Test 23, Skipping test, SetWakeupTime runtime service is not supported
on this platform.

Test 24 of 36: Test UEFI RT service set wakeup time interface, invalid year
1899.
SKIPPED: Test 24, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 25 of 36: Test UEFI RT service set wakeup time interface, invalid year
10000.
SKIPPED: Test 25, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 26 of 36: Test UEFI RT service set wakeup time interface, invalid month 0.
SKIPPED: Test 26, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 27 of 36: Test UEFI RT service set wakeup time interface, invalid month 13.
SKIPPED: Test 27, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 28 of 36: Test UEFI RT service set wakeup time interface, invalid day 0.
SKIPPED: Test 28, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 29 of 36: Test UEFI RT service set wakeup time interface, invalid day 32.
SKIPPED: Test 29, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 30 of 36: Test UEFI RT service set wakeup time interface, invalid hour 24.
SKIPPED: Test 30, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 31 of 36: Test UEFI RT service set wakeup time interface, invalid minute
60.
SKIPPED: Test 31, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 32 of 36: Test UEFI RT service set wakeup time interface, invalid second
60.
SKIPPED: Test 32, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 33 of 36: Test UEFI RT service set wakeup time interface, invalid
nanosecond 1000000000.
SKIPPED: Test 33, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 34 of 36: Test UEFI RT service set wakeup time interface, invalid timezone
-1441.
SKIPPED: Test 34, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 35 of 36: Test UEFI RT service set wakeup time interface, invalid timezone
1441.
SKIPPED: Test 35, Skipping test, GetWakeupTime runtime service is not supported
on this platform.

Test 36 of 36: Test UEFI RT time services unsupported status.
SKIPPED: Test 36, GetTime runtime service supported, skip test.
SKIPPED: Test 36, SetTime runtime service supported, skip test.
SKIPPED: Test 36, SetWakeupTime runtime service supported, skip test.
SKIPPED: Test 36, GetWakeupTime runtime service supported, skip test.

================================================================================
20 passed, 0 failed, 0 warning, 0 aborted, 19 skipped, 0 info only.
================================================================================

dmicheck: DMI/SMBIOS table tests.
--------------------------------------------------------------------------------
Test 1 of 4: Find and test SMBIOS Table Entry Points.
This test tries to find and sanity check the SMBIOS data structures.
PASSED: Test 1, Found SMBIOS Table Entry Point at 0xfe9e0000
SMBIOS Entry Point Structure:
  Anchor String          : _SM_
  Checksum               : 0x9a
  Entry Point Length     : 0x1f
  Major Version          : 0x03
  Minor Version          : 0x04
  Maximum Struct Size    : 0x00e2
  Entry Point Revision   : 0x00
  Formatted Area         : 0x00 0x00 0x00 0x00 0x00
  Intermediate Anchor    : _DMI_
  Intermediate Checksum  : 0xa3
  Structure Table Length : 0x04e4
  Structure Table Address: 0xfe9d0000
  # of SMBIOS Structures : 0x000e
  SMBIOS BCD Revision    : 34

PASSED: Test 1, SMBIOS Table Entry Point Checksum is valid.
PASSED: Test 1, SMBIOS Table Entry Point Length is valid.
PASSED: Test 1, SMBIOS Table Entry Intermediate Anchor String _DMI_ is valid.
PASSED: Test 1, SMBIOS Table Entry Point Intermediate Checksum is valid.
PASSED: Test 1, Found SMBIOS30 Table Entry Point at 0xfe9c0000
SMBIOS30 Entry Point Structure:
  Anchor String          : _SM3_
  Checksum               : 0xce
  Entry Point Length     : 0x18
  Major Version          : 0x03
  Minor Version          : 0x04
  Docrev                 : 0x00
  Entry Point Revision   : 0x01
  Reserved               : 0x00
  Table maximum size     : 0x000004e4
  Table address          : 0x00000000fe9b0000

PASSED: Test 1, SMBIOS30 Table Entry Point Checksum is valid.
PASSED: Test 1, SMBIOS30 Table Entry Point Length is valid.
SMBIOS30 table loaded from /sys/firmware/dmi/tables/DMI
PASSED: Test 1, SMBIOS 3.0 Table Entry Structure Table Address and Length looks
valid.

Test 2 of 4: Test DMI/SMBIOS tables for errors.

Test 3 of 4: Test DMI/SMBIOS3 tables for errors.
SMBIOS30 table loaded from /sys/firmware/dmi/tables/DMI
PASSED: Test 3, Entry @ 0xfe9b0000 'BIOS Information (Type 0)'
PASSED: Test 3, Entry @ 0xfe9b0036 'System Information (Type 1)'
PASSED: Test 3, Entry @ 0xfe9b00d5 'Chassis Information (Type 3)'
PASSED: Test 3, Entry @ 0xfe9b0127 'Processor Information (Type 4)'
PASSED: Test 3, Entry @ 0xfe9b0209 'Cache Information (Type 7)'
PASSED: Test 3, Entry @ 0xfe9b0246 'Cache Information (Type 7)'
PASSED: Test 3, Entry @ 0xfe9b0283 'Cache Information (Type 7)'
PASSED: Test 3, Entry @ 0xfe9b02c0 'Cache Information (Type 7)'
PASSED: Test 3, Entry @ 0xfe9b02fd 'Physical Memory Array (Type 16)'
PASSED: Test 3, Entry @ 0xfe9b0316 'Memory Device (Type 17)'
PASSED: Test 3, Entry @ 0xfe9b03e3 'Memory Device (Type 17)'
PASSED: Test 3, Entry @ 0xfe9b04b0 'Memory Array Mapped Address (Type 19)'
PASSED: Test 3, Entry @ 0xfe9b04d1 'System Boot Information (Type 32)'

Test 4 of 4: Test ARM SBBR SMBIOS structure requirements.
PASSED: Test 4, SMBIOS structure BIOS Information (Type 0) found.
PASSED: Test 4, SMBIOS structure System Information (Type 1) found.
SKIPPED: Test 4, SMBIOS structure Baseboard Information (Type 2) not found. This
structure is recommended.
PASSED: Test 4, SMBIOS structure System Enclosure or Chassis (Type 3) found.
PASSED: Test 4, SMBIOS structure Processor Information (Type 4) found.
PASSED: Test 4, SMBIOS structure Cache Information (Type 7) found.
SKIPPED: Test 4, SMBIOS structure Port Connector Information (Type 8) not found.
Recommended for platforms with physical ports.
SKIPPED: Test 4, SMBIOS structure System Slots (Type 9) not found. Required for
platforms with expansion slots.
SKIPPED: Test 4, SMBIOS structure OEM Strings (Type 11) not found. This
structure is recommended.
SKIPPED: Test 4, SMBIOS structure BIOS Language Information (Type 13) not found.
This structure is recommended.
SKIPPED: Test 4, SMBIOS structure System Event Log (Type 15) not found. This
structure is recommended.
PASSED: Test 4, SMBIOS structure Physical Memory Array (Type 16) found.
PASSED: Test 4, SMBIOS structure Memory Device (Type 17) found.
PASSED: Test 4, SMBIOS structure Memory Array Mapped Address (Type 19) found.
PASSED: Test 4, SMBIOS structure System Boot Information (Type 32) found.
SKIPPED: Test 4, SMBIOS structure IPMI Device Information (Type 38) not found.
Required for platforms with IPMI BMC Interface.
SKIPPED: Test 4, SMBIOS structure Onboard Devices Extended Information (Type 41)
not found. This structure is recommended.
SKIPPED: Test 4, SMBIOS structure Redfish Host Interface (Type 42) not found.
Required for platforms supporting Redfish Host Interface.

================================================================================
31 passed, 0 failed, 0 warning, 0 aborted, 9 skipped, 0 info only.
================================================================================

xsdt: XSDT Extended System Description Table test.
--------------------------------------------------------------------------------
No FACS found, fwts has faked one instead.
Test 1 of 1: XSDT Extended System Description Table test.
PASSED: Test 1, XSDT is present, pointed at by XsdrAddress=0xbff00000 and
contain valid pointers to 13 other ACPI tables mandated by SBBR

================================================================================
1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

spcr: SPCR Serial Port Console Redirection Table test.
--------------------------------------------------------------------------------
Test 1 of 3: SPCR Serial Port Console Redirection Table test.
Serial Interface: ARM PL011 UART
Baud Rate:        115200
Terminal Type:    ANSI
PASSED: Test 1, No issues found in SPCR table.

Test 2 of 3: SPCR Revision Test.
PASSED: Test 2, SPCR revision is up to date.

Test 3 of 3: SPCR GSIV Interrupt Test.
PASSED: Test 3, SPCR appears to be populated with correct GSIV interruptrouting
information for ARM PL011 UART Device

================================================================================
3 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

rsdp_sbbr: SBBR RSDP Root System Description Pointer tests.
--------------------------------------------------------------------------------
Test 1 of 1: RSDP Root System Description Pointer test.
RSDP Signature = RSD PTR 
RSDP Checksum = 0x0
RSDP Revision = 0x2
RSDP Length = 0x24
RSDP Extended Checksum = 0x0
PASSED: Test 1, SBBR RSDP: Structure of RSDP Table is consistent with ACPI 6.0
or later and uses 64 bit xsdt addresses.

================================================================================
1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

pptt: PPTT Processor Properties Topology Table test.
--------------------------------------------------------------------------------
Test 1 of 1: Validate PPTT table.
PPTT Processor Properties Topology Table:
  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x00000011
    Parent:                         0x00000000
    ACPI Processor ID:              0x00000000
    Number of Private Resources:    0x00000001
    Private Resources[0]:           0x0000003c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x02000000
    Number of sets:                 0x00008000
    Associativity:                  0x10
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000000
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x00000054
    ACPI Processor ID:              0x00000000
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000084
    Private Resources[1]:           0x0000009c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000000b4
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000000b4
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000001
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x000000cc
    ACPI Processor ID:              0x00000001
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x000000fc
    Private Resources[1]:           0x00000114

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x0000012c
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x0000012c
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000002
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x00000144
    ACPI Processor ID:              0x00000002
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000174
    Private Resources[1]:           0x0000018c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000001a4
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000001a4
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000003
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x000001bc
    ACPI Processor ID:              0x00000003
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x000001ec
    Private Resources[1]:           0x00000204

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x0000021c
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x0000021c
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000004
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x00000234
    ACPI Processor ID:              0x00000004
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000264
    Private Resources[1]:           0x0000027c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000294
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000294
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000005
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x000002ac
    ACPI Processor ID:              0x00000005
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x000002dc
    Private Resources[1]:           0x000002f4

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x0000030c
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x0000030c
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000006
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x00000324
    ACPI Processor ID:              0x00000006
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000354
    Private Resources[1]:           0x0000036c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000384
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000384
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000007
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x0000039c
    ACPI Processor ID:              0x00000007
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x000003cc
    Private Resources[1]:           0x000003e4

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000003fc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000003fc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000008
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x00000414
    ACPI Processor ID:              0x00000008
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000444
    Private Resources[1]:           0x0000045c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000474
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000474
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x00000009
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x0000048c
    ACPI Processor ID:              0x00000009
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x000004bc
    Private Resources[1]:           0x000004d4

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000004ec
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000004ec
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x0000000a
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x00000504
    ACPI Processor ID:              0x0000000a
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000534
    Private Resources[1]:           0x0000054c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000564
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000564
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x0000000b
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x0000057c
    ACPI Processor ID:              0x0000000b
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x000005ac
    Private Resources[1]:           0x000005c4

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000005dc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000005dc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x0000000c
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x000005f4
    ACPI Processor ID:              0x0000000c
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000624
    Private Resources[1]:           0x0000063c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000654
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000654
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x0000000d
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x0000066c
    ACPI Processor ID:              0x0000000d
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x0000069c
    Private Resources[1]:           0x000006b4

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000006cc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000006cc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x0000000e
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x000006e4
    ACPI Processor ID:              0x0000000e
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x00000714
    Private Resources[1]:           0x0000072c

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000744
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000744
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x14
    Reserved:                       0x0000
    Flags:                          0x00000012
    Parent:                         0x00000024
    ACPI Processor ID:              0x0000000f
    Number of Private Resources:    0x00000000

  Processor hierarchy node structure (Type 0):
    Type:                           0x00
    Length:                         0x1c
    Reserved:                       0x0000
    Flags:                          0x0000000a
    Parent:                         0x0000075c
    ACPI Processor ID:              0x0000000f
    Number of Private Resources:    0x00000002
    Private Resources[0]:           0x0000078c
    Private Resources[1]:           0x000007a4

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000007bc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x02
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x000007bc
    Size:                           0x00010000
    Number of sets:                 0x00000100
    Associativity:                  0x04
    Attributes:                     0x04
    Line size:                      0x0040

  Cache Type Structure (Type 1):
    Type:                           0x01
    Length:                         0x18
    Reserved:                       0x0000
    Flags:                          0x0000007f
    Next Level of Cache:            0x00000000
    Size:                           0x00100000
    Number of sets:                 0x00000800
    Associativity:                  0x08
    Attributes:                     0x0a
    Line size:                      0x0040

PASSED: Test 1, No issues found in PPTT table.

================================================================================
1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

method: ACPI DSDT Method Semantic tests.
--------------------------------------------------------------------------------
FADT Preferred PM profile indicates this is not a Mobile Platform.
Test 1 of 207: Test Method Names.
Found 269 Objects
PASSED: Test 1, Method names contain legal characters.

Test 2 of 207: Test _AEI.
PASSED: Test 2, \_SB_.GPI0._AEI correctly returned a sane looking buffer.

Test 3 of 207: Test _EVT (Event Method).
Failed to find valid handle for _EVT method (0x5), \_SB.GPI0._EVT

Test 4 of 207: Test _DLM (Device Lock Mutex).
SKIPPED: Test 4, Skipping test for non-existent object _DLM.

Test 5 of 207: Test _PIC (Inform AML of Interrupt Model).
SKIPPED: Test 5, Skipping test for non-existent object _PIC.

Test 6 of 207: Test _CID (Compatible ID).
PASSED: Test 6, \_SB_.PCI0._CID returned an integer 0x030ad041 (EISA ID
PNP0A03).
PASSED: Test 6, \_SB_.PCI1._CID returned an integer 0x030ad041 (EISA ID
PNP0A03).
PASSED: Test 6, \_SB_.PCI2._CID returned an integer 0x030ad041 (EISA ID
PNP0A03).
PASSED: Test 6, \_SB_.PCI3._CID returned an integer 0x030ad041 (EISA ID
PNP0A03).
PASSED: Test 6, \_SB_.COM0._CID returned a string 'ARMH0011' as expected.

Test 7 of 207: Test _CLS (Class Code).
SKIPPED: Test 7, Skipping test for non-existent object _CLS.

Test 8 of 207: Test _DDN (DOS Device Name).
SKIPPED: Test 8, Skipping test for non-existent object _DDN.

Test 9 of 207: Test _HID (Hardware ID).
PASSED: Test 9, \_SB_.CL00._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL00.CP00._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL01._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL01.CP01._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL02._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL02.CP02._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL03._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL03.CP03._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL04._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL04.CP04._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL05._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL05.CP05._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL06._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL06.CP06._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL07._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL07.CP07._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL08._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL08.CP08._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL09._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL09.CP09._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL10._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL10.CP10._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL11._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL11.CP11._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL12._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL12.CP12._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL13._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL13.CP13._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL14._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL14.CP14._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.CL15._HID returned a string 'ACPI0010' as expected.
PASSED: Test 9, \_SB_.CL15.CP15._HID returned a string 'ACPI0007' as expected.
PASSED: Test 9, \_SB_.PCI0._HID returned an integer 0x080ad041 (EISA ID
PNP0A08).
PASSED: Test 9, \_SB_.PCI0.RES0._HID returned a string 'PNP0C02' as expected.
PASSED: Test 9, \_SB_.PCI1._HID returned an integer 0x080ad041 (EISA ID
PNP0A08).
PASSED: Test 9, \_SB_.PCI1.RES0._HID returned a string 'PNP0C02' as expected.
PASSED: Test 9, \_SB_.PCI2._HID returned an integer 0x080ad041 (EISA ID
PNP0A08).
PASSED: Test 9, \_SB_.PCI2.RES0._HID returned a string 'PNP0C02' as expected.
PASSED: Test 9, \_SB_.PCI3._HID returned an integer 0x080ad041 (EISA ID
PNP0A08).
PASSED: Test 9, \_SB_.PCI3.RES0._HID returned a string 'PNP0C02' as expected.
PASSED: Test 9, \_SB_.GED0._HID returned a string 'ACPI0013' as expected.
PASSED: Test 9, \_SB_.GPI0._HID returned a string 'ARMH0061' as expected.
PASSED: Test 9, \_SB_.COM0._HID returned a string 'ARMH0011' as expected.
PASSED: Test 9, \_SB_.VR00._HID returned a string 'LNRO0005' as expected.
PASSED: Test 9, \_SB_.VR01._HID returned a string 'LNRO0005' as expected.

Test 10 of 207: Test _HRV (Hardware Revision Number).
SKIPPED: Test 10, Skipping test for non-existent object _HRV.

Test 11 of 207: Test _MLS (Multiple Language String).
SKIPPED: Test 11, Skipping test for non-existent object _MLS.

Test 12 of 207: Test _PLD (Physical Device Location).
SKIPPED: Test 12, Skipping test for non-existent object _PLD.

Test 13 of 207: Test _SUB (Subsystem ID).
SKIPPED: Test 13, Skipping test for non-existent object _SUB.

Test 14 of 207: Test _SUN (Slot User Number).
SKIPPED: Test 14, Skipping test for non-existent object _SUN.

Test 15 of 207: Test _STR (String).
SKIPPED: Test 15, Skipping test for non-existent object _STR.

Test 16 of 207: Test _UID (Unique ID).
PASSED: Test 16, \_SB_.CL00._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.CL00.CP00._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.CL01._UID correctly returned sane looking value
0x00000001.
PASSED: Test 16, \_SB_.CL01.CP01._UID correctly returned sane looking value
0x00000001.
PASSED: Test 16, \_SB_.CL02._UID correctly returned sane looking value
0x00000002.
PASSED: Test 16, \_SB_.CL02.CP02._UID correctly returned sane looking value
0x00000002.
PASSED: Test 16, \_SB_.CL03._UID correctly returned sane looking value
0x00000003.
PASSED: Test 16, \_SB_.CL03.CP03._UID correctly returned sane looking value
0x00000003.
PASSED: Test 16, \_SB_.CL04._UID correctly returned sane looking value
0x00000004.
PASSED: Test 16, \_SB_.CL04.CP04._UID correctly returned sane looking value
0x00000004.
PASSED: Test 16, \_SB_.CL05._UID correctly returned sane looking value
0x00000005.
PASSED: Test 16, \_SB_.CL05.CP05._UID correctly returned sane looking value
0x00000005.
PASSED: Test 16, \_SB_.CL06._UID correctly returned sane looking value
0x00000006.
PASSED: Test 16, \_SB_.CL06.CP06._UID correctly returned sane looking value
0x00000006.
PASSED: Test 16, \_SB_.CL07._UID correctly returned sane looking value
0x00000007.
PASSED: Test 16, \_SB_.CL07.CP07._UID correctly returned sane looking value
0x00000007.
PASSED: Test 16, \_SB_.CL08._UID correctly returned sane looking value
0x00000008.
PASSED: Test 16, \_SB_.CL08.CP08._UID correctly returned sane looking value
0x00000008.
PASSED: Test 16, \_SB_.CL09._UID correctly returned sane looking value
0x00000009.
PASSED: Test 16, \_SB_.CL09.CP09._UID correctly returned sane looking value
0x00000009.
PASSED: Test 16, \_SB_.CL10._UID correctly returned sane looking value
0x0000000a.
PASSED: Test 16, \_SB_.CL10.CP10._UID correctly returned sane looking value
0x0000000a.
PASSED: Test 16, \_SB_.CL11._UID correctly returned sane looking value
0x0000000b.
PASSED: Test 16, \_SB_.CL11.CP11._UID correctly returned sane looking value
0x0000000b.
PASSED: Test 16, \_SB_.CL12._UID correctly returned sane looking value
0x0000000c.
PASSED: Test 16, \_SB_.CL12.CP12._UID correctly returned sane looking value
0x0000000c.
PASSED: Test 16, \_SB_.CL13._UID correctly returned sane looking value
0x0000000d.
PASSED: Test 16, \_SB_.CL13.CP13._UID correctly returned sane looking value
0x0000000d.
PASSED: Test 16, \_SB_.CL14._UID correctly returned sane looking value
0x0000000e.
PASSED: Test 16, \_SB_.CL14.CP14._UID correctly returned sane looking value
0x0000000e.
PASSED: Test 16, \_SB_.CL15._UID correctly returned sane looking value
0x0000000f.
PASSED: Test 16, \_SB_.CL15.CP15._UID correctly returned sane looking value
0x0000000f.
PASSED: Test 16, \_SB_.PCI0._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.PCI1._UID correctly returned sane looking value
0x00000001.
PASSED: Test 16, \_SB_.PCI2._UID correctly returned sane looking value
0x00000002.
PASSED: Test 16, \_SB_.PCI3._UID correctly returned sane looking value
0x00000003.
PASSED: Test 16, \_SB_.GED0._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.GPI0._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.COM0._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.VR00._UID correctly returned sane looking value
0x00000000.
PASSED: Test 16, \_SB_.VR01._UID correctly returned sane looking value
0x00000001.

Test 17 of 207: Test _CDM (Clock Domain).
SKIPPED: Test 17, Skipping test for non-existent object _CDM.

Test 18 of 207: Test _CRS (Current Resource Settings).
PASSED: Test 18, \_SB_.PCI0._CRS (WORD Address Space Descriptor) looks sane.
PASSED: Test 18, \_SB_.PCI0.RES0._CRS (QWORD Address Space Descriptor) looks
sane.
PASSED: Test 18, \_SB_.PCI1._CRS (WORD Address Space Descriptor) looks sane.
PASSED: Test 18, \_SB_.PCI1.RES0._CRS (QWORD Address Space Descriptor) looks
sane.
PASSED: Test 18, \_SB_.PCI2._CRS (WORD Address Space Descriptor) looks sane.
PASSED: Test 18, \_SB_.PCI2.RES0._CRS (QWORD Address Space Descriptor) looks
sane.
PASSED: Test 18, \_SB_.PCI3._CRS (WORD Address Space Descriptor) looks sane.
PASSED: Test 18, \_SB_.PCI3.RES0._CRS (QWORD Address Space Descriptor) looks
sane.
PASSED: Test 18, \_SB_.GED0._CRS (Extended IRQ Descriptor) looks sane.
PASSED: Test 18, \_SB_.GPI0._CRS (32-bit Fixed Location Memory Range Descriptor)
looks sane.
PASSED: Test 18, \_SB_.COM0._CRS (32-bit Fixed Location Memory Range Descriptor)
looks sane.
PASSED: Test 18, \_SB_.VR00._CRS (32-bit Fixed Location Memory Range Descriptor)
looks sane.
PASSED: Test 18, \_SB_.VR01._CRS (32-bit Fixed Location Memory Range Descriptor)
looks sane.

Test 19 of 207: Test _DSD (Device Specific Data).
SKIPPED: Test 19, Skipping test for non-existent object _DSD.

Test 20 of 207: Test _DIS (Disable).
SKIPPED: Test 20, Skipping test for non-existent object _DIS.

Test 21 of 207: Test _DMA (Direct Memory Access).
SKIPPED: Test 21, Skipping test for non-existent object _DMA.

Test 22 of 207: Test _FIX (Fixed Register Resource Provider).
SKIPPED: Test 22, Skipping test for non-existent object _FIX.

Test 23 of 207: Test _GSB (Global System Interrupt Base).
SKIPPED: Test 23, Skipping test for non-existent object _GSB.

Test 24 of 207: Test _HPP (Hot Plug Parameters).
SKIPPED: Test 24, Skipping test for non-existent object _HPP.

Test 25 of 207: Test _MAT (Multiple APIC Table Entry).
SKIPPED: Test 25, Skipping test for non-existent object _MAT.

Test 26 of 207: Test _PRS (Possible Resource Settings).
SKIPPED: Test 26, Skipping test for non-existent object _PRS.

Test 27 of 207: Test _PRT (PCI Routing Table).
SKIPPED: Test 27, Skipping test for non-existent object _PRT.

Test 28 of 207: Test _PXM (Proximity).
SKIPPED: Test 28, Skipping test for non-existent object _PXM.

Test 29 of 207: Test _SLI (System Locality Information).
SKIPPED: Test 29, Skipping test for non-existent object _SLI.

Test 30 of 207: Test _CCA (Cache Coherency Attribute).
PASSED: Test 30, \_SB_.PCI0._CCA correctly returned sane looking value
0x00000001.
PASSED: Test 30, \_SB_.PCI1._CCA correctly returned sane looking value
0x00000001.
PASSED: Test 30, \_SB_.PCI2._CCA correctly returned sane looking value
0x00000001.
PASSED: Test 30, \_SB_.PCI3._CCA correctly returned sane looking value
0x00000001.
PASSED: Test 30, \_SB_.VR00._CCA correctly returned sane looking value
0x00000001.
PASSED: Test 30, \_SB_.VR01._CCA correctly returned sane looking value
0x00000001.

Test 31 of 207: Test _EDL (Eject Device List).
SKIPPED: Test 31, Skipping test for non-existent object _EDL.

Test 32 of 207: Test _EJD (Ejection Dependent Device).
SKIPPED: Test 32, Skipping test for non-existent object _EJD.

Test 33 of 207: Test _EJ0 (Eject).
SKIPPED: Test 33, Skipping test for non-existent object _EJ0.

Test 34 of 207: Test _EJ1 (Eject).
SKIPPED: Test 34, Skipping test for non-existent object _EJ1.

Test 35 of 207: Test _EJ2 (Eject).
SKIPPED: Test 35, Skipping test for non-existent object _EJ2.

Test 36 of 207: Test _EJ3 (Eject).
SKIPPED: Test 36, Skipping test for non-existent object _EJ3.

Test 37 of 207: Test _EJ4 (Eject).
SKIPPED: Test 37, Skipping test for non-existent object _EJ4.

Test 38 of 207: Test _LCK (Lock).
SKIPPED: Test 38, Skipping test for non-existent object _LCK.

Test 39 of 207: Test _RMV (Remove).
SKIPPED: Test 39, Skipping test for non-existent object _RMV.

Test 40 of 207: Test _STA (Status).
PASSED: Test 40, \_SB_.CL00.CP00._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL01.CP01._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL02.CP02._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL03.CP03._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL04.CP04._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL05.CP05._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL06.CP06._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL07.CP07._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL08.CP08._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL09.CP09._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL10.CP10._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL11.CP11._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL12.CP12._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL13.CP13._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL14.CP14._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.CL15.CP15._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.GED0._STA correctly returned sane looking value
0x0000000f.
PASSED: Test 40, \_SB_.COM0._STA correctly returned sane looking value
0x0000000f.

Test 41 of 207: Test _DEP (Operational Region Dependencies).
SKIPPED: Test 41, Skipping test for non-existent object _DEP.

Test 42 of 207: Test _FIT (Firmware Interface Table).
SKIPPED: Test 42, Skipping test for non-existent object _FIT.

Test 43 of 207: Test _BDN (BIOS Dock Name).
SKIPPED: Test 43, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BDN.

Test 44 of 207: Test _BBN (Base Bus Number).
PASSED: Test 44, \_SB_.PCI0._BBN correctly returned an integer.
PASSED: Test 44, \_SB_.PCI1._BBN correctly returned an integer.
PASSED: Test 44, \_SB_.PCI2._BBN correctly returned an integer.
PASSED: Test 44, \_SB_.PCI3._BBN correctly returned an integer.

Test 45 of 207: Test _DCK (Dock).
SKIPPED: Test 45, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _DCK.

Test 46 of 207: Test _INI (Initialize).
SKIPPED: Test 46, Skipping test for non-existent object _INI.

Test 47 of 207: Test _GLK (Global Lock).
SKIPPED: Test 47, Skipping test for non-existent object _GLK.

Test 48 of 207: Test _SEG (Segment).
PASSED: Test 48, \_SB_.PCI0._SEG correctly returned an integer.
PASSED: Test 48, \_SB_.PCI1._SEG correctly returned an integer.
PASSED: Test 48, \_SB_.PCI2._SEG correctly returned an integer.
PASSED: Test 48, \_SB_.PCI3._SEG correctly returned an integer.

Test 49 of 207: Test _LSI (Label Storage Information).
SKIPPED: Test 49, Skipping test for non-existent object _LSI.

Test 50 of 207: Test _CBR (CXL Host Bridge Register).
SKIPPED: Test 50, Skipping test for non-existent object _CBR.

Test 51 of 207: Test _OFF (Set resource off).
SKIPPED: Test 51, Skipping test for non-existent object _OFF.

Test 52 of 207: Test _ON_ (Set resource on).
SKIPPED: Test 52, Skipping test for non-existent object _ON_.

Test 53 of 207: Test _DSW (Device Sleep Wake).
SKIPPED: Test 53, Skipping test for non-existent object _DSW.

Test 54 of 207: Test _IRC (In Rush Current).
SKIPPED: Test 54, Skipping test for non-existent object _IRC.

Test 55 of 207: Test _PRE (Power Resources for Enumeration).
SKIPPED: Test 55, Skipping test for non-existent object _PRE.

Test 56 of 207: Test _PR0 (Power Resources for D0).
SKIPPED: Test 56, Skipping test for non-existent object _PR0.

Test 57 of 207: Test _PR1 (Power Resources for D1).
SKIPPED: Test 57, Skipping test for non-existent object _PR1.

Test 58 of 207: Test _PR2 (Power Resources for D2).
SKIPPED: Test 58, Skipping test for non-existent object _PR2.

Test 59 of 207: Test _PR3 (Power Resources for D3).
SKIPPED: Test 59, Skipping test for non-existent object _PR3.

Test 60 of 207: Test _PRW (Power Resources for Wake).
SKIPPED: Test 60, Skipping test for non-existent object _PRW.

Test 61 of 207: Test _PS0 (Power State 0).
SKIPPED: Test 61, Skipping test for non-existent object _PS0.

Test 62 of 207: Test _PS1 (Power State 1).
SKIPPED: Test 62, Skipping test for non-existent object _PS1.

Test 63 of 207: Test _PS2 (Power State 2).
SKIPPED: Test 63, Skipping test for non-existent object _PS2.

Test 64 of 207: Test _PS3 (Power State 3).
SKIPPED: Test 64, Skipping test for non-existent object _PS3.

Test 65 of 207: Test _PSC (Power State Current).
SKIPPED: Test 65, Skipping test for non-existent object _PSC.

Test 66 of 207: Test _PSE (Power State for Enumeration).
SKIPPED: Test 66, Skipping test for non-existent object _PSE.

Test 67 of 207: Test _PSW (Power State Wake).
SKIPPED: Test 67, Skipping test for non-existent object _PSW.

Test 68 of 207: Test _S1D (S1 Device State).
SKIPPED: Test 68, Skipping test for non-existent object _S1D.

Test 69 of 207: Test _S2D (S2 Device State).
SKIPPED: Test 69, Skipping test for non-existent object _S2D.

Test 70 of 207: Test _S3D (S3 Device State).
SKIPPED: Test 70, Skipping test for non-existent object _S3D.

Test 71 of 207: Test _S4D (S4 Device State).
SKIPPED: Test 71, Skipping test for non-existent object _S4D.

Test 72 of 207: Test _S0W (S0 Device Wake State).
SKIPPED: Test 72, Skipping test for non-existent object _S0W.

Test 73 of 207: Test _S1W (S1 Device Wake State).
SKIPPED: Test 73, Skipping test for non-existent object _S1W.

Test 74 of 207: Test _S2W (S2 Device Wake State).
SKIPPED: Test 74, Skipping test for non-existent object _S2W.

Test 75 of 207: Test _S3W (S3 Device Wake State).
SKIPPED: Test 75, Skipping test for non-existent object _S3W.

Test 76 of 207: Test _S4W (S4 Device Wake State).
SKIPPED: Test 76, Skipping test for non-existent object _S4W.

Test 77 of 207: Test _RST (Device Reset).
SKIPPED: Test 77, Skipping test for non-existent object _RST.

Test 78 of 207: Test _PRR (Power Resource for Reset).
SKIPPED: Test 78, Skipping test for non-existent object _PRR.

Test 79 of 207: Test _S0_ (S0 System State).
SKIPPED: Test 79, Skipping test for non-existent object _S0_.

Test 80 of 207: Test _S1_ (S1 System State).
SKIPPED: Test 80, Skipping test for non-existent object _S1_.

Test 81 of 207: Test _S2_ (S2 System State).
SKIPPED: Test 81, Skipping test for non-existent object _S2_.

Test 82 of 207: Test _S3_ (S3 System State).
SKIPPED: Test 82, Skipping test for non-existent object _S3_.

Test 83 of 207: Test _S4_ (S4 System State).
SKIPPED: Test 83, Skipping test for non-existent object _S4_.

Test 84 of 207: Test _S5_ (S5 System State).
SKIPPED: Test 84, Skipping test for non-existent object _S5_.

Test 85 of 207: Test _SWS (System Wake Source).
SKIPPED: Test 85, Skipping test for non-existent object _SWS.

Test 86 of 207: Test _PSS (Performance Supported States).
SKIPPED: Test 86, Skipping test for non-existent object _PSS.

Test 87 of 207: Test _CPC (Continuous Performance Control).
PASSED: Test 87, \_SB_.CL00.CP00._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL01.CP01._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL02.CP02._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL03.CP03._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL04.CP04._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL05.CP05._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL06.CP06._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL07.CP07._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL08.CP08._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL09.CP09._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL10.CP10._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL11.CP11._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL12.CP12._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL13.CP13._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL14.CP14._CPC correctly returned a sane looking package.
PASSED: Test 87, \_SB_.CL15.CP15._CPC correctly returned a sane looking package.

Test 88 of 207: Test _CSD (C State Dependencies).
SKIPPED: Test 88, Skipping test for non-existent object _CSD.

Test 89 of 207: Test _CST (C States).
SKIPPED: Test 89, Skipping test for non-existent object _CST.

Test 90 of 207: Test _PCT (Performance Control).
SKIPPED: Test 90, Skipping test for non-existent object _PCT.

Test 91 of 207: Test _PDL (P-State Depth Limit).
SKIPPED: Test 91, Skipping test for non-existent object _PDL.

Test 92 of 207: Test _PPC (Performance Present Capabilities).
SKIPPED: Test 92, Skipping test for non-existent object _PPC.

Test 93 of 207: Test _PPE (Polling for Platform Error).
SKIPPED: Test 93, Skipping test for non-existent object _PPE.

Test 94 of 207: Test _PSD (Power State Dependencies).
PASSED: Test 94, \_SB_.CL00.CP00._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL01.CP01._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL02.CP02._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL03.CP03._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL04.CP04._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL05.CP05._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL06.CP06._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL07.CP07._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL08.CP08._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL09.CP09._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL10.CP10._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL11.CP11._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL12.CP12._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL13.CP13._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL14.CP14._PSD correctly returned a sane looking package.
PASSED: Test 94, \_SB_.CL15.CP15._PSD correctly returned a sane looking package.

Test 95 of 207: Test _PTC (Processor Throttling Control).
SKIPPED: Test 95, Skipping test for non-existent object _PTC.

Test 96 of 207: Test _TDL (T-State Depth Limit).
SKIPPED: Test 96, Skipping test for non-existent object _TDL.

Test 97 of 207: Test _TPC (Throttling Present Capabilities).
SKIPPED: Test 97, Skipping test for non-existent object _TPC.

Test 98 of 207: Test _TSD (Throttling State Dependencies).
SKIPPED: Test 98, Skipping test for non-existent object _TSD.

Test 99 of 207: Test _TSS (Throttling Supported States).
SKIPPED: Test 99, Skipping test for non-existent object _TSS.

Test 100 of 207: Test _LPI (Low Power Idle States).
PASSED: Test 100, \_SB_.CL00._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL00.CP00._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL01._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL01.CP01._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL02._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL02.CP02._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL03._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL03.CP03._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL04._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL04.CP04._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL05._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL05.CP05._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL06._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL06.CP06._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL07._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL07.CP07._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL08._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL08.CP08._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL09._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL09.CP09._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL10._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL10.CP10._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL11._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL11.CP11._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL12._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL12.CP12._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL13._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL13.CP13._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL14._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL14.CP14._LPI correctly returned a sane looking
package.
PASSED: Test 100, \_SB_.CL15._LPI correctly returned a sane looking package.
PASSED: Test 100, \_SB_.CL15.CP15._LPI correctly returned a sane looking
package.

Test 101 of 207: Test _RDI (Resource Dependencies for Idle).
SKIPPED: Test 101, Skipping test for non-existent object _RDI.

Test 102 of 207: Test _PUR (Processor Utilization Request).
SKIPPED: Test 102, Skipping test for non-existent object _PUR.

Test 103 of 207: Test _MSG (Message).
SKIPPED: Test 103, Skipping test for non-existent object _MSG.

Test 104 of 207: Test _SST (System Status).
SKIPPED: Test 104, Skipping test for non-existent object _SST.
WARNING: Test 104, _SST method not found. This should be treated as error if the
platform provides user visible status such as LED.

Test 105 of 207: Test _ALC (Ambient Light Colour Chromaticity).
SKIPPED: Test 105, Skipping test for non-existent object _ALC.

Test 106 of 207: Test _ALI (Ambient Light Illuminance).
SKIPPED: Test 106, Skipping test for non-existent object _ALI.

Test 107 of 207: Test _ALT (Ambient Light Temperature).
SKIPPED: Test 107, Skipping test for non-existent object _ALT.

Test 108 of 207: Test _ALP (Ambient Light Polling).
SKIPPED: Test 108, Skipping test for non-existent object _ALP.

Test 109 of 207: Test _ALR (Ambient Light Response).
SKIPPED: Test 109, Skipping test for non-existent object _ALR.

Test 110 of 207: Test _LID (Lid Status).
SKIPPED: Test 110, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _LID.

Test 111 of 207: Test _GTF (Get Task File).
SKIPPED: Test 111, Skipping test for non-existent object _GTF.

Test 112 of 207: Test _GTM (Get Timing Mode).
SKIPPED: Test 112, Skipping test for non-existent object _GTM.

Test 113 of 207: Test _MBM (Memory Bandwidth Monitoring Data).
SKIPPED: Test 113, Skipping test for non-existent object _MBM.

Test 114 of 207: Test _UPC (USB Port Capabilities).
SKIPPED: Test 114, Skipping test for non-existent object _UPC.

Test 115 of 207: Test _UPD (User Presence Detect).
SKIPPED: Test 115, Skipping test for non-existent object _UPD.

Test 116 of 207: Test _UPP (User Presence Polling).
SKIPPED: Test 116, Skipping test for non-existent object _UPP.

Test 117 of 207: Test _GCP (Get Capabilities).
SKIPPED: Test 117, Skipping test for non-existent object _GCP.

Test 118 of 207: Test _GRT (Get Real Time).
SKIPPED: Test 118, Skipping test for non-existent object _GRT.

Test 119 of 207: Test _GWS (Get Wake Status).
SKIPPED: Test 119, Skipping test for non-existent object _GWS.

Test 120 of 207: Test _CWS (Clear Wake Status).
SKIPPED: Test 120, Skipping test for non-existent object _CWS.

Test 121 of 207: Test _SRT (Set Real Time).
SKIPPED: Test 121, Skipping test for non-existent object _SRT.

Test 122 of 207: Test _STP (Set Expired Timer Wake Policy).
SKIPPED: Test 122, Skipping test for non-existent object _STP.

Test 123 of 207: Test _STV (Set Timer Value).
SKIPPED: Test 123, Skipping test for non-existent object _STV.

Test 124 of 207: Test _TIP (Expired Timer Wake Policy).
SKIPPED: Test 124, Skipping test for non-existent object _TIP.

Test 125 of 207: Test _TIV (Timer Values).
SKIPPED: Test 125, Skipping test for non-existent object _TIV.

Test 126 of 207: Test _NBS (NVDIMM Boot Status).
SKIPPED: Test 126, Skipping test for non-existent object _NBS.

Test 127 of 207: Test _NCH (NVDIMM Current Health Information).
SKIPPED: Test 127, Skipping test for non-existent object _NCH.

Test 128 of 207: Test _NIC (NVDIMM Health Error Injection Capabilities).
SKIPPED: Test 128, Skipping test for non-existent object _NIC.

Test 129 of 207: Test _NIH (NVDIMM Inject/Clear Health Errors).
SKIPPED: Test 129, Skipping test for non-existent object _NIH.

Test 130 of 207: Test _NIG (NVDIMM Inject Health Error Status).
SKIPPED: Test 130, Skipping test for non-existent object _NIG.

Test 131 of 207: Test _SBS (Smart Battery Subsystem).
SKIPPED: Test 131, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _SBS.

Test 132 of 207: Test _BCT (Battery Charge Time).
SKIPPED: Test 132, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BCT.

Test 133 of 207: Test _BIF (Battery Information).
SKIPPED: Test 133, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BIF.

Test 134 of 207: Test _BIX (Battery Information Extended).
SKIPPED: Test 134, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BIX.

Test 135 of 207: Test _BMA (Battery Measurement Averaging).
SKIPPED: Test 135, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BMA.

Test 136 of 207: Test _BMC (Battery Maintenance Control).
SKIPPED: Test 136, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BMC.

Test 137 of 207: Test _BMD (Battery Maintenance Data).
SKIPPED: Test 137, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BMD.

Test 138 of 207: Test _BMS (Battery Measurement Sampling Time).
SKIPPED: Test 138, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BMS.

Test 139 of 207: Test _BPC (Battery Power Characteristics).
SKIPPED: Test 139, Skipping test for non-existent object _BPC.

Test 140 of 207: Test _BPS (Battery Power State).
SKIPPED: Test 140, Skipping test for non-existent object _BPS.

Test 141 of 207: Test _BPT (Battery Power Threshold).
SKIPPED: Test 141, Skipping test for non-existent object _BPT.

Test 142 of 207: Test _BST (Battery Status).
SKIPPED: Test 142, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BST.

Test 143 of 207: Test _BTP (Battery Trip Point).
SKIPPED: Test 143, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BTP.

Test 144 of 207: Test _BTH (Battery Throttle Limit).
SKIPPED: Test 144, Skipping test for non-existent object _BTH.

Test 145 of 207: Test _BTM (Battery Time).
SKIPPED: Test 145, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _BTM.

Test 146 of 207: Test _PCL (Power Consumer List).
SKIPPED: Test 146, Machine is not a mobile platform, skipping test for
non-existent mobile platform related object _PCL.

Test 147 of 207: Test _PIF (Power Source Information).
SKIPPED: Test 147, Skipping test for non-existent object _PIF.

Test 148 of 207: Test _PRL (Power Source Redundancy List).
SKIPPED: Test 148, Skipping test for non-existent object _PRL.

Test 149 of 207: Test _PSR (Power Source).
SKIPPED: Test 149, Skipping test for non-existent object _PSR.

Test 150 of 207: Test _GAI (Get Averaging Level).
SKIPPED: Test 150, Skipping test for non-existent object _GAI.

Test 151 of 207: Test _GHL (Get Hardware Limit).
SKIPPED: Test 151, Skipping test for non-existent object _GHL.

Test 152 of 207: Test _PMC (Power Meter Capabilities).
SKIPPED: Test 152, Skipping test for non-existent object _PMC.

Test 153 of 207: Test _PMD (Power Meter Devices).
SKIPPED: Test 153, Skipping test for non-existent object _PMD.

Test 154 of 207: Test _PMM (Power Meter Measurement).
SKIPPED: Test 154, Skipping test for non-existent object _PMM.

Test 155 of 207: Test _WPC (Wireless Power Calibration).
SKIPPED: Test 155, Skipping test for non-existent object _WPC.

Test 156 of 207: Test _WPP (Wireless Power Polling).
SKIPPED: Test 156, Skipping test for non-existent object _WPP.

Test 157 of 207: Test _FIF (Fan Information).
SKIPPED: Test 157, Skipping test for non-existent object _FIF.

Test 158 of 207: Test _FPS (Fan Performance States).
SKIPPED: Test 158, Skipping test for non-existent object _FPS.

Test 159 of 207: Test _FSL (Fan Set Level).
SKIPPED: Test 159, Skipping test for non-existent object _FSL.

Test 160 of 207: Test _FST (Fan Status).
SKIPPED: Test 160, Skipping test for non-existent object _FST.

Test 161 of 207: Test _ACx (Active Cooling).
SKIPPED: Test 161, Skipping test for non-existent object _AC0.

SKIPPED: Test 161, Skipping test for non-existent object _AC1.

SKIPPED: Test 161, Skipping test for non-existent object _AC2.

SKIPPED: Test 161, Skipping test for non-existent object _AC3.

SKIPPED: Test 161, Skipping test for non-existent object _AC4.

SKIPPED: Test 161, Skipping test for non-existent object _AC5.

SKIPPED: Test 161, Skipping test for non-existent object _AC6.

SKIPPED: Test 161, Skipping test for non-existent object _AC7.

SKIPPED: Test 161, Skipping test for non-existent object _AC8.

SKIPPED: Test 161, Skipping test for non-existent object _AC9.


Test 162 of 207: Test _ART (Active Cooling Relationship Table).
SKIPPED: Test 162, Skipping test for non-existent object _ART.

Test 163 of 207: Test _ALx (Active List).
SKIPPED: Test 163, Skipping test for non-existent object _AL0.

SKIPPED: Test 163, Skipping test for non-existent object _AL1.

SKIPPED: Test 163, Skipping test for non-existent object _AL2.

SKIPPED: Test 163, Skipping test for non-existent object _AL3.

SKIPPED: Test 163, Skipping test for non-existent object _AL4.

SKIPPED: Test 163, Skipping test for non-existent object _AL5.

SKIPPED: Test 163, Skipping test for non-existent object _AL6.

SKIPPED: Test 163, Skipping test for non-existent object _AL7.

SKIPPED: Test 163, Skipping test for non-existent object _AL8.

SKIPPED: Test 163, Skipping test for non-existent object _AL9.


Test 164 of 207: Test _CRT (Critical Trip Point).
SKIPPED: Test 164, Skipping test for non-existent object _CRT.

Test 165 of 207: Test _CR3 (Warm/Standby Temperature).
SKIPPED: Test 165, Skipping test for non-existent object _CR3.

Test 166 of 207: Test _DTI (Device Temperature Indication).
SKIPPED: Test 166, Skipping test for non-existent object _DTI.

Test 167 of 207: Test _HOT (Hot Temperature).
SKIPPED: Test 167, Skipping test for non-existent object _HOT.

Test 168 of 207: Test _MTL (Minimum Throttle Limit).
SKIPPED: Test 168, Skipping test for non-existent object _MTL.

Test 169 of 207: Test _NTT (Notification Temp Threshold).
SKIPPED: Test 169, Skipping test for non-existent object _NTT.

Test 170 of 207: Test _PSL (Passive List).
SKIPPED: Test 170, Skipping test for non-existent object _PSL.

Test 171 of 207: Test _PSV (Passive Temp).
SKIPPED: Test 171, Skipping test for non-existent object _PSV.

Test 172 of 207: Test _RTV (Relative Temp Values).
SKIPPED: Test 172, Skipping test for non-existent object _RTV.

Test 173 of 207: Test _SCP (Set Cooling Policy).
SKIPPED: Test 173, Skipping test for non-existent object _DTI.

Test 174 of 207: Test _TC1 (Thermal Constant 1).
SKIPPED: Test 174, Skipping test for non-existent object _TC1.

Test 175 of 207: Test _TC2 (Thermal Constant 2).
SKIPPED: Test 175, Skipping test for non-existent object _TC2.

Test 176 of 207: Test _TFP (Thermal fast Sampling Period).
SKIPPED: Test 176, Skipping test for non-existent object _TFP.

Test 177 of 207: Test _TMP (Thermal Zone Current Temp).
SKIPPED: Test 177, Skipping test for non-existent object _TMP.

Test 178 of 207: Test _TPT (Trip Point Temperature).
SKIPPED: Test 178, Skipping test for non-existent object _TPT.

Test 179 of 207: Test _TRT (Thermal Relationship Table).
SKIPPED: Test 179, Skipping test for non-existent object _TRT.

Test 180 of 207: Test _TSN (Thermal Sensor Device).
SKIPPED: Test 180, Skipping test for non-existent object _TSN.

Test 181 of 207: Test _TSP (Thermal Sampling Period).
SKIPPED: Test 181, Skipping test for non-existent object _TSP.

Test 182 of 207: Test _TST (Temperature Sensor Threshold).
SKIPPED: Test 182, Skipping test for non-existent object _TST.

Test 183 of 207: Test _TZD (Thermal Zone Devices).
SKIPPED: Test 183, Skipping test for non-existent object _TZD.

Test 184 of 207: Test _TZM (Thermal Zone member).
SKIPPED: Test 184, Skipping test for non-existent object _TZM.

Test 185 of 207: Test _TZP (Thermal Zone Polling).
SKIPPED: Test 185, Skipping test for non-existent object _TZP.

Test 186 of 207: Test _GPE (General Purpose Events).
SKIPPED: Test 186, Skipping test for non-existent object _GPE.

Test 187 of 207: Test _EC_ (EC Offset Query).
SKIPPED: Test 187, Skipping test for non-existent object _EC_.

Test 188 of 207: Test _PTS (Prepare to Sleep).

Test 189 of 207: Test _TTS (Transition to State).
SKIPPED: Test 189, Optional control method _TTS does not exist.

Test 190 of 207: Test _WAK (System Wake).

Test 191 of 207: Test _ADR (Return Unique ID for Device).
PASSED: Test 191, \_SB_.PCI0._ADR correctly returned an integer.
PASSED: Test 191, \_SB_.PCI1._ADR correctly returned an integer.
PASSED: Test 191, \_SB_.PCI2._ADR correctly returned an integer.
PASSED: Test 191, \_SB_.PCI3._ADR correctly returned an integer.

Test 192 of 207: Test _BCL (Query List of Brightness Control Levels Supported).
SKIPPED: Test 192, Skipping test for non-existent object _BCL.

Test 193 of 207: Test _BCM (Set Brightness Level).
SKIPPED: Test 193, Skipping test for non-existent object _BCM.

Test 194 of 207: Test _BQC (Brightness Query Current Level).
SKIPPED: Test 194, Skipping test for non-existent object _BQC.

Test 195 of 207: Test _DCS (Return the Status of Output Device).
SKIPPED: Test 195, Skipping test for non-existent object _DCS.

Test 196 of 207: Test _DDC (Return the EDID for this Device).
SKIPPED: Test 196, Skipping test for non-existent object _DDC.

Test 197 of 207: Test _DSS (Device Set State).
SKIPPED: Test 197, Skipping test for non-existent object _DSS.

Test 198 of 207: Test _DGS (Query Graphics State).
SKIPPED: Test 198, Skipping test for non-existent object _DGS.

Test 199 of 207: Test _DOD (Enumerate All Devices Attached to Display Adapter).
SKIPPED: Test 199, Skipping test for non-existent object _DOD.

Test 200 of 207: Test _DOS (Enable/Disable Output Switching).
SKIPPED: Test 200, Skipping test for non-existent object _DOS.

Test 201 of 207: Test _GPD (Get POST Device).
SKIPPED: Test 201, Skipping test for non-existent object _GPD.

Test 202 of 207: Test _ROM (Get ROM Data).
SKIPPED: Test 202, Skipping test for non-existent object _ROM.

Test 203 of 207: Test _SPD (Set POST Device).
SKIPPED: Test 203, Skipping test for non-existent object _SPD.

Test 204 of 207: Test _VPO (Video POST Options).
SKIPPED: Test 204, Skipping test for non-existent object _VPO.

Test 205 of 207: Test _CBA (Configuration Base Address).
SKIPPED: Test 205, Skipping test for non-existent object _CBA.

Test 206 of 207: Test _IFT (IPMI Interface Type).
SKIPPED: Test 206, Skipping test for non-existent object _IFT.

Test 207 of 207: Test _SRV (IPMI Interface Revision).
SKIPPED: Test 207, Skipping test for non-existent object _SRV.

================================================================================
206 passed, 0 failed, 1 warning, 0 aborted, 208 skipped, 0 info only.
================================================================================

mcfg: MCFG PCI Express* memory mapped config space test.
--------------------------------------------------------------------------------
Test 1 of 2: Validate MCFG table.
This test tries to validate the MCFG table by comparing the first 16 bytes in
the MMIO mapped config space with the 'traditional' config space of the first
PCI device (root bridge). The MCFG data is only trusted if it is marked reserved
in the UEFI run-time service memory map

Memory Map Layout
-----------------

MCFG table found, size is 64 bytes (excluding header) (4 entries).
Configuration Entry #0:
  Base Address  : 0x1010000000
  Segment       : 0
  Start bus     : 0
  End bus       : 63
Configuration Entry #1:
  Base Address  : 0x1010000000
  Segment       : 0
  Start bus     : 64
  End bus       : 127
Configuration Entry #2:
  Base Address  : 0x1010000000
  Segment       : 0
  Start bus     : 128
  End bus       : 191
Configuration Entry #3:
  Base Address  : 0x1010000000
  Segment       : 0
  Start bus     : 192
  End bus       : 255
PASSED: Test 1, MCFG MMIO config space is reserved in memory map table.

Test 2 of 2: Validate MCFG PCI config space.
PASSED: Test 2, PCI config space verified.

================================================================================
2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

madt: MADT Multiple APIC Description Table (spec compliant).
--------------------------------------------------------------------------------
Test 1 of 5: MADT checksum test.
PASSED: Test 1, MADT checksum is correct

Test 2 of 5: MADT revision test.
Most recent FADT revision is 6.4.
Most recent MADT revision is 5.
PASSED: Test 2, MADT revision 4 is defined.
PASSED: Test 2, MADT revision 4 is in sync with FADT revision 6.2.

Test 3 of 5: MADT architecture minimum revision test.
PASSED: Test 3, MADT revision 4 meets the minimum needed (3) for the aarch64
architecture.

Test 4 of 5: MADT flags field reserved bits test.
PASSED: Test 4, MADT flags reserved bits are not set.

Test 5 of 5: MADT subtable tests.
PASSED: Test 5, MADT revision 4 is defined.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 0.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 1.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 2.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 3.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 4.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 5.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 6.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 7.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 8.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 9.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 10.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 11.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 12.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 13.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 14.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 11 (GICC CPU Interface) is defined.
PASSED: Test 5, MADT GICC CPU Interface reserved field properly set to zero.
PASSED: Test 5, MADT GICC has matching processor UID 15.
PASSED: Test 5, MADT GICC CPU Interface, flags, bits 3..31 are reserved and
properly set to zero.
PASSED: Test 5, MADT GICC CPU Interface, is using a defined parking protocol
version.
PASSED: Test 5, MADT GICC CPU Interface second reserved field properly set to
zero.
PASSED: Test 5, MADT subtable type 12 (GICD GIC Distributor) is defined.
PASSED: Test 5, MADT GICD GIC Distributor reserved field properly set to zero.
PASSED: Test 5, MADT GICD GIC Distributor system vector base field is properly
set to zero.
PASSED: Test 5, MADT GICD GIC Distributor GIC version field is in 0..4.
PASSED: Test 5, MADT GICD GIC Distributor second reserved field is properly set
to zero.
PASSED: Test 5, MADT subtable type 14 (GICR Redistributor) is defined.
PASSED: Test 5, MADT GICR Redistributor reserved field properly set to zero.
PASSED: Test 5, MADT GICR Redistributor discovery range length of 16777216 > 0.
PASSED: Test 5, MADT subtable type 15 (GIC Interrupt Translation Service (ITS))
is defined.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) first reserved
field is properly set to zero.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) ITS ID 0x0 is
unique as is required.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) second reserved
field is properly set to zero.
PASSED: Test 5, MADT subtable type 15 (GIC Interrupt Translation Service (ITS))
is defined.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) first reserved
field is properly set to zero.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) ITS ID 0x1 is
unique as is required.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) second reserved
field is properly set to zero.
PASSED: Test 5, MADT subtable type 15 (GIC Interrupt Translation Service (ITS))
is defined.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) first reserved
field is properly set to zero.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) ITS ID 0x2 is
unique as is required.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) second reserved
field is properly set to zero.
PASSED: Test 5, MADT subtable type 15 (GIC Interrupt Translation Service (ITS))
is defined.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) first reserved
field is properly set to zero.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) ITS ID 0x3 is
unique as is required.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) second reserved
field is properly set to zero.
PASSED: Test 5, MADT subtable type 15 (GIC Interrupt Translation Service (ITS))
is defined.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) first reserved
field is properly set to zero.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) ITS ID 0x4 is
unique as is required.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) second reserved
field is properly set to zero.
PASSED: Test 5, MADT subtable type 15 (GIC Interrupt Translation Service (ITS))
is defined.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) first reserved
field is properly set to zero.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) ITS ID 0x5 is
unique as is required.
PASSED: Test 5, MADT GIC Interrupt Translation Service (ITS) second reserved
field is properly set to zero.

================================================================================
134 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

gtdt: GTDT Generic Timer Description Table test.
--------------------------------------------------------------------------------
Test 1 of 1: GTDT Generic Timer Description Table test.
PASSED: Test 1, No issues found in GTDT table.

================================================================================
1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

fadt_sbbr: SBBR FADT Fixed ACPI Description Table tests.
--------------------------------------------------------------------------------
Test 1 of 3: FADT Revision Test.
FADT revision: 6.2
PASSED: Test 1, FADT revision is up to date.

Test 2 of 3: FADT Reduced HW Test.
PASSED: Test 2, FADT indicates ACPI is in reduced hardware mode.
PASSED: Test 2, All FADT reduced hardware fields are zero.
PASSED: Test 2, All FADT reduced hardware flags are not set.
PASSED: Test 2, FADT APIC flags are not set in reduced hardware mode.

Test 3 of 3: FADT PSCI Compliant Test.
PASSED: Test 3, PSCI_COMPLIANT is set, PSCI is implemented.

================================================================================
6 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

dbg2: DBG2 (Debug Port Table 2) test.
--------------------------------------------------------------------------------
Test 1 of 2: DBG2 (Debug Port Table 2) test.
DBG2 Table:
  Info Offset:              0x0000002c
  Info Count:               0x00000001

DBG2 Info Structure 0:
  Revision:                 0x00
  Length:                   0x0032
  Number of Registers       0x01
  Namespace String Length:  0x000c
  Namespace String Offset:  0x0026
  OEM Data Length:          0x0000
  OEM Data Offset:          0x0000
  Port Type:                0x8000 (Serial)
  Port Subtype:             0x0003 (ARMPL011 UART)
  Reserved:                 0x0000
  Base Address Offset:      0x0016
  Address Size Offset:      0x0022

  Namespace String:         '\_SB.COM0'
    Address Space ID:       0x00
    Register Bit Width      0x20
    Register Bit Offset     0x00
    Access Size             0x03
    Address                 0x000000000ef70000

PASSED: Test 1, No issues found in DBG2 table.

Test 2 of 2: DBG2 ARM BSA compliant UART test,
PASSED: Test 2, DBG2 provides a standard serial debug port and describes ARM BSA
compliant UART

================================================================================
2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

acpi_sbbr: ACPI table headers sanity tests.
--------------------------------------------------------------------------------
Test 1 of 3: Test that processors only exist in the _SB namespace.
PASSED: Test 1, All processor devices were located in the _SB_ namespace.

Test 2 of 3: Test DSDT and SSDT tables are implemented.
PASSED: Test 2, Table DSDT has valid signature and ID strings.
PASSED: Test 2, Table SSDT has valid signature and ID strings.
PASSED: Test 2, Table SSDT has valid signature and ID strings.
PASSED: Test 2, Table SSDT has valid signature and ID strings.

Test 3 of 3: Check for mandatory and recommended ACPI tables.
PASSED: Test 3, SBBR mandatory ACPI table "RSDP" found.
PASSED: Test 3, SBBR mandatory ACPI table "XSDT" found.
PASSED: Test 3, SBBR mandatory ACPI table "FACP" found.
PASSED: Test 3, SBBR mandatory ACPI table "DSDT" found.
PASSED: Test 3, SBBR mandatory ACPI table "APIC" found.
PASSED: Test 3, SBBR mandatory ACPI table "GTDT" found.
PASSED: Test 3, SBBR mandatory ACPI table "DBG2" found.
PASSED: Test 3, SBBR mandatory ACPI table "SPCR" found.
PASSED: Test 3, SBBR mandatory ACPI table "MCFG" found.
PASSED: Test 3, SBBR mandatory ACPI table "PPTT" found.
PASSED: Test 3, SBBR Recommended ACPI table "IORT" found.
WARNING: Test 3, SBBR Recommended ACPI table "BERT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "EINJ" not found.
WARNING: Test 3, SBBR Recommended ACPI table "ERST" not found.
WARNING: Test 3, SBBR Recommended ACPI table "HEST" not found.
WARNING: Test 3, SBBR Recommended ACPI table "SDEI" not found.
WARNING: Test 3, SBBR Recommended ACPI table "AEST" not found.
WARNING: Test 3, SBBR Recommended ACPI table "SLIT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "SRAT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "HMAT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "PCCT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "PDTT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "NFIT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "BGRT" not found.
WARNING: Test 3, SBBR Recommended ACPI table "SPMI" not found.

================================================================================
16 passed, 0 failed, 14 warnings, 0 aborted, 0 skipped, 0 info only.
================================================================================

acpitables: ACPI table headers sanity tests.
--------------------------------------------------------------------------------
Test 1 of 2: Test ACPI headers.
PASSED: Test 1, Table APIC has valid signature and ID strings.
PASSED: Test 1, Table DBG2 has valid signature and ID strings.
PASSED: Test 1, Table DSDT has valid signature and ID strings.
PASSED: Test 1, Table FACP has valid signature and ID strings.
PASSED: Test 1, Table GTDT has valid signature and ID strings.
PASSED: Test 1, Table IORT has valid signature and ID strings.
PASSED: Test 1, Table MCFG has valid signature and ID strings.
PASSED: Test 1, Table PPTT has valid signature and ID strings.
PASSED: Test 1, Table SPCR has valid signature and ID strings.
PASSED: Test 1, Table SSDT has valid signature and ID strings.
PASSED: Test 1, Table SSDT has valid signature and ID strings.
PASSED: Test 1, Table SSDT has valid signature and ID strings.
PASSED: Test 1, Table RSDT has valid signature and ID strings.
PASSED: Test 1, Table XSDT has valid signature and ID strings.

Test 2 of 2: Test ACPI spec versus table revisions.
System supports ACPI 0620
Table APIC has a matched revision.
Table DSDT has a matched revision.
Table GTDT has a matched revision.
FAILED [MEDIUM] ACPITableBadRevision: Test 2, ACPI Table PPTT revision was
expected to be 1, got 2.
Table SSDT has a matched revision.
Table SSDT has a matched revision.
Table SSDT has a matched revision.
Table RSDT has a matched revision.
Table XSDT has a matched revision.

ADVICE: In "ACPI Table Revision Overview", ASWG suggests "Conforming to a given
ACPI specification means that each and every ACPI-related table conforms to the
version number for that table that is listed in that version of the
specification." Please refer to https://uefi.org/node/4185 for details.


================================================================================
14 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================


466 passed, 1 failed, 16 warnings, 1 aborted, 252 skipped, 0 info only.

Test Failure Summary
================================================================================

Critical failures: NONE

High failures: NONE

Medium failures: 1
 acpitables: ACPI Table PPTT revision was expected to be 1, got 2.

Low failures: NONE

Other failures: NONE

Test           |Pass |Fail |Abort|Warn |Skip |Info |
---------------+-----+-----+-----+-----+-----+-----+
acpi_sbbr      |   16|     |     |   14|     |     |
acpitables     |   14|    1|     |     |     |     |
dbg2           |    2|     |     |     |     |     |
dmicheck       |   31|     |     |     |    9|     |
esrt           |     |     |    1|     |     |     |
fadt_sbbr      |    6|     |     |     |     |     |
gtdt           |    1|     |     |     |     |     |
madt           |  134|     |     |     |     |     |
mcfg           |    2|     |     |     |     |     |
method         |  206|     |     |    1|  208|     |
pptt           |    1|     |     |     |     |     |
rsdp_sbbr      |    1|     |     |     |     |     |
spcr           |    3|     |     |     |     |     |
uefibootpath   |     |     |     |     |    1|     |
uefirtmisc     |    3|     |     |     |   11|     |
uefirttime     |   20|     |     |     |   19|     |
uefirtvariable |   25|     |     |    1|    4|     |
xsdt           |    1|     |     |     |     |     |
---------------+-----+-----+-----+-----+-----+-----+
Total:         |  466|    1|    1|   16|  252|    0|
---------------+-----+-----+-----+-----+-----+-----+
Alex Hung Dec. 15, 2021, 6:45 p.m. UTC | #9
Hi,

I am not familiar with your ACS image but did you try solutions like
https://unix.stackexchange.com/questions/315605/unable-to-cross-compile-openssh-for-arm-zlib-missing
?

On Mon, Dec 13, 2021 at 12:48 AM G Edhaya Chandran <Edhaya.Chandran@arm.com>
wrote:

> Hello Alex,
>
>
>
>    Thank you. The solution does work on our ACS Image.
>
> Attached are the logs.
>
>
>
>
>
> However I did find a build issue for including the .h file:
>
> #include <zlib.h>
>
>
>
> In the Ubuntu installation that I have this file exists in
>
> /usr/include
>
>
>
> When I included this path though -I/usr/include in Makefile.md, it gave
> redefinition errors for other symbols.
>
> So I updated the code to
>
> #include </usr/include/zlib.h>
>
> to complete the build.
>
>
>
> With Warm Regards,
>
> Edhay
>
>
>
>
>
>
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 08 December 2021 04:28
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> Hi Sunny,
>
>
>
> The attached patch also checks /proc/config.gz.
>
>
>
> Please give it a try and let me know whether it works or needs improvement.
>
>
>
> On Thu, Nov 25, 2021 at 10:39 AM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> Here you go.
>
>
>
> Best Regards,
>
> Sunny
>
>
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 25 November 2021 16:39
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
>
>
>
>
> On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> You’re right, Alex.
>
> Edhaya and I just checked this. Our kernel config is in /proc/config.gz.
> Could you add code to handle /proc/config.gz?
>
>
>
> Please share a copy of config.gz for further analysis.
>
> For more information, please check
> https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system
> .
>
>
>
> Best Regards,
>
> Sunny
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 22 November 2021 22:59
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> It is also possible that your ACS uses a different approach for kernel
> config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If
> that's the case, this patch can be improved to include more ways for kernel
> config.
>
>
>
> On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com> wrote:
>
>
>
>
>
> On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> Hi Alex,
>
> Edhaya and I just tested the v2 patch by cherry-picking it into our ACS
> FWTS, and then somehow this fix doesn’t work.
> Does it work on your side? Could you build the FWTS live image with this
> fix and offline share it with us for verification?
>
>
>
> Yes it worked on my RPI4. The attached results.log contains two runs: 1st
> run with patch (runs to completion) and 2nd run without the patch (stopped
> in test 1)
>
>
>
> The fwts-live requires released version of fwts so it's not possible
> without major modifications. If it doesn't work I think the patch may not
> fix but hide the error on my systems. We will have to revisit the bug again.
>
>
>
>
>
>
> Best Regards,
> Sunny
> -----Original Message-----
> From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex
> Hung
> Sent: 22 November 2021 02:15
> To: fwts-devel@lists.ubuntu.com
> Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64
>
> Buglink: https://bugs.launchpad.net/bugs/1947786
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c   | 14 +++++++
>  src/lib/include/fwts.h        |  1 +
>  src/lib/include/fwts_kernel.h | 25 ++++++++++++
>  src/lib/src/Makefile.am       |  1 +
>  src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
>  5 files changed, 115 insertions(+)
>  create mode 100644 src/lib/include/fwts_kernel.h
>  create mode 100644 src/lib/src/fwts_kernel.c
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 7f6a90c4..3985b126 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw,
> fwts_smbios_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS table in memory
> for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> @@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw,
> fwts_smbios30_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS3 table in
> memory for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
> index 551a4e09..be754a99 100644
> --- a/src/lib/include/fwts.h
> +++ b/src/lib/include/fwts.h
> @@ -185,6 +185,7 @@
>  #include "fwts_iasl.h"
>  #include "fwts_ipmi.h"
>  #include "fwts_klog.h"
> +#include "fwts_kernel.h"
>  #include "fwts_olog.h"
>  #include "fwts_pipeio.h"
>  #include "fwts_stringextras.h"
> diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
> new file mode 100644
> index 00000000..a89576ae
> --- /dev/null
> +++ b/src/lib/include/fwts_kernel.h
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#ifndef __FWTS_KERNEL_H__
> +#define __FWTS_KERNEL_H__
> +
> +bool fwts_kernel_config_set(const char *config);
> +
> +#endif
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 55c52b41..0a39882a 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
>         fwts_ioport.c           \
>         fwts_ipmi.c             \
>         fwts_json.c             \
> +       fwts_kernel.c           \
>         fwts_keymap.c           \
>         fwts_klog.c             \
>         fwts_olog.c             \
> diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
> new file mode 100644
> index 00000000..10d11a99
> --- /dev/null
> +++ b/src/lib/src/fwts_kernel.c
> @@ -0,0 +1,74 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#include <sys/utsname.h>
> +
> +#include "fwts.h"
> +#include "fwts_kernel.h"
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <bsd/string.h>
> +
> +#define CONFIG_FILE_PREFIX     "/boot/config-"
> +
> +/*
> + *  fwts_kernel_config_set
> + *      check whether a kernel config is set, ex.
> + *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
> + */
> +bool fwts_kernel_config_set(const char *config)
> +{
> +       const size_t config_str_len = strlen(config) + 3;
> +       char config_file[PATH_MAX];
> +       char config_str[255];
> +       size_t config_file_len;
> +       fwts_list* config_list;
> +       fwts_list_link *item;
> +       struct utsname buf;
> +
> +       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
> +       uname(&buf);
> +       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release)
> + 1;
> +       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
> +       (void)strlcat(config_file, buf.release, config_file_len);
> +
> +       config_list = fwts_file_open_and_read(config_file);
> +       if (config_list == NULL)
> +               return false;
> +
> +       fwts_list_foreach(item, config_list) {
> +               /* check built-in, i.e. =y */
> +               (void)strlcpy(config_str, config, config_str_len);
> +               (void)strlcat(config_str, "=y", config_str_len);
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +
> +               /* check module, i.e. =m */
> +               config_str[strlen(config_str) - 1] = 'm';
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +       }
> +
> +       fwts_list_free(config_list, free);
> +       return false;
> +}
> --
> 2.32.0
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
>
>
> --
>
> Cheers,
> Alex Hung
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
G Edhaya Chandran Dec. 16, 2021, 8:36 a.m. UTC | #10
Hi Alex,

    There is no dependency on ACS image, but on ubuntu build env.

I already tried the solution  https://unix.stackexchange.com/questions/315605/unable-to-cross-compile-openssh-for-arm-zlib-missing.
The package was already installed in my env.  However the zlib.h was present in /usr/include
Probably this is different in the other Linux distros.

I am not sure of the relevance but the .Po files in the package alse has this path
src/acpi/battery/.deps/fwts-battery.Po: ../src/lib/include/fwts_fileio.h /usr/include/zlib.h \
src/acpi/battery/.deps/fwts-battery.Po:/usr/include/zlib.h:
src/acpi/crsdump/.deps/fwts-prsdump.Po: ../src/lib/include/fwts_fileio.h /usr/include/zlib.h \
src/acpi/crsdump/.deps/fwts-prsdump.Po:/usr/include/zlib.h:

With Warm Regards,
Edhay


From: Alex Hung <alex.hung@canonical.com>
Sent: 16 December 2021 00:15
To: G Edhaya Chandran <Edhaya.Chandran@arm.com>
Cc: Sunny Wang <Sunny.Wang@arm.com>; fwts-devel@lists.ubuntu.com
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Hi,

I am not familiar with your ACS image but did you try solutions like https://unix.stackexchange.com/questions/315605/unable-to-cross-compile-openssh-for-arm-zlib-missing?

On Mon, Dec 13, 2021 at 12:48 AM G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>> wrote:
Hello Alex,

   Thank you. The solution does work on our ACS Image.
Attached are the logs.


However I did find a build issue for including the .h file:
#include <zlib.h>

In the Ubuntu installation that I have this file exists in
/usr/include

When I included this path though -I/usr/include in Makefile.md, it gave redefinition errors for other symbols.
So I updated the code to
#include </usr/include/zlib.h>
to complete the build.

With Warm Regards,
Edhay



From: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
Sent: 08 December 2021 04:28
To: Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>>
Cc: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Hi Sunny,

The attached patch also checks /proc/config.gz.

Please give it a try and let me know whether it works or needs improvement.

On Thu, Nov 25, 2021 at 10:39 AM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
Here you go.

Best Regards,
Sunny

From: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
Sent: 25 November 2021 16:39
To: Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>>
Cc: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64



On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
You’re right, Alex.
Edhaya and I just checked this. Our kernel config is in /proc/config.gz. Could you add code to handle /proc/config.gz?

Please share a copy of config.gz for further analysis.
For more information, please check https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system.

Best Regards,
Sunny
From: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
Sent: 22 November 2021 22:59
To: Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>>
Cc: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com<mailto:Edhaya.Chandran@arm.com>>
Subject: Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

It is also possible that your ACS uses a different approach for kernel config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If that's the case, this patch can be improved to include more ways for kernel config.

On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>> wrote:


On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com<mailto:Sunny.Wang@arm.com>> wrote:
Hi Alex,

Edhaya and I just tested the v2 patch by cherry-picking it into our ACS FWTS, and then somehow this fix doesn’t work.
Does it work on your side? Could you build the FWTS live image with this fix and offline share it with us for verification?

Yes it worked on my RPI4. The attached results.log contains two runs: 1st run with patch (runs to completion) and 2nd run without the patch (stopped in test 1)

The fwts-live requires released version of fwts so it's not possible without major modifications. If it doesn't work I think the patch may not fix but hide the error on my systems. We will have to revisit the bug again.



Best Regards,
Sunny
-----Original Message-----
From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com<mailto:fwts-devel-bounces@lists.ubuntu.com>> On Behalf Of Alex Hung
Sent: 22 November 2021 02:15
To: fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64

Buglink: https://bugs.launchpad.net/bugs/1947786

Signed-off-by: Alex Hung <alex.hung@canonical.com<mailto:alex.hung@canonical.com>>
---
 src/dmi/dmicheck/dmicheck.c   | 14 +++++++
 src/lib/include/fwts.h        |  1 +
 src/lib/include/fwts_kernel.h | 25 ++++++++++++
 src/lib/src/Makefile.am       |  1 +
 src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 src/lib/include/fwts_kernel.h
 create mode 100644 src/lib/src/fwts_kernel.c

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 7f6a90c4..3985b126 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw, fwts_smbios_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
@@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
                free(table);
        }

+#ifdef FWTS_ARCH_AARCH64
+       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+               fwts_warning(fw, "Skipping scanning SMBIOS3 table in memory for arm64 systems");
+               return NULL;
+       }
+#endif
+
        mem = fwts_mmap(addr, length);
        if (mem != FWTS_MAP_FAILED) {
                /* Can we safely copy the table? */
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 551a4e09..be754a99 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -185,6 +185,7 @@
 #include "fwts_iasl.h"
 #include "fwts_ipmi.h"
 #include "fwts_klog.h"
+#include "fwts_kernel.h"
 #include "fwts_olog.h"
 #include "fwts_pipeio.h"
 #include "fwts_stringextras.h"
diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
new file mode 100644
index 00000000..a89576ae
--- /dev/null
+++ b/src/lib/include/fwts_kernel.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_KERNEL_H__
+#define __FWTS_KERNEL_H__
+
+bool fwts_kernel_config_set(const char *config);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 55c52b41..0a39882a 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
        fwts_ioport.c           \
        fwts_ipmi.c             \
        fwts_json.c             \
+       fwts_kernel.c           \
        fwts_keymap.c           \
        fwts_klog.c             \
        fwts_olog.c             \
diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
new file mode 100644
index 00000000..10d11a99
--- /dev/null
+++ b/src/lib/src/fwts_kernel.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <sys/utsname.h>
+
+#include "fwts.h"
+#include "fwts_kernel.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <bsd/string.h>
+
+#define CONFIG_FILE_PREFIX     "/boot/config-"
+
+/*
+ *  fwts_kernel_config_set
+ *      check whether a kernel config is set, ex.
+ *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
+ */
+bool fwts_kernel_config_set(const char *config)
+{
+       const size_t config_str_len = strlen(config) + 3;
+       char config_file[PATH_MAX];
+       char config_str[255];
+       size_t config_file_len;
+       fwts_list* config_list;
+       fwts_list_link *item;
+       struct utsname buf;
+
+       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
+       uname(&buf);
+       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release) + 1;
+       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
+       (void)strlcat(config_file, buf.release, config_file_len);
+
+       config_list = fwts_file_open_and_read(config_file);
+       if (config_list == NULL)
+               return false;
+
+       fwts_list_foreach(item, config_list) {
+               /* check built-in, i.e. =y */
+               (void)strlcpy(config_str, config, config_str_len);
+               (void)strlcat(config_str, "=y", config_str_len);
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+
+               /* check module, i.e. =m */
+               config_str[strlen(config_str) - 1] = 'm';
+               if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+                       fwts_list_free(config_list, free);
+                       return true;
+               }
+       }
+
+       fwts_list_free(config_list, free);
+       return false;
+}
--
2.32.0


--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com<mailto:fwts-devel@lists.ubuntu.com>
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
Cheers,
Alex Hung
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Alex Hung Dec. 16, 2021, 3:57 p.m. UTC | #11
On Thu, Dec 16, 2021 at 1:36 AM G Edhaya Chandran <Edhaya.Chandran@arm.com>
wrote:

> Hi Alex,
>
>
>
>     There is no dependency on ACS image, but on *ubuntu* build env.
>

I don't observe the build errors on my local system and not on PPA.

Could you please share more about your build env? I will try to reproduce
it and see how this can be fixed.



>
>
> I already tried the solution
> https://unix.stackexchange.com/questions/315605/unable-to-cross-compile-openssh-for-arm-zlib-missing
> .
>
> The package was already installed in my env.  However the zlib.h was
> present in /usr/include
>
> Probably this is different in the other Linux distros.
>
>
>
> I am not sure of the relevance but the .Po files in the package alse has
> this path
>
> src/acpi/battery/.deps/fwts-battery.Po: ../src/lib/include/fwts_fileio.h */usr/include/zlib.h
> *\
>
> src/acpi/battery/.deps/fwts-battery.Po:/usr/include/zlib.h:
>
> src/acpi/crsdump/.deps/fwts-prsdump.Po: ../src/lib/include/fwts_fileio.h
> /usr/include/zlib.h \
>
> src/acpi/crsdump/.deps/fwts-prsdump.Po:/usr/include/zlib.h:
>
>
>
> With Warm Regards,
> Edhay
>
>
>
>
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 16 December 2021 00:15
> *To:* G Edhaya Chandran <Edhaya.Chandran@arm.com>
> *Cc:* Sunny Wang <Sunny.Wang@arm.com>; fwts-devel@lists.ubuntu.com
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> Hi,
>
>
>
> I am not familiar with your ACS image but did you try solutions like
> https://unix.stackexchange.com/questions/315605/unable-to-cross-compile-openssh-for-arm-zlib-missing
> ?
>
>
>
> On Mon, Dec 13, 2021 at 12:48 AM G Edhaya Chandran <
> Edhaya.Chandran@arm.com> wrote:
>
> Hello Alex,
>
>
>
>    Thank you. The solution does work on our ACS Image.
>
> Attached are the logs.
>
>
>
>
>
> However I did find a build issue for including the .h file:
>
> #include <zlib.h>
>
>
>
> In the Ubuntu installation that I have this file exists in
>
> /usr/include
>
>
>
> When I included this path though -I/usr/include in Makefile.md, it gave
> redefinition errors for other symbols.
>
> So I updated the code to
>
> #include </usr/include/zlib.h>
>
> to complete the build.
>
>
>
> With Warm Regards,
>
> Edhay
>
>
>
>
>
>
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 08 December 2021 04:28
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> Hi Sunny,
>
>
>
> The attached patch also checks /proc/config.gz.
>
>
>
> Please give it a try and let me know whether it works or needs improvement.
>
>
>
> On Thu, Nov 25, 2021 at 10:39 AM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> Here you go.
>
>
>
> Best Regards,
>
> Sunny
>
>
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 25 November 2021 16:39
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
>
>
>
>
> On Tue, Nov 23, 2021 at 4:18 AM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> You’re right, Alex.
>
> Edhaya and I just checked this. Our kernel config is in /proc/config.gz.
> Could you add code to handle /proc/config.gz?
>
>
>
> Please share a copy of config.gz for further analysis.
>
> For more information, please check
> https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system
> .
>
>
>
> Best Regards,
>
> Sunny
>
> *From:* Alex Hung <alex.hung@canonical.com>
> *Sent:* 22 November 2021 22:59
> *To:* Sunny Wang <Sunny.Wang@arm.com>
> *Cc:* fwts-devel@lists.ubuntu.com; G Edhaya Chandran <
> Edhaya.Chandran@arm.com>
> *Subject:* Re: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on
> aarch64
>
>
>
> It is also possible that your ACS uses a different approach for kernel
> config, i.e. not /boot/config-`uname -r` like Ubuntu and fwts-live. If
> that's the case, this patch can be improved to include more ways for kernel
> config.
>
>
>
> On Mon, Nov 22, 2021 at 3:46 PM Alex Hung <alex.hung@canonical.com> wrote:
>
>
>
>
>
> On Mon, Nov 22, 2021 at 2:44 PM Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> Hi Alex,
>
> Edhaya and I just tested the v2 patch by cherry-picking it into our ACS
> FWTS, and then somehow this fix doesn’t work.
> Does it work on your side? Could you build the FWTS live image with this
> fix and offline share it with us for verification?
>
>
>
> Yes it worked on my RPI4. The attached results.log contains two runs: 1st
> run with patch (runs to completion) and 2nd run without the patch (stopped
> in test 1)
>
>
>
> The fwts-live requires released version of fwts so it's not possible
> without major modifications. If it doesn't work I think the patch may not
> fix but hide the error on my systems. We will have to revisit the bug again.
>
>
>
>
>
>
> Best Regards,
> Sunny
> -----Original Message-----
> From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Alex
> Hung
> Sent: 22 November 2021 02:15
> To: fwts-devel@lists.ubuntu.com
> Subject: [PATCH][V3] dmicheck: skip scanning smbios in /dev/mem on aarch64
>
> Buglink: https://bugs.launchpad.net/bugs/1947786
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c   | 14 +++++++
>  src/lib/include/fwts.h        |  1 +
>  src/lib/include/fwts_kernel.h | 25 ++++++++++++
>  src/lib/src/Makefile.am       |  1 +
>  src/lib/src/fwts_kernel.c     | 74 +++++++++++++++++++++++++++++++++++
>  5 files changed, 115 insertions(+)
>  create mode 100644 src/lib/include/fwts_kernel.h
>  create mode 100644 src/lib/src/fwts_kernel.c
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 7f6a90c4..3985b126 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -381,6 +381,13 @@ static void* dmi_table_smbios(fwts_framework *fw,
> fwts_smbios_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS table in memory
> for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> @@ -429,6 +436,13 @@ static void* dmi_table_smbios30(fwts_framework *fw,
> fwts_smbios30_entry *entry)
>                 free(table);
>         }
>
> +#ifdef FWTS_ARCH_AARCH64
> +       if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
> +               fwts_warning(fw, "Skipping scanning SMBIOS3 table in
> memory for arm64 systems");
> +               return NULL;
> +       }
> +#endif
> +
>         mem = fwts_mmap(addr, length);
>         if (mem != FWTS_MAP_FAILED) {
>                 /* Can we safely copy the table? */
> diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
> index 551a4e09..be754a99 100644
> --- a/src/lib/include/fwts.h
> +++ b/src/lib/include/fwts.h
> @@ -185,6 +185,7 @@
>  #include "fwts_iasl.h"
>  #include "fwts_ipmi.h"
>  #include "fwts_klog.h"
> +#include "fwts_kernel.h"
>  #include "fwts_olog.h"
>  #include "fwts_pipeio.h"
>  #include "fwts_stringextras.h"
> diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
> new file mode 100644
> index 00000000..a89576ae
> --- /dev/null
> +++ b/src/lib/include/fwts_kernel.h
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#ifndef __FWTS_KERNEL_H__
> +#define __FWTS_KERNEL_H__
> +
> +bool fwts_kernel_config_set(const char *config);
> +
> +#endif
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 55c52b41..0a39882a 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -83,6 +83,7 @@ libfwts_la_SOURCES =          \
>         fwts_ioport.c           \
>         fwts_ipmi.c             \
>         fwts_json.c             \
> +       fwts_kernel.c           \
>         fwts_keymap.c           \
>         fwts_klog.c             \
>         fwts_olog.c             \
> diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
> new file mode 100644
> index 00000000..10d11a99
> --- /dev/null
> +++ b/src/lib/src/fwts_kernel.c
> @@ -0,0 +1,74 @@
> +/*
> + * Copyright (C) 2021 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
> + *
> + */
> +
> +#include <sys/utsname.h>
> +
> +#include "fwts.h"
> +#include "fwts_kernel.h"
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <bsd/string.h>
> +
> +#define CONFIG_FILE_PREFIX     "/boot/config-"
> +
> +/*
> + *  fwts_kernel_config_set
> + *      check whether a kernel config is set, ex.
> + *      true if CONFIG_XYZ=y or CONFIG_XYZ=m
> + */
> +bool fwts_kernel_config_set(const char *config)
> +{
> +       const size_t config_str_len = strlen(config) + 3;
> +       char config_file[PATH_MAX];
> +       char config_str[255];
> +       size_t config_file_len;
> +       fwts_list* config_list;
> +       fwts_list_link *item;
> +       struct utsname buf;
> +
> +       /* get path of config file, i.e. /boot/config-5.11.0-38-generic */
> +       uname(&buf);
> +       config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release)
> + 1;
> +       (void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
> +       (void)strlcat(config_file, buf.release, config_file_len);
> +
> +       config_list = fwts_file_open_and_read(config_file);
> +       if (config_list == NULL)
> +               return false;
> +
> +       fwts_list_foreach(item, config_list) {
> +               /* check built-in, i.e. =y */
> +               (void)strlcpy(config_str, config, config_str_len);
> +               (void)strlcat(config_str, "=y", config_str_len);
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +
> +               /* check module, i.e. =m */
> +               config_str[strlen(config_str) - 1] = 'm';
> +               if (!strncmp(fwts_text_list_text(item), config_str,
> strlen(config_str))) {
> +                       fwts_list_free(config_list, free);
> +                       return true;
> +               }
> +       }
> +
> +       fwts_list_free(config_list, free);
> +       return false;
> +}
> --
> 2.32.0
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
>
>
> --
>
> Cheers,
> Alex Hung
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
>
>
> --
>
> Cheers,
> Alex Hung
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
diff mbox series

Patch

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 7f6a90c4..3985b126 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -381,6 +381,13 @@  static void* dmi_table_smbios(fwts_framework *fw, fwts_smbios_entry *entry)
 		free(table);
 	}
 
+#ifdef FWTS_ARCH_AARCH64
+	if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+		fwts_warning(fw, "Skipping scanning SMBIOS table in memory for arm64 systems");
+		return NULL;
+	}
+#endif
+
 	mem = fwts_mmap(addr, length);
 	if (mem != FWTS_MAP_FAILED) {
 		/* Can we safely copy the table? */
@@ -429,6 +436,13 @@  static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
 		free(table);
 	}
 
+#ifdef FWTS_ARCH_AARCH64
+	if (fwts_kernel_config_set("CONFIG_STRICT_DEVMEM")) {
+		fwts_warning(fw, "Skipping scanning SMBIOS3 table in memory for arm64 systems");
+		return NULL;
+	}
+#endif
+
 	mem = fwts_mmap(addr, length);
 	if (mem != FWTS_MAP_FAILED) {
 		/* Can we safely copy the table? */
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 551a4e09..be754a99 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -185,6 +185,7 @@ 
 #include "fwts_iasl.h"
 #include "fwts_ipmi.h"
 #include "fwts_klog.h"
+#include "fwts_kernel.h"
 #include "fwts_olog.h"
 #include "fwts_pipeio.h"
 #include "fwts_stringextras.h"
diff --git a/src/lib/include/fwts_kernel.h b/src/lib/include/fwts_kernel.h
new file mode 100644
index 00000000..a89576ae
--- /dev/null
+++ b/src/lib/include/fwts_kernel.h
@@ -0,0 +1,25 @@ 
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_KERNEL_H__
+#define __FWTS_KERNEL_H__
+
+bool fwts_kernel_config_set(const char *config);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 55c52b41..0a39882a 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -83,6 +83,7 @@  libfwts_la_SOURCES = 		\
 	fwts_ioport.c		\
 	fwts_ipmi.c		\
 	fwts_json.c		\
+	fwts_kernel.c 		\
 	fwts_keymap.c 		\
 	fwts_klog.c 		\
 	fwts_olog.c		\
diff --git a/src/lib/src/fwts_kernel.c b/src/lib/src/fwts_kernel.c
new file mode 100644
index 00000000..10d11a99
--- /dev/null
+++ b/src/lib/src/fwts_kernel.c
@@ -0,0 +1,74 @@ 
+/*
+ * Copyright (C) 2021 Canonical
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <sys/utsname.h>
+
+#include "fwts.h"
+#include "fwts_kernel.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <bsd/string.h>
+
+#define CONFIG_FILE_PREFIX	"/boot/config-"
+
+/*
+ *  fwts_kernel_config_set
+ *	 check whether a kernel config is set, ex.
+ *	 true if CONFIG_XYZ=y or CONFIG_XYZ=m
+ */
+bool fwts_kernel_config_set(const char *config)
+{
+	const size_t config_str_len = strlen(config) + 3;
+	char config_file[PATH_MAX];
+	char config_str[255];
+	size_t config_file_len;
+	fwts_list* config_list;
+	fwts_list_link *item;
+	struct utsname buf;
+
+	/* get path of config file, i.e. /boot/config-5.11.0-38-generic */
+	uname(&buf);
+	config_file_len = strlen(CONFIG_FILE_PREFIX) + strlen(buf.release) + 1;
+	(void)strlcpy(config_file, CONFIG_FILE_PREFIX, config_file_len);
+	(void)strlcat(config_file, buf.release, config_file_len);
+
+	config_list = fwts_file_open_and_read(config_file);
+	if (config_list == NULL)
+		return false;
+
+	fwts_list_foreach(item, config_list) {
+		/* check built-in, i.e. =y */
+		(void)strlcpy(config_str, config, config_str_len);
+		(void)strlcat(config_str, "=y", config_str_len);
+		if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+			fwts_list_free(config_list, free);
+			return true;
+		}
+
+		/* check module, i.e. =m */
+		config_str[strlen(config_str) - 1] = 'm';
+		if (!strncmp(fwts_text_list_text(item), config_str, strlen(config_str))) {
+			fwts_list_free(config_list, free);
+			return true;
+		}
+	}
+
+	fwts_list_free(config_list, free);
+	return false;
+}