diff mbox series

[ACPICA] IORT: Fix HTTU Override mask for the SMMUv3 subtable

Message ID 20210225112620.1827-1-yuzenghui@huawei.com
State New
Headers show
Series [ACPICA] IORT: Fix HTTU Override mask for the SMMUv3 subtable | expand

Commit Message

Zenghui Yu Feb. 25, 2021, 11:26 a.m. UTC
As per the IORT spec, this field overrides the value in SMMU_IRD0.HTTU
which should always have been 2 bits.

Fixes: 9f7c3e148f44 ("IORT: Add in support for the SMMUv3 subtable")
Reported-by: Kunkun Jiang <jiangkunkun@huawei.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 source/common/dmtbinfo2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Moore, Robert Feb. 26, 2021, 3:12 p.m. UTC | #1
Yes, you are correct. ACPI_DMT_FLAGS1 Will pick up two bits at bit [2:1]
Sorry for the noise,
Bob


-----Original Message-----
From: Zenghui Yu <yuzenghui@huawei.com> 

Sent: Thursday, February 25, 2021 5:59 PM
To: Moore, Robert <robert.moore@intel.com>; devel@acpica.org; linux-acpi@vger.kernel.org
Cc: Kaneda, Erik <erik.kaneda@intel.com>; robin.murphy@arm.com; Wysocki, Rafael J <rafael.j.wysocki@intel.com>; guohanjun@huawei.com; wanghaibin.wang@huawei.com; Kunkun Jiang <jiangkunkun@huawei.com>
Subject: Re: [PATCH] [ACPICA] IORT: Fix HTTU Override mask for the SMMUv3 subtable

On 2021/2/26 4:45, Moore, Robert wrote:
> If the field is two bits, I think the ACPI_DMT_* symbol should be ACPI_DMT_FLAGS2, not ACPI_DMT_FLAGS1


The SMMUv3 flags is decoded as:

- bit[0]	"COHACC Override"
- bit[2:1]	"HTTU Override"
- bit[3]	"Proximity Domain Valid"
- bit[31:4]	"Reserved"

whilst ACPI_DMT_FLAGS2 will extract bit[3:2] for us, right?

> -----Original Message-----

> From: Zenghui Yu <yuzenghui@huawei.com>

> Sent: Thursday, February 25, 2021 3:26 AM

> To: devel@acpica.org; linux-acpi@vger.kernel.org

> Cc: Moore, Robert <robert.moore@intel.com>; Kaneda, Erik <erik.kaneda@intel.com>; robin.murphy@arm.com; Wysocki, Rafael J <rafael.j.wysocki@intel.com>; guohanjun@huawei.com; wanghaibin.wang@huawei.com; Zenghui Yu <yuzenghui@huawei.com>; Kunkun Jiang <jiangkunkun@huawei.com>

> Subject: [PATCH] [ACPICA] IORT: Fix HTTU Override mask for the SMMUv3 subtable

> 

> As per the IORT spec, this field overrides the value in SMMU_IRD0.HTTU which should always have been 2 bits.

> 

> Fixes: 9f7c3e148f44 ("IORT: Add in support for the SMMUv3 subtable")

> Reported-by: Kunkun Jiang <jiangkunkun@huawei.com>

> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>

> ---

>   source/common/dmtbinfo2.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c index 17a80ba21..321f106fa 100644

> --- a/source/common/dmtbinfo2.c

> +++ b/source/common/dmtbinfo2.c

> @@ -343,7 +343,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoIort4[] =

>       {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (BaseAddress),            "Base Address", 0},

>       {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Flags),                  "Flags (decoded below)", 0},

>       {ACPI_DMT_FLAG0,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "COHACC Override", 0},

> -    {ACPI_DMT_FLAG1,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "HTTU Override", 0},

> +    {ACPI_DMT_FLAGS1,   ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "HTTU Override", 0},

>       {ACPI_DMT_FLAG3,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "Proximity Domain Valid", 0},

>       {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Reserved),               "Reserved", 0},

>       {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (VatosAddress),           "VATOS Address", 0},

> --

> 2.19.1

> 

> .

>
diff mbox series

Patch

diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c
index 17a80ba21..321f106fa 100644
--- a/source/common/dmtbinfo2.c
+++ b/source/common/dmtbinfo2.c
@@ -343,7 +343,7 @@  ACPI_DMTABLE_INFO           AcpiDmTableInfoIort4[] =
     {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (BaseAddress),            "Base Address", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Flags),                  "Flags (decoded below)", 0},
     {ACPI_DMT_FLAG0,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "COHACC Override", 0},
-    {ACPI_DMT_FLAG1,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "HTTU Override", 0},
+    {ACPI_DMT_FLAGS1,   ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "HTTU Override", 0},
     {ACPI_DMT_FLAG3,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "Proximity Domain Valid", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Reserved),               "Reserved", 0},
     {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (VatosAddress),           "VATOS Address", 0},