Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S SCP-firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Firmware
  • SCP-firmware
  • Merge requests
  • !469

smt: Make status and length volatile for mod_smt_memory

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Darryl Green requested to merge github/fork/nicola-mazzucato-arm/smt_race_fix into master May 13, 2021
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: nicola-mazzucato-arm

There is an intermittent error on TF-A side when reading the mailbox. The error is due to the mailbox message length not matching the expectation: ASSERT: drivers/arm/css/scmi/scmi_pwr_dmn_proto.c:48

This is due to a race between SCP writing the data and TF-A reading them.

Effectively, the compiler seems to perform some minor optimisations with the local mod_smt_memory resulting in the expected writing sequence to be altered. This is seen in smt_respond().

To remove such optimisations, force the length and status to be volatile. With this patch the sequence of writing into smt is restored and the error in TF-A disappears.

Change-Id: I0127b9aa3cd1b54643ffdb2ca5ddce9fc9569bea Signed-off-by: Nicola Mazzucato nicola.mazzucato@arm.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/nicola-mazzucato-arm/smt_race_fix