fwft.rs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //! Chapter 18. Firmware Features Extension (EID #0x46574654 "FWFT").
  2. /// Extension ID for Firmware Features Extension.
  3. pub const EID_FWFT: usize = crate::eid_from_str("FWFT") as _;
  4. pub use fid::*;
  5. /// Declared in §18.3.
  6. mod fid {
  7. /// Set the firmware function of the request based on Value and Flags parameters.
  8. ///
  9. /// Declared in §18.1.
  10. pub const SET: usize = 0;
  11. /// Return to the firmware function configuration value.
  12. ///
  13. /// Declared in §18.2.
  14. pub const GET: usize = 1;
  15. }
  16. /// FWFT Feature Types.
  17. ///
  18. /// Declared in §18.
  19. pub mod feature_type {
  20. /// Control misaligned access exception delegation.
  21. ///
  22. /// Declared in §18.
  23. pub const MISALIGNED_EXC_DELEG: usize = 0;
  24. /// Control landing pad support.
  25. ///
  26. /// Declared in §18.
  27. pub const LANDING_PAD: usize = 1;
  28. /// Control shadow stack support.
  29. ///
  30. /// Declared in §18.
  31. pub const SHADOW_STACK: usize = 2;
  32. /// Control double trap support.
  33. ///
  34. /// Declared in §18.
  35. pub const DOUBLE_TRAP: usize = 3;
  36. /// Control hardware updating of PTE A/D bits.
  37. ///
  38. /// Declared in §18.
  39. pub const PTE_AD_HW_UPDATING: usize = 4;
  40. /// Control the pointer masking tag length.
  41. ///
  42. /// Declared in §18.
  43. pub const POINTER_MASKING_PMLEN: usize = 5;
  44. }
  45. /// Firmware Features Set.
  46. ///
  47. /// Declared in §18.1.
  48. pub mod flags {
  49. use bitflags::bitflags;
  50. bitflags! {
  51. #[derive(Clone, Copy, PartialEq, Eq)]
  52. /// Declared in Table 94.
  53. pub struct SetFlags: usize {
  54. /// If provided, once set, the feature value can no longer be modified.
  55. const LOCK = 1 << 0;
  56. }
  57. }
  58. }