Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: b98e2113b53fa9c7474a820bcd94fffb352acdf6
      
https://github.com/tianocore/edk2/commit/b98e2113b53fa9c7474a820bcd94fffb352acdf6
  Author: Sudeep Holla <sudeep.ho...@arm.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c

  Log Message:
  -----------
  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.pat...@arm.com>
Cc: Jeff Brasen <jbra...@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gond...@arm.com>
Tested-by: Pierre Gondois <pierre.gond...@arm.com>
Reported-by: Sami Mujawar <sami.muja...@arm.com>
Signed-off-by: Sudeep Holla <sudeep.ho...@arm.com>
Reviewed-by: Sami Mujawar <sami.muja...@arm.com>
Tested-by: Sami Mujawar <sami.muja...@arm.com>




_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to