[PATCH] include: mailbox: correct RPMI CPPC request field ordering

Rahul Pathak rahul.pathak at oss.qualcomm.com
Wed Oct 21 04:48:33 PDT 2026


On Wed, Oct 21, 2026 at 3:14 PM wuliwen <liwen.wu at spacemit.com> wrote:
>
> Per the RPMI specification, CPPC_PROBE_REG, CPPC_READ_REG, and
> CPPC_WRITE_REG require REG_ID in word 0 and HART_ID in word 1.
>
> The current request structures have these fields swapped, causing
> incompatibility with spec-compliant RPMI servers.
>
> Swap the fields to match the specification.
>
> Signed-off-by: wuliwen <liwen.wu at spacemit.com>
> ---
>  include/sbi_utils/mailbox/rpmi_msgprot.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/sbi_utils/mailbox/rpmi_msgprot.h b/include/sbi_utils/mailbox/rpmi_msgprot.h
> index 7ae4abe0..48f6ac61 100644
> --- a/include/sbi_utils/mailbox/rpmi_msgprot.h
> +++ b/include/sbi_utils/mailbox/rpmi_msgprot.h
> @@ -539,8 +539,8 @@ enum rpmi_cppc_service_id {
>  };
>
>  struct rpmi_cppc_probe_req {
> -       u32 hart_id;
>         u32 reg_id;
> +       u32 hart_id;
>  };
>
>  struct rpmi_cppc_probe_resp {
> @@ -549,8 +549,8 @@ struct rpmi_cppc_probe_resp {
>  };
>
>  struct rpmi_cppc_read_reg_req {
> -       u32 hart_id;
>         u32 reg_id;
> +       u32 hart_id;
>  };
>
>  struct rpmi_cppc_read_reg_resp {
> @@ -560,8 +560,8 @@ struct rpmi_cppc_read_reg_resp {
>  };
>
>  struct rpmi_cppc_write_reg_req {
> -       u32 hart_id;
>         u32 reg_id;
> +       u32 hart_id;
>         u32 data_lo;
>         u32 data_hi;
>  };
> --
> 2.34.1
>
> This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not an intended recipient of this message, please delete it and any attachment from your system and notify the sender immediately by reply e-mail. Unintended recipients should not use, copy, disclose or take any action based on this message or any information contained in this message. Emails cannot be guaranteed to be secure or error free as they can be intercepted, amended, lost or destroyed, and you should take full responsibility for security checking.
>
> 本邮件及其任何附件具有保密性质,并可能受其他保护或不允许被披露给第三方。如阁下误收到本邮件,敬请立即以回复电子邮件的方式通知发件人,并将本邮件及其任何附件从阁下系统中予以删除。如阁下并非本邮件写明之收件人,敬请切勿使用、复制、披露本邮件或其任何内容,亦请切勿依本邮件或其任何内容而采取任何行动。电子邮件无法保证是一种安全和不会出现任何差错的通信方式,可能会被拦截、修改、丢失或损坏,收件人需自行负责做好安全检查。
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi

Worth adding Fixes tag and with that -

LGTM
Reviewed-by: Rahul Pathak <rahul.pathak at oss.qualcomm.com>


More information about the opensbi mailing list