[prev in list] [next in list] [prev in thread] [next in thread]
List: fwts-devel
Subject: ACK: [PATCH] acpi: nfit: check fields equals 0 for Virtual CD and Disk
From: ivanhu <ivan.hu () canonical ! com>
Date: 2016-09-07 1:50:29
Message-ID: 81775479-5dbe-4d5b-f3d1-4172b00cfa84 () canonical ! com
[Download RAW message or body]
On 2016年09月05日 17:35, Alex Hung wrote:
> According to ACPI spec, the following fields shall be set to 0
> if GUID is for Virtual CD and Disk: Proximity Domain, SPA Range
> Structure Index, Flags, and Address Range Memory Mapping Attribute
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
> src/acpi/nfit/nfit.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/src/acpi/nfit/nfit.c b/src/acpi/nfit/nfit.c
> index b9b5d86..6043114 100644
> --- a/src/acpi/nfit/nfit.c
> +++ b/src/acpi/nfit/nfit.c
> @@ -126,6 +126,48 @@ static int nfit_test1(fwts_framework *fw)
> "NFIT SPA Range Structure Index must not be zero");
> }
>
> + if (guid_skip) {
> + if (nfit_struct->range_index != 0) {
> + passed = false;
> + fwts_failed(fw, LOG_LEVEL_HIGH,
> + "NFITBadRangeIndexNonZero",
> + "NFIT SPA Range Structure Index must "
> + "be zero when region is Virtual CD or "
> + "Virtual Disk, got 0x%4.4" PRIx32 " instead",
> + nfit_struct->range_index);
> + }
> +
> + if (nfit_struct->flags != 0) {
> + passed = false;
> + fwts_failed(fw, LOG_LEVEL_HIGH,
> + "NFITBadFlagsNonZero",
> + "NFIT Flags must be zero when "
> + "region is Virtual CD or Virtual Disk, got "
> + "0x%4.4" PRIx32 " instead",
> + nfit_struct->flags);
> + }
> +
> + if (nfit_struct->proximity_domain != 0) {
> + passed = false;
> + fwts_failed(fw, LOG_LEVEL_HIGH,
> + "NFITBadProximityDomainNonZero",
> + "NFIT Proximity Domain must be zero when "
> + "region is Virtual CD or Virtual Disk, got "
> + "0x%8.8" PRIx32 " instead",
> + nfit_struct->proximity_domain);
> + }
> +
> + if (nfit_struct->memory_mapping != 0) {
> + passed = false;
> + fwts_failed(fw, LOG_LEVEL_HIGH,
> + "NFITBadMemoryAttributeNonZero",
> + "NFIT Address Range Memory Mapping Attribute "
> + "must be zero when region is Virtual CD or "
> + "Virtual Disk, got 0x%16.16" PRIx64 " instead",
> + nfit_struct->memory_mapping);
> + }
> + }
> +
> if (nfit_struct->flags & ~0x03) {
> passed = false;
> fwts_failed(fw, LOG_LEVEL_HIGH,
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic