From: Evan Lloyd evan.lloyd@arm.com
These patches make minor source updates to the Juno GTDT. There is no functional change, only source code improvements.
Code available at: https://github.com/EvanLloyd/OpenPlatformPkg/tree/GTDTbis_v1
Alexei (1): Platforms/ARM/Juno: fix GTDT compilation error.
Evan Lloyd (1): Platforms/ARM/Juno: ameliorate misleading GTDT name.
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
From: Alexei Alexei.Fedorov@arm.com
This commit fixes a GTDT compilation error "excess elements in array initializer [-Werror]" in the EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT() macro with options in ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h: Number of Watchdog timers set to 0: #define JUNO_WATCHDOG_COUNT 0 ACPI tables are based on ACPI 5.1 or later: //#define ARM_JUNO_ACPI_5_0
This fix also prevents declaration of an ISO C90 non-compliant zero-length array, causing the error: "ISO C forbids zero-size array 'Watchdogs'" when compiled with the "-pedantic" option.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov alexei.fedorov@arm.com Signed-off-by: Evan Lloyd evan.lloyd@arm.com --- Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 1c258fcfe2489601a3fa55bbdddc5bff686b0c4a..3995059114b27586ddacc60c6a9c1346e5051c57 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -61,7 +61,9 @@
typedef struct { EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt; +#if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; +#endif } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
#pragma pack () @@ -87,12 +89,14 @@ JUNO_WATCHDOG_COUNT, // UINT32 PlatformTimerCount sizeof (EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 PlatfromTimerOffset }, +#if (JUNO_WATCHDOG_COUNT != 0) { EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 93, 0), EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER) } +#endif }; #endif
On 6 July 2016 at 22:22, evan.lloyd@arm.com wrote:
From: Alexei Alexei.Fedorov@arm.com
This commit fixes a GTDT compilation error "excess elements in array initializer [-Werror]" in the EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT() macro with options in ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h: Number of Watchdog timers set to 0: #define JUNO_WATCHDOG_COUNT 0 ACPI tables are based on ACPI 5.1 or later: //#define ARM_JUNO_ACPI_5_0
This fix also prevents declaration of an ISO C90 non-compliant zero-length array, causing the error: "ISO C forbids zero-size array 'Watchdogs'" when compiled with the "-pedantic" option.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov alexei.fedorov@arm.com Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 1c258fcfe2489601a3fa55bbdddc5bff686b0c4a..3995059114b27586ddacc60c6a9c1346e5051c57 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -61,7 +61,9 @@
typedef struct { EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt; +#if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; +#endif } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
#pragma pack () @@ -87,12 +89,14 @@ JUNO_WATCHDOG_COUNT, // UINT32 PlatformTimerCount sizeof (EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 PlatfromTimerOffset }, +#if (JUNO_WATCHDOG_COUNT != 0) { EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 93, 0), EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER) } +#endif }; #endif
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
From: Evan Lloyd evan.lloyd@arm.com
This commit modifies the name of a structure that is entirely internal to Platforms/ARM/Juno/AcpiTables/Gtdt.aslc The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES is changed to GENERIC_TIMER_DESCRIPTION_TABLE.
The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES was misleading in that it appears to be from the standard headers, and caused a bug where the very similar EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE was accidentally used instead.
This is only a source name change with no functional modification.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd evan.lloyd@arm.com --- Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 3995059114b27586ddacc60c6a9c1346e5051c57..5e2daf9abb8344ff121dace4fa827838b10ac287 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -64,15 +64,15 @@ #if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; #endif - } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES; + } GENERIC_TIMER_DESCRIPTION_TABLE;
#pragma pack ()
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = { + GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = { { ARM_ACPI_HEADER( EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, - EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES, + GENERIC_TIMER_DESCRIPTION_TABLE, EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION ), SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
On Wed, Jul 06, 2016 at 09:22:43PM +0100, evan.lloyd@arm.com wrote:
From: Evan Lloyd evan.lloyd@arm.com
This commit modifies the name of a structure that is entirely internal to Platforms/ARM/Juno/AcpiTables/Gtdt.aslc The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES is changed to GENERIC_TIMER_DESCRIPTION_TABLE.
The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES was misleading in that it appears to be from the standard headers, and caused a bug where the very similar EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE was accidentally used instead.
This is only a source name change with no functional modification.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 3995059114b27586ddacc60c6a9c1346e5051c57..5e2daf9abb8344ff121dace4fa827838b10ac287 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -64,15 +64,15 @@ #if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; #endif
- } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
- } GENERIC_TIMER_DESCRIPTION_TABLE;
I did a similar thing in FVP code after typoing one too many times.
Reviewed-by: Graeme Gregory graeme.gregory@linaro.org
#pragma pack ()
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
- GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = { { ARM_ACPI_HEADER( EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES,
GENERIC_TIMER_DESCRIPTION_TABLE, EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION ), SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
ameliorate - that's the first time I've had to use a dictionary to read a patch :-)
On 7 July 2016 at 11:05, Graeme Gregory graeme.gregory@linaro.org wrote:
On Wed, Jul 06, 2016 at 09:22:43PM +0100, evan.lloyd@arm.com wrote:
From: Evan Lloyd evan.lloyd@arm.com
This commit modifies the name of a structure that is entirely internal to Platforms/ARM/Juno/AcpiTables/Gtdt.aslc The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES is changed to GENERIC_TIMER_DESCRIPTION_TABLE.
The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES was misleading in that it appears to be from the standard headers, and caused a bug where the very similar EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE was accidentally used instead.
This is only a source name change with no functional modification.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 3995059114b27586ddacc60c6a9c1346e5051c57..5e2daf9abb8344ff121dace4fa827838b10ac287 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -64,15 +64,15 @@ #if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; #endif
- } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
- } GENERIC_TIMER_DESCRIPTION_TABLE;
I did a similar thing in FVP code after typoing one too many times.
Reviewed-by: Graeme Gregory graeme.gregory@linaro.org
#pragma pack ()
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
- GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = { { ARM_ACPI_HEADER( EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES,
GENERIC_TIMER_DESCRIPTION_TABLE, EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION ), SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
On 6 July 2016 at 22:22, evan.lloyd@arm.com wrote:
From: Evan Lloyd evan.lloyd@arm.com
This commit modifies the name of a structure that is entirely internal to Platforms/ARM/Juno/AcpiTables/Gtdt.aslc The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES is changed to GENERIC_TIMER_DESCRIPTION_TABLE.
The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES was misleading in that it appears to be from the standard headers, and caused a bug where the very similar EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE was accidentally used instead.
This is only a source name change with no functional modification.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Adjudicated-by: Ard Biesheuvel ard.biesheuvel@linaro.org
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 3995059114b27586ddacc60c6a9c1346e5051c57..5e2daf9abb8344ff121dace4fa827838b10ac287 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -64,15 +64,15 @@ #if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; #endif
- } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
} GENERIC_TIMER_DESCRIPTION_TABLE;
#pragma pack ()
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
- GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = { { ARM_ACPI_HEADER( EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES,
GENERIC_TIMER_DESCRIPTION_TABLE, EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION ), SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
On Thu, Jul 07, 2016 at 02:14:13PM +0200, Ard Biesheuvel wrote:
On 6 July 2016 at 22:22, evan.lloyd@arm.com wrote:
From: Evan Lloyd evan.lloyd@arm.com
This commit modifies the name of a structure that is entirely internal to Platforms/ARM/Juno/AcpiTables/Gtdt.aslc The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES is changed to GENERIC_TIMER_DESCRIPTION_TABLE.
The name EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES was misleading in that it appears to be from the standard headers, and caused a bug where the very similar EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE was accidentally used instead.
This is only a source name change with no functional modification.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Adjudicated-by: Ard Biesheuvel ard.biesheuvel@linaro.org
Thanks all - series pushed :)
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 3995059114b27586ddacc60c6a9c1346e5051c57..5e2daf9abb8344ff121dace4fa827838b10ac287 100644 --- a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc @@ -64,15 +64,15 @@ #if (JUNO_WATCHDOG_COUNT != 0) EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdogs[JUNO_WATCHDOG_COUNT]; #endif
- } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
} GENERIC_TIMER_DESCRIPTION_TABLE;
#pragma pack ()
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
- GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = { { ARM_ACPI_HEADER( EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES,
GENERIC_TIMER_DESCRIPTION_TABLE, EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION ), SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")