Skip to content

Send the FF-A power management messages from the SPMD to the SPMC and partitions #44

Description

@aidangarske

Context

DEN0077A 1.2 section 18.2.4 requires the SPMD to inform the SPMC of every CPU_OFF, CPU_SUSPEND, SYSTEM_OFF, SYSTEM_RESET, SYSTEM_RESET2 and SYSTEM_SUSPEND. The AArch64 monitor currently completes these without a message; this was deferred from the AArch64 support PR and is recorded as unsupported in docs/FF-A-Compatibility.md.

Origin

PR #29, Skoll FF-A lens (DEN0077A 18.2.4, Tables 18.6 to 18.8)

What is needed

  • SPMD: validate the PSCI call, send the Table 18.6 framework direct request to the SPMC, complete the operation on SUCCESS and return DENIED otherwise, preserving x4-x17
  • SPMD: refuse any other SPMC request to switch to the Normal world while a message is outstanding
  • SPMC: forward to partitions registered for that operation (waiting state, SPMC-scheduled mode), answer with Table 18.8, DENIED if any partition denies and for CPU_OFF while the SPMC is resident
  • SPMC: deny FFA_RUN, FFA_YIELD and direct requests from a partition while it processes the message
  • Manifest: optional power_management list of PSCI operations in the FF-A section, direct messaging only
  • Table 18.7 warm-boot message once a power-down state or warm boot exists

Blockers and dependencies

None for the single-core SPMC. The warm-boot message waits on multi-core or power-down support.

Acceptance criteria

  • Host rows for the Table 18.6 and 18.8 encodings, the SPMD round trip, and the manifest field
  • psci, psci-el2, resetneg and ffa-preempt show the message and response on all three QEMU machines with both engines
  • New negative scenario where a partition answers DENIED and CPU_SUSPEND returns DENIED
  • The unsupported row in docs/FF-A-Compatibility.md becomes an implemented row

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: needed but not blocking; bug with a workaround; flaketodoDeferred work tracked for later

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions