Skip to content

cppc: advertise optional fast-channel doorbell (follow-up to autonomous mode) - #119

Open
icosta-sifive wants to merge 1 commit into
riscv-software-src:mainfrom
icosta-sifive:dev/icosta/cppc_doorbell
Open

cppc: advertise optional fast-channel doorbell (follow-up to autonomous mode)#119
icosta-sifive wants to merge 1 commit into
riscv-software-src:mainfrom
icosta-sifive:dev/icosta/cppc_doorbell

Conversation

@icosta-sifive

@icosta-sifive icosta-sifive commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This is a follow-up to the previous PR that added CPPC autonomous mode. While wiring up GET_FAST_CHANNEL_REGION for autonomous mode, one commit was forgotten. The optional fast-channel doorbell that the same service advertise, this PR fills that gap.

Until now librpmi hardcoded these fields to zero, so even with the rest of the fast-channel path in place a platform had no way to advertise a doorbell.

The doorbell lets the application processor signal the platform microcontroller
after updating its Perf Request fast-channel, instead of relying on polling. It
is described by:

librpmi was still hardcoding these fields to zero, so a platform could never advertise a doorbell even though the rest of the fast-channel path was in place.

Tests

Added test coverage for:

  • Doorbell advertisement in passive mode (32-bit doorbell)
  • Doorbell advertisement in autonomous mode (combined FLAGS[4:3] + doorbell bits)
  • S-mode access to GET_FAST_CHANNEL_REGION

@icosta-sifive

Copy link
Copy Markdown
Contributor Author

@vlsunil FYI

@icosta-sifive
icosta-sifive marked this pull request as ready for review August 31, 2026 08:35
@icosta-sifive
icosta-sifive force-pushed the dev/icosta/cppc_doorbell branch from f3d4f8e to cebb0da Compare August 31, 2026 17:58
The CPPC GET_FAST_CHANNEL_REGION service defines an optional doorbell
(FLAGS[0] support, FLAGS[2:1] width, and the doorbell address plus write
value in response words 6-8) that lets the application processor signal
the platform microcontroller after updating its Perf Request
fast-channel, instead of relying on polling. librpmi previously
hardcoded these fields to zero, so a platform could never advertise a
doorbell.

Add an optional doorbell descriptor (struct rpmi_cppc_fastchan_doorbell)
embedded in struct rpmi_cppc_regs, mirroring how the performance service
group carries its doorbell in static platform data. When
RPMI_CPPC_FST_CHN_DB_SUPP is set, GET_FAST_CHANNEL_REGION reports the
doorbell; otherwise the response is unchanged. The create() signature is
not modified.

librpmi only advertises the doorbell; raising the doorbell interrupt and
invoking rpmi_context_process_group_events() from the handler remains a
platform responsibility.

Add tests for doorbell advertisement in passive and autonomous mode, and
S-mode access to GET_FAST_CHANNEL_REGION.

Signed-off-by: Ivo Costa <ivo.costa@sifive.com>
@icosta-sifive
icosta-sifive force-pushed the dev/icosta/cppc_doorbell branch from cebb0da to c66846d Compare August 31, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant