diff options
| author | David E. Garcia Porras <david.garcia@aheadcomputing.com> | 2026-06-08 18:22:55 +0530 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-06-10 18:13:10 +0530 |
| commit | 59fe435b2840da294fa054012ac23e26a8f325c0 (patch) | |
| tree | d44ffbb9e43aaf645e611be52a685458db96fbab | |
| parent | d0ae6a91ff7d55d8b807b354ce2d02db556f274d (diff) | |
| download | opensbi-59fe435b2840da294fa054012ac23e26a8f325c0.tar.gz opensbi-59fe435b2840da294fa054012ac23e26a8f325c0.zip | |
include: mailbox: Update RPMI notification structs and add performance events
Add rpmi_event_notification_state enum with disable, enable, and return
current state IDs. Also, add req_state field to rpmi_enable_notification_req
and current_state field to rpmi_enable_notification_resp for RPMI specification
compliance.
Add notification event ID enum and data structures for RPMI Performance
service group events: power change, limit change, and level change.
Signed-off-by: David E. Garcia Porras <david.garcia@aheadcomputing.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260608125257.3220114-4-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
| -rw-r--r-- | include/sbi_utils/mailbox/rpmi_msgprot.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/sbi_utils/mailbox/rpmi_msgprot.h b/include/sbi_utils/mailbox/rpmi_msgprot.h index 46834877..525b3750 100644 --- a/include/sbi_utils/mailbox/rpmi_msgprot.h +++ b/include/sbi_utils/mailbox/rpmi_msgprot.h @@ -87,6 +87,10 @@ #define RPMI_DEF_TX_TIMEOUT 20 #define RPMI_DEF_RX_TIMEOUT 20 +/** RPMI Notification event header constructor */ +#define RPMI_NOTIF_EVENT_HDR(eid, dlen) ((u32)(eid) << 16) | \ + ((u32)(dlen) & 0xFFFF) + /** * Common macro to generate composite version from major * and minor version numbers. @@ -232,14 +236,24 @@ enum rpmi_servicegroup_id { RPMI_SRVGRP_VENDOR_END = 0xFFFF, }; +/** RPMI event notification state IDs */ +enum rpmi_event_notification_state { + RPMI_EVENT_NOTIF_DISABLE_STATE = 0, + RPMI_EVENT_NOTIF_ENABLE_STATE = 1, + RPMI_EVENT_NOTIF_RET_CURR_STATE = 2, + RPMI_EVENT_NOTIF_MAX_COUNT = 3, +}; + /** RPMI enable notification request */ struct rpmi_enable_notification_req { u32 eventid; + u32 req_state; }; /** RPMI enable notification response */ struct rpmi_enable_notification_resp { s32 status; + u32 current_state; }; /** RPMI Base ServiceGroup Service IDs */ @@ -846,6 +860,33 @@ enum rpmi_performance_service_id { RPMI_PERF_SRV_MAX_COUNT, }; +/** RPMI Performance ServiceGroup Notification Event IDs */ +enum rpmi_performance_event_id { + RPMI_PERF_EVENT_POWER_CHANGE = 0x01, + RPMI_PERF_EVENT_LIMIT_CHANGE = 0x02, + RPMI_PERF_EVENT_LEVEL_CHANGE = 0x03, + RPMI_PERF_EVENT_MAX_COUNT, +}; + +/** RPMI Performance power change notification data */ +struct rpmi_perf_event_power_change { + u32 domain_id; + u32 power_uw; +}; + +/** RPMI Performance limit change notification data */ +struct rpmi_perf_event_limit_change { + u32 domain_id; + u32 max_level; + u32 min_level; +}; + +/** RPMI Performance level change notification data */ +struct rpmi_perf_event_level_change { + u32 domain_id; + u32 level; +}; + struct rpmi_perf_get_num_domain_resp { s32 status; u32 num_domains; |
