Skip to content

Conversation

@cp0613
Copy link
Collaborator

@cp0613 cp0613 commented Nov 16, 2024

The Sscofpmf spec does not define overflow interrupts for cycles & instructions [1]. But this is indispensable in performance profiling.

Xuantie added registers mhpmevent0 and mhpmevent2, with addresses 0x7E0 and 0x7E1 respectively, which are used to configure cycles & instructions.

At the same time, mxstatus[8] is newly defined as ofint to control whether the cycles and instructions events of HPCP can generate interrupt 13 (lcofip). When it is 1, an interrupt can be generated, and when it is 0, an interrupt cannot be generated.

This patch is used to support the above functions. Changes to mxstatus will be committed in zsb [2].

[1] riscvarchive/riscv-count-overflow#5
[2] https://github.com/XUANTIE-RV/zero_stage_boot

The Sscofpmf spec does not define overflow interrupts for cycles & instructions [1].
But this is indispensable in performance profiling.

Xuantie added registers mhpmevent0 and mhpmevent2, with addresses 0x7E0 and 0x7E1
respectively, which are used to configure cycles & instructions.

At the same time, mxstatus[8] is newly defined as ofint to control whether the
cycles and instructions events of HPCP can generate interrupt 13 (lcofip). When
it is 1, an interrupt can be generated, and when it is 0, an interrupt cannot be
generated.

This patch is used to support the above functions.

[1] riscvarchive/riscv-count-overflow#5

Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
@guoren83 guoren83 merged commit ad40f17 into XUANTIE-RV:linux-6.6 Nov 18, 2024
2 checks passed
@yjloong
Copy link

yjloong commented Apr 9, 2025

Why implement the two scenarios?

@cp0613
Copy link
Collaborator Author

cp0613 commented Jun 28, 2025

Why implement the two scenarios?

You can see the reference No.[1] in the commit description. Thanks.

cp0613 pushed a commit to cp0613/opensbi_xuantie that referenced this pull request Jul 24, 2025
Instead of having one common FDT MPXY RPMI mailbox client drivers
for various RPMI service groups, split this driver into two parts:
1) Common MPXY RPMI mailbox client library
2) MPXY driver for RPMI clock service group

The above split enables having a separate MPXY driver for each
RPMI clock service group and XUANTIE-RV#1 (above) will allow code sharing
between various MPXY RPMI drivers.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
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.

3 participants