mpxy.rs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //! Chapter 20. Message Proxy Extension (EID #0x4D505859 "MPXY")
  2. /// Extension ID for Message Proxy Extension.
  3. #[doc(alias = "SBI_EXT_MPXY")]
  4. pub const EID_MPXY: usize = crate::eid_from_str("MPXY") as _;
  5. pub use fid::*;
  6. /// Declared in §20.12.
  7. mod fid {
  8. /// Function ID to get the version of the message proxy extension.
  9. ///
  10. /// Declared in §20.5.
  11. #[doc(alias = "SBI_EXT_MPXY_GET_SHMEM_SIZE")]
  12. pub const GET_SHMEM_SIZE: usize = 0;
  13. /// Function ID to set the shared memory for sending and receiving messages on the calling hart.
  14. ///
  15. /// Declared in §20.6.
  16. #[doc(alias = "SBI_EXT_MPXY_SET_SHMEM")]
  17. pub const SET_SHMEM: usize = 1;
  18. /// Function ID to get channel ids of the message channels accessible to the supervisor software in the shared memory of the calling hart.
  19. ///
  20. /// Declared in §20.7.
  21. #[doc(alias = "SBI_EXT_MPXY_GET_CHANNEL_IDS")]
  22. pub const GET_CHANNEL_IDS: usize = 2;
  23. /// Function ID to read message channel attributes.
  24. ///
  25. /// Declared in §20.8.
  26. #[doc(alias = "SBI_EXT_MPXY_READ_ATTRS")]
  27. pub const READ_ATTRIBUTE: usize = 3;
  28. /// Function ID to write message channel attributes.
  29. ///
  30. /// Declared in §20.9.
  31. #[doc(alias = "SBI_EXT_MPXY_WRITE_ATTRS")]
  32. pub const WRITE_ATTRIBUTE: usize = 4;
  33. /// Function ID to send a message to the mpxy channel and waits for sbi implementation for the message response.
  34. ///
  35. /// Declared in 20.10.
  36. #[doc(alias = "SBI_EXT_MPXY_SEND_MSG_WITH_RESP")]
  37. pub const SEND_MESSAGE_WITH_RESPONSE: usize = 5;
  38. /// Function ID to send a message to the mpxy channel and does not waits for response.
  39. ///
  40. /// Declared in 20.11.
  41. #[doc(alias = "SBI_EXT_MPXY_SEND_MSG_WITHOUT_RESP")]
  42. pub const SEND_MESSAGE_WITHOUT_RESPONSE: usize = 6;
  43. /// Function ID to get the message protocol specific notification events on the mpxy channel.
  44. ///
  45. /// Declared in 20.12.
  46. #[doc(alias = "SBI_EXT_MPXY_GET_NOTIFICATION_EVENTS")]
  47. pub const GET_NOTIFICATION_EVENTS: usize = 7;
  48. }