Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RISC-V: Add defines for the SBI message proxy extension

Add defines for the new SBI message proxy extension which is part
of the SBI v3.0 specification.

Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Co-developed-by: Rahul Pathak <rpathak@ventanamicro.com>
Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20250818040920.272664-4-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>

authored by

Anup Patel and committed by
Paul Walmsley
508da386 581b4da1

+62
+62
arch/riscv/include/asm/sbi.h
··· 36 36 SBI_EXT_STA = 0x535441, 37 37 SBI_EXT_NACL = 0x4E41434C, 38 38 SBI_EXT_FWFT = 0x46574654, 39 + SBI_EXT_MPXY = 0x4D505859, 39 40 40 41 /* Experimentals extensions must lie within this range */ 41 42 SBI_EXT_EXPERIMENTAL_START = 0x08000000, ··· 430 429 #define SBI_FWFT_GLOBAL_FEATURE_BIT BIT(31) 431 430 432 431 #define SBI_FWFT_SET_FLAG_LOCK BIT(0) 432 + 433 + enum sbi_ext_mpxy_fid { 434 + SBI_EXT_MPXY_GET_SHMEM_SIZE, 435 + SBI_EXT_MPXY_SET_SHMEM, 436 + SBI_EXT_MPXY_GET_CHANNEL_IDS, 437 + SBI_EXT_MPXY_READ_ATTRS, 438 + SBI_EXT_MPXY_WRITE_ATTRS, 439 + SBI_EXT_MPXY_SEND_MSG_WITH_RESP, 440 + SBI_EXT_MPXY_SEND_MSG_WITHOUT_RESP, 441 + SBI_EXT_MPXY_GET_NOTIFICATION_EVENTS, 442 + }; 443 + 444 + enum sbi_mpxy_attribute_id { 445 + /* Standard channel attributes managed by MPXY framework */ 446 + SBI_MPXY_ATTR_MSG_PROT_ID = 0x00000000, 447 + SBI_MPXY_ATTR_MSG_PROT_VER = 0x00000001, 448 + SBI_MPXY_ATTR_MSG_MAX_LEN = 0x00000002, 449 + SBI_MPXY_ATTR_MSG_SEND_TIMEOUT = 0x00000003, 450 + SBI_MPXY_ATTR_MSG_COMPLETION_TIMEOUT = 0x00000004, 451 + SBI_MPXY_ATTR_CHANNEL_CAPABILITY = 0x00000005, 452 + SBI_MPXY_ATTR_SSE_EVENT_ID = 0x00000006, 453 + SBI_MPXY_ATTR_MSI_CONTROL = 0x00000007, 454 + SBI_MPXY_ATTR_MSI_ADDR_LO = 0x00000008, 455 + SBI_MPXY_ATTR_MSI_ADDR_HI = 0x00000009, 456 + SBI_MPXY_ATTR_MSI_DATA = 0x0000000A, 457 + SBI_MPXY_ATTR_EVENTS_STATE_CONTROL = 0x0000000B, 458 + SBI_MPXY_ATTR_STD_ATTR_MAX_IDX, 459 + /* 460 + * Message protocol specific attributes, managed by 461 + * the message protocol specification. 462 + */ 463 + SBI_MPXY_ATTR_MSGPROTO_ATTR_START = 0x80000000, 464 + SBI_MPXY_ATTR_MSGPROTO_ATTR_END = 0xffffffff 465 + }; 466 + 467 + /* Possible values of MSG_PROT_ID attribute as-per SBI v3.0 (or higher) */ 468 + enum sbi_mpxy_msgproto_id { 469 + SBI_MPXY_MSGPROTO_RPMI_ID = 0x0, 470 + }; 471 + 472 + /* RPMI message protocol specific MPXY attributes */ 473 + enum sbi_mpxy_rpmi_attribute_id { 474 + SBI_MPXY_RPMI_ATTR_SERVICEGROUP_ID = SBI_MPXY_ATTR_MSGPROTO_ATTR_START, 475 + SBI_MPXY_RPMI_ATTR_SERVICEGROUP_VERSION, 476 + SBI_MPXY_RPMI_ATTR_IMPL_ID, 477 + SBI_MPXY_RPMI_ATTR_IMPL_VERSION, 478 + SBI_MPXY_RPMI_ATTR_MAX_ID 479 + }; 480 + 481 + /* Encoding of MSG_PROT_VER attribute */ 482 + #define SBI_MPXY_MSG_PROT_VER_MAJOR(__ver) upper_16_bits(__ver) 483 + #define SBI_MPXY_MSG_PROT_VER_MINOR(__ver) lower_16_bits(__ver) 484 + #define SBI_MPXY_MSG_PROT_MKVER(__maj, __min) (((u32)(__maj) << 16) | (u16)(__min)) 485 + 486 + /* Capabilities available through CHANNEL_CAPABILITY attribute */ 487 + #define SBI_MPXY_CHAN_CAP_MSI BIT(0) 488 + #define SBI_MPXY_CHAN_CAP_SSE BIT(1) 489 + #define SBI_MPXY_CHAN_CAP_EVENTS_STATE BIT(2) 490 + #define SBI_MPXY_CHAN_CAP_SEND_WITH_RESP BIT(3) 491 + #define SBI_MPXY_CHAN_CAP_SEND_WITHOUT_RESP BIT(4) 492 + #define SBI_MPXY_CHAN_CAP_GET_NOTIFICATIONS BIT(5) 433 493 434 494 /* SBI spec version fields */ 435 495 #define SBI_SPEC_VERSION_DEFAULT 0x1