mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
DynamicTablesPkg: Add frame number validation to GTDT generator
Added code to check if the Generic Timer Block Structure's frame number provided by the platform repository is within the allowed range (0-7). References: - ACPI 6.2 Errata A, Table 5-122, September 2017 Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
98f98eb440
commit
75bf10a689
@ -218,6 +218,15 @@ AddGTBlockTimerFrames (
|
||||
GtBlockFrame
|
||||
));
|
||||
|
||||
if (GTBlockTimerFrameList->FrameNumber >= 8) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"ERROR: GTDT: Frame number %d is not in the range 0-7\n",
|
||||
GTBlockTimerFrameList->FrameNumber
|
||||
));
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
GtBlockFrame->GTFrameNumber = GTBlockTimerFrameList->FrameNumber;
|
||||
GtBlockFrame->Reserved[0] = EFI_ACPI_RESERVED_BYTE;
|
||||
GtBlockFrame->Reserved[1] = EFI_ACPI_RESERVED_BYTE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user