[11/14] acpi/madt: remove two reserved bytes (mantis 1934 for ACPI 6.3)

Message ID 20190208032314.15215-12-alex.hung@canonical.com
State Accepted
Headers show
Series
  • Updates for ACPI 6.2b and 6.3
Related show

Commit Message

Alex Hung Feb. 8, 2019, 3:23 a.m.
The two reserved bytes are now "SPE overflow interrupt".

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/acpi/madt/madt.c        | 8 ++++++--
 src/lib/include/fwts_acpi.h | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

Comments

Colin Ian King Feb. 8, 2019, 2:34 p.m. | #1
On 08/02/2019 03:23, Alex Hung wrote:
> The two reserved bytes are now "SPE overflow interrupt".
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/madt/madt.c        | 8 ++++++--
>  src/lib/include/fwts_acpi.h | 1 +
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index 29fa56fd..59a8c996 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -1102,8 +1102,12 @@ static int madt_gicc(fwts_framework *fw,
>  	 */
>  
>  	if (hdr->length == 80) {	/* added in ACPI 6.0 */
> -		uint8_t tmp = gic->reserved2[0] | gic->reserved2[1] |
> -			      gic->reserved2[2];
> +		uint8_t tmp;
> +
> +		if (fwts_get_acpi_version(fw) >= FWTS_ACPI_VERSION_63)
> +			tmp = gic->reserved2[0];
> +		else
> +			tmp = gic->reserved2[0] | gic->reserved2[1] | gic->reserved2[2];
>  
>  		if (tmp)
>  			fwts_failed(fw, LOG_LEVEL_LOW,
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index 1767ba1f..6676116d 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -90,6 +90,7 @@
>  #define FWTS_GAS_ADDR_SPACE_ID_FFH		(0x7f)
>  
>  #define FWTS_ACPI_VERSION_NEXT	(0x700)
> +#define FWTS_ACPI_VERSION_63 	(0x630)
>  #define FWTS_ACPI_VERSION_62 	(0x620)
>  #define FWTS_ACPI_VERSION_61	(0x610)
>  #define FWTS_ACPI_VERSION_60	(0x600)
> 
Acked-by: Colin King <colin.king@canonical.com>
ivanhu Feb. 18, 2019, 10:36 a.m. | #2
On 2/8/19 11:23 AM, Alex Hung wrote:
> The two reserved bytes are now "SPE overflow interrupt".
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/madt/madt.c        | 8 ++++++--
>  src/lib/include/fwts_acpi.h | 1 +
>  2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index 29fa56fd..59a8c996 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -1102,8 +1102,12 @@ static int madt_gicc(fwts_framework *fw,
>  	 */
>  
>  	if (hdr->length == 80) {	/* added in ACPI 6.0 */
> -		uint8_t tmp = gic->reserved2[0] | gic->reserved2[1] |
> -			      gic->reserved2[2];
> +		uint8_t tmp;
> +
> +		if (fwts_get_acpi_version(fw) >= FWTS_ACPI_VERSION_63)
> +			tmp = gic->reserved2[0];
> +		else
> +			tmp = gic->reserved2[0] | gic->reserved2[1] | gic->reserved2[2];
>  
>  		if (tmp)
>  			fwts_failed(fw, LOG_LEVEL_LOW,
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index 1767ba1f..6676116d 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -90,6 +90,7 @@
>  #define FWTS_GAS_ADDR_SPACE_ID_FFH		(0x7f)
>  
>  #define FWTS_ACPI_VERSION_NEXT	(0x700)
> +#define FWTS_ACPI_VERSION_63 	(0x630)
>  #define FWTS_ACPI_VERSION_62 	(0x620)
>  #define FWTS_ACPI_VERSION_61	(0x610)
>  #define FWTS_ACPI_VERSION_60	(0x600)


Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index 29fa56fd..59a8c996 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -1102,8 +1102,12 @@  static int madt_gicc(fwts_framework *fw,
 	 */
 
 	if (hdr->length == 80) {	/* added in ACPI 6.0 */
-		uint8_t tmp = gic->reserved2[0] | gic->reserved2[1] |
-			      gic->reserved2[2];
+		uint8_t tmp;
+
+		if (fwts_get_acpi_version(fw) >= FWTS_ACPI_VERSION_63)
+			tmp = gic->reserved2[0];
+		else
+			tmp = gic->reserved2[0] | gic->reserved2[1] | gic->reserved2[2];
 
 		if (tmp)
 			fwts_failed(fw, LOG_LEVEL_LOW,
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index 1767ba1f..6676116d 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -90,6 +90,7 @@ 
 #define FWTS_GAS_ADDR_SPACE_ID_FFH		(0x7f)
 
 #define FWTS_ACPI_VERSION_NEXT	(0x700)
+#define FWTS_ACPI_VERSION_63 	(0x630)
 #define FWTS_ACPI_VERSION_62 	(0x620)
 #define FWTS_ACPI_VERSION_61	(0x610)
 #define FWTS_ACPI_VERSION_60	(0x600)