audk/ArmPkg/Drivers
Sudeep Holla b98e2113b5 ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize
As per the SCMI specification, section CLOCK_DESCRIBE_RATES mentions
that the value of num_rates_flags[11:0] in the response must be 3 if
the return format is the triplet. Due to the buggy firmware, this was
not noticed for long time. The firmware is now fixed resulting in
ClockDescribeRates() to fail with "Buffer Too Small" error as the
RequiredArraySize gets miscalculated as 72 instead of 24.

Fix the issue by reusing the logic for both the return format which
must work if num_rates_flags has correct value as expected from the
specification.

Cc: Girish Pathak <girish.pathak@arm.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Tested-by: Pierre Gondois <pierre.gondois@arm.com>
Reported-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Tested-by: Sami Mujawar <sami.mujawar@arm.com>
2023-02-06 13:56:24 +00:00
..
ArmCrashDumpDxe ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmGic ArmPkg/Drivers: ArmGicIsInterruptEnabled returns incorrect value 2022-07-01 15:28:08 +00:00
ArmPciCpuIo2Dxe ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmPsciMpServicesDxe ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls 2023-01-27 14:18:56 +00:00
ArmScmiDxe ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize 2023-02-06 13:56:24 +00:00
CpuDxe ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table 2022-07-22 17:10:09 +00:00
CpuPei ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GenericWatchdogDxe ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MmCommunicationDxe ArmPkg: MmCommunicationDxe: Update MM communicate `MessageLength` check 2022-01-27 02:16:17 +00:00
TimerDxe ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00