diff mbox

ACPI: MADT: update GICC flag checks for ACPI 6.0

Message ID 1446244314-2317-1-git-send-email-al.stone@linaro.org
State Accepted
Headers show

Commit Message

Al Stone Oct. 30, 2015, 10:31 p.m. UTC
In the ACPI 6.0 spec, the flags field of the MADT GICC subtable uses
three bits, not two.  Correct the flag mask to do the test properly.

Signed-off-by: Al Stone <al.stone@linaro.org>
---
 src/acpi/madt/madt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung Nov. 2, 2015, 2:16 a.m. UTC | #1
On 10/31/2015 06:31 AM, Al Stone wrote:
> In the ACPI 6.0 spec, the flags field of the MADT GICC subtable uses
> three bits, not two.  Correct the flag mask to do the test properly.
> 
> Signed-off-by: Al Stone <al.stone@linaro.org>
> ---
>  src/acpi/madt/madt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index f776745..1f19848 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -226,7 +226,7 @@ static int madt_test1(fwts_framework *fw)
>  						"MADT GIC C Structure reserved field should be zero, "
>  						"instead got 0x%" PRIx32 ".", gic->reserved);
>  				}
> -				if (gic->flags & 0xfffffffc) {
> +				if (gic->flags & 0xfffffff8) {
>  					passed = false;
>  					fwts_failed(fw, LOG_LEVEL_MEDIUM,
>  						"MADTGICFLags",
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Nov. 5, 2015, 2:27 a.m. UTC | #2
On 2015年10月31日 06:31, Al Stone wrote:
> In the ACPI 6.0 spec, the flags field of the MADT GICC subtable uses
> three bits, not two.  Correct the flag mask to do the test properly.
>
> Signed-off-by: Al Stone <al.stone@linaro.org>
> ---
>   src/acpi/madt/madt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index f776745..1f19848 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -226,7 +226,7 @@ static int madt_test1(fwts_framework *fw)
>   						"MADT GIC C Structure reserved field should be zero, "
>   						"instead got 0x%" PRIx32 ".", gic->reserved);
>   				}
> -				if (gic->flags & 0xfffffffc) {
> +				if (gic->flags & 0xfffffff8) {
>   					passed = false;
>   					fwts_failed(fw, LOG_LEVEL_MEDIUM,
>   						"MADTGICFLags",
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Al Stone Nov. 10, 2015, 4:24 p.m. UTC | #3
On 11/04/2015 07:27 PM, ivanhu wrote:
> 
> 
> On 2015年10月31日 06:31, Al Stone wrote:
>> In the ACPI 6.0 spec, the flags field of the MADT GICC subtable uses
>> three bits, not two.  Correct the flag mask to do the test properly.
>>
>> Signed-off-by: Al Stone <al.stone@linaro.org>
>> ---
>>   src/acpi/madt/madt.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
>> index f776745..1f19848 100644
>> --- a/src/acpi/madt/madt.c
>> +++ b/src/acpi/madt/madt.c
>> @@ -226,7 +226,7 @@ static int madt_test1(fwts_framework *fw)
>>                           "MADT GIC C Structure reserved field should be zero, "
>>                           "instead got 0x%" PRIx32 ".", gic->reserved);
>>                   }
>> -                if (gic->flags & 0xfffffffc) {
>> +                if (gic->flags & 0xfffffff8) {
>>                       passed = false;
>>                       fwts_failed(fw, LOG_LEVEL_MEDIUM,
>>                           "MADTGICFLags",
>>
> 
> Acked-by: Ivan Hu <ivan.hu@canonical.com>
> 

It just occurred to me that the fwts_failed() call in this patch may also
need a fix to use the new mask, too...I'll try to check on it soon and see.
diff mbox

Patch

diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index f776745..1f19848 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -226,7 +226,7 @@  static int madt_test1(fwts_framework *fw)
 						"MADT GIC C Structure reserved field should be zero, "
 						"instead got 0x%" PRIx32 ".", gic->reserved);
 				}
-				if (gic->flags & 0xfffffffc) {
+				if (gic->flags & 0xfffffff8) {
 					passed = false;
 					fwts_failed(fw, LOG_LEVEL_MEDIUM,
 						"MADTGICFLags",