Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: f96d38f432b680b0b652842b98153fef13e56329
      
https://github.com/tianocore/edk2/commit/f96d38f432b680b0b652842b98153fef13e56329
  Author: Johnny.Fan <johnny....@cixtech.com>
  Date:   2025-04-22 (Tue, 22 Apr 2025)

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

  Log Message:
  -----------
  ArmPkg/ArmScmiDxe: Fix SCMI param overwrite in multi-transaction scenario

Fix an issue where input parameters in SCMI messages may be overwritten by
return values during repeated transactions when retrieving large data sets.

This issue affects:
1. ClockDescribeRates: when the number of clock rates exceeds the transfer
   limit. According to the SCMI specification (Section 4.6.2.5), the first
   and second parameters are initially used to pass clock_id and rate_index.
   However, due to SCMI’s shared memory communication mechanism, these same
   memory locations are later reused to return status and num_rate_flags.

2. PerformanceDescribeLevels: when the number of performance levels is too
   large to return in a single response. As described in Section 4.5.3.5,
   the first and second parameters are initially used for domain_id and
   level_index, but are overwritten with status and num_levels in the return.

Because SCMI reuses the same shared memory buffer for both input and output,
the return values can override input parameters if the buffer is not properly
re-initialized before each request. This patch ensures that the first and
second parameters are correctly set before every transaction to preserve
input integrity and ensure correct protocol behavior.

Signed-off-by: jie.fu <jie...@cixtech.com>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


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

Reply via email to