diff options
author | Alexei <Alexei.Fedorov@arm.com> | 2016-06-23 14:58:00 +0100 |
---|---|---|
committer | Leif Lindholm <leif.lindholm@linaro.org> | 2016-07-07 14:30:40 +0100 |
commit | 784575e354917d2663aace0f494e74598bb079d3 (patch) | |
tree | 25a35236534e9c1822009bbd6f46da0339d3170e /Platforms | |
parent | 084445120e94910025e02fe66ac528a3f4cc303a (diff) |
Platforms/ARM/Juno: fix GTDT compilation error.
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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Platforms')
-rw-r--r-- | Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc b/Platforms/ARM/Juno/AcpiTables/Gtdt.aslc index 1c258fc..3995059 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
|