CSR Bit Fields

RISC-V mhpmevent14 CSR Register

Address 0x32EPrivilege MachineAccess RW / 64Machine counters and performance-monitoring CSRs

mhpmevent14 at 0x32E is the machine HPM event-selector CSR for mhpmcounter14; Sscofpmf also defines overflow and privilege-mode filtering fields in its upper bits.

Field Map

Understand mhpmevent14 By Bit Fields

8 key fields
63

OF

RW

Sscofpmf overflow status and interrupt-disable bit; set when mhpmcounter14 overflows.

OF (bit 63) — Sscofpmf overflow status and interrupt-disable bit; set when mhpmcounter14 overflows.

What This Field Controls

  • - Sscofpmf overflow status and interrupt-disable bit; set when mhpmcounter14 overflows.

Common Values

Sscofpmf OF bit
0No overflow recorded

The OF bit for mhpmcounter14 is clear; this bit itself does not disable generation of a later count-overflow interrupt request.

1Overflow recorded

mhpmcounter14 has overflowed and set the sticky OF bit; it remains set until cleared by software and disables new count-overflow interrupt requests for this counter.

62

MINH

RW

When set, inhibits event counting in M-mode.

MINH (bit 62) — When set, inhibits event counting in M-mode.

What This Field Controls

  • - When set, inhibits event counting in M-mode.

Common Values

MINH mode-filter bit
0Counting allowed

mhpmcounter14 event counting in M-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter14 event counting in M-mode is inhibited.

61

SINH

RW

When set, inhibits event counting in S/HS-mode; if the associated privilege mode is not implemented, this bit is read-only zero.

SINH (bit 61) — When set, inhibits event counting in S/HS-mode; if the associated privilege mode is not implemented, this bit is read-only zero.

What This Field Controls

  • - When set, inhibits event counting in S/HS-mode; if the associated privilege mode is not implemented, this bit is read-only zero.

Common Values

SINH mode-filter bit
0Counting allowed

mhpmcounter14 event counting in S/HS-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter14 event counting in S/HS-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

60

UINH

RW

When set, inhibits event counting in U-mode; if U-mode is not implemented, this bit is read-only zero.

UINH (bit 60) — When set, inhibits event counting in U-mode; if U-mode is not implemented, this bit is read-only zero.

What This Field Controls

  • - When set, inhibits event counting in U-mode; if U-mode is not implemented, this bit is read-only zero.

Common Values

UINH mode-filter bit
0Counting allowed

mhpmcounter14 event counting in U-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter14 event counting in U-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

59

VSINH

RW

When set, inhibits event counting in VS-mode; if Hypervisor/VS mode is not implemented, this bit is read-only zero.

VSINH (bit 59) — When set, inhibits event counting in VS-mode; if Hypervisor/VS mode is not implemented, this bit is read-only zero.

What This Field Controls

  • - When set, inhibits event counting in VS-mode; if Hypervisor/VS mode is not implemented, this bit is read-only zero.

Common Values

VSINH mode-filter bit
0Counting allowed

mhpmcounter14 event counting in VS-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter14 event counting in VS-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

58

VUINH

RW

When set, inhibits event counting in VU-mode; if VU-mode is not implemented, this bit is read-only zero.

VUINH (bit 58) — When set, inhibits event counting in VU-mode; if VU-mode is not implemented, this bit is read-only zero.

What This Field Controls

  • - When set, inhibits event counting in VU-mode; if VU-mode is not implemented, this bit is read-only zero.

Common Values

VUINH mode-filter bit
0Counting allowed

mhpmcounter14 event counting in VU-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter14 event counting in VU-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

57:56

WPRI

WPRI

Sscofpmf reserved writes-preserve-values fields.

WPRI (bits 57:56) — Sscofpmf reserved writes-preserve-values fields.

What This Field Controls

  • - Sscofpmf reserved writes-preserve-values fields.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

55:0

EVENT

WARL

Platform-defined event selector for mhpmcounter14; event 0 means no event is counted.

EVENT (bits 55:0) — Platform-defined event selector for mhpmcounter14; event 0 means no event is counted.

What This Field Controls

  • - Platform-defined event selector for mhpmcounter14; event 0 means no event is counted.

Common Values

mhpmevent EVENT selector
0No event

The official specification defines EVENT=0 to mean mhpmcounter14 counts no event; other EVENT encodings are platform-defined and are not enumerated on the generic page.

Official Basis & Search Notes

mhpmevent14 decides which platform-defined performance event mhpmcounter14 counts. If Sscofpmf is implemented, upper bits also contain the OF overflow status/interrupt-disable bit and MINH/SINH/UINH/VSINH/VUINH mode-filtering bits.

The official Machine HPM mechanism uses mhpmevent14 as the event-selector CSR for mhpmcounter14.
Event selector encodings are platform-defined; a generic page must not invent concrete platform event numbers.
Sscofpmf standardizes the OF and xINH upper bits and exposes OF shadows through scountovf.

What To Check First When Reading This CSR

  • - Confirm that the current hart implements mhpmevent14 and the associated HPM counter; unimplemented counters may read as zero.
  • - Event encodings are platform-defined, so do not infer event meaning from the mhpmevent14 name alone.
  • - When Sscofpmf is implemented, the OF bit is also reflected read-only in the corresponding bit of scountovf.

Risk Checks Before Writing

  • - Check target platform event encodings before writing an event selector and preserve WPRI bits.
  • - Changing OF/xINH bits affects overflow interrupt behavior or privilege-mode filtering; do not overwrite mhpmevent14 as an ordinary integer.
  • - Lower-privilege reads of mhpmcounter14 or hpmcounter14 are still controlled by counteren/delegation mechanisms.

Put It Back Into A Real Flow

1

Confirm that the target platform defines the event encoding to use with mhpmevent14.

2

Configure the EVENT field and set OF or xINH bits as needed.

3

Read mhpmcounter14 or the corresponding lower-privilege shadow counter to validate event counting and overflow behavior.

FAQ

Can mhpmevent14 be accessed from any privilege level?

No. The official CSR table lists mhpmevent14 as a Machine mode CSR. Lower-privilege software may access the corresponding state only when a relevant standard extension provides an explicit delegation or permission mechanism. Direct CSR access with insufficient privilege, or to an unimplemented CSR, raises an illegal-instruction exception.

Does mhpmevent14 directly define what each event number means?

No. RISC-V defines the HPM event-selector mechanism, but concrete event encodings are platform-defined; this page only states the standardized OF/xINH fields and the relationship with mhpmcounter14.