pub struct CapReg(/* private fields */);Expand description
Capability Register (MMIO offset 0x008, 64-bit, RO). §10.4.2.
Reports hardware capabilities to software. Key fields control the supported address widths, large page sizes, fault recording, and domain count.
Implementations§
Source§impl CapReg
impl CapReg
Sourcepub const fn nd(&self) -> u8
pub const fn nd(&self) -> u8
Number of domains supported (3 bits). See NumDomains.
Bits: 0..3
Sourcepub const fn with_nd_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_nd_checked(self, value: u8) -> Result<Self, ()>
Number of domains supported (3 bits). See NumDomains.
Bits: 0..3
Sourcepub const fn with_nd(self, value: u8) -> Self
pub const fn with_nd(self, value: u8) -> Self
Number of domains supported (3 bits). See NumDomains.
Bits: 0..3
Sourcepub const fn set_nd(&mut self, value: u8)
pub const fn set_nd(&mut self, value: u8)
Number of domains supported (3 bits). See NumDomains.
Bits: 0..3
Sourcepub const fn set_nd_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_nd_checked(&mut self, value: u8) -> Result<(), ()>
Number of domains supported (3 bits). See NumDomains.
Bits: 0..3
Sourcepub const fn with_afl_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_afl_checked(self, value: bool) -> Result<Self, ()>
Advanced Fault Logging (not supported in emulator).
Bits: 3..4
Sourcepub const fn with_afl(self, value: bool) -> Self
pub const fn with_afl(self, value: bool) -> Self
Advanced Fault Logging (not supported in emulator).
Bits: 3..4
Sourcepub const fn set_afl(&mut self, value: bool)
pub const fn set_afl(&mut self, value: bool)
Advanced Fault Logging (not supported in emulator).
Bits: 3..4
Sourcepub const fn set_afl_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_afl_checked(&mut self, value: bool) -> Result<(), ()>
Advanced Fault Logging (not supported in emulator).
Bits: 3..4
Sourcepub const fn with_rwbf_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_rwbf_checked(self, value: bool) -> Result<Self, ()>
Required Write-Buffer Flushing — 0 = not required.
Bits: 4..5
Sourcepub const fn with_rwbf(self, value: bool) -> Self
pub const fn with_rwbf(self, value: bool) -> Self
Required Write-Buffer Flushing — 0 = not required.
Bits: 4..5
Sourcepub const fn set_rwbf(&mut self, value: bool)
pub const fn set_rwbf(&mut self, value: bool)
Required Write-Buffer Flushing — 0 = not required.
Bits: 4..5
Sourcepub const fn set_rwbf_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_rwbf_checked(&mut self, value: bool) -> Result<(), ()>
Required Write-Buffer Flushing — 0 = not required.
Bits: 4..5
Sourcepub const fn with_plmr_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_plmr_checked(self, value: bool) -> Result<Self, ()>
Protected Low-Memory Region support.
Bits: 5..6
Sourcepub const fn with_plmr(self, value: bool) -> Self
pub const fn with_plmr(self, value: bool) -> Self
Protected Low-Memory Region support.
Bits: 5..6
Sourcepub const fn set_plmr_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_plmr_checked(&mut self, value: bool) -> Result<(), ()>
Protected Low-Memory Region support.
Bits: 5..6
Sourcepub const fn with_phmr_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_phmr_checked(self, value: bool) -> Result<Self, ()>
Protected High-Memory Region support.
Bits: 6..7
Sourcepub const fn with_phmr(self, value: bool) -> Self
pub const fn with_phmr(self, value: bool) -> Self
Protected High-Memory Region support.
Bits: 6..7
Sourcepub const fn set_phmr_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_phmr_checked(&mut self, value: bool) -> Result<(), ()>
Protected High-Memory Region support.
Bits: 6..7
Sourcepub const fn cm(&self) -> bool
pub const fn cm(&self) -> bool
Caching Mode — 0 = non-caching (walk tables on every access).
Bits: 7..8
Sourcepub const fn with_cm_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_cm_checked(self, value: bool) -> Result<Self, ()>
Caching Mode — 0 = non-caching (walk tables on every access).
Bits: 7..8
Sourcepub const fn with_cm(self, value: bool) -> Self
pub const fn with_cm(self, value: bool) -> Self
Caching Mode — 0 = non-caching (walk tables on every access).
Bits: 7..8
Sourcepub const fn set_cm(&mut self, value: bool)
pub const fn set_cm(&mut self, value: bool)
Caching Mode — 0 = non-caching (walk tables on every access).
Bits: 7..8
Sourcepub const fn set_cm_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_cm_checked(&mut self, value: bool) -> Result<(), ()>
Caching Mode — 0 = non-caching (walk tables on every access).
Bits: 7..8
Sourcepub const fn sagaw(&self) -> u8
pub const fn sagaw(&self) -> u8
Supported Adjusted Guest Address Widths (5 bits). Bit 0 (reserved), bit 1 = 39-bit (3-level), bit 2 = 48-bit (4-level), bit 3 = 57-bit (5-level), bit 4 (reserved).
Bits: 8..13
Sourcepub const fn with_sagaw_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_sagaw_checked(self, value: u8) -> Result<Self, ()>
Supported Adjusted Guest Address Widths (5 bits). Bit 0 (reserved), bit 1 = 39-bit (3-level), bit 2 = 48-bit (4-level), bit 3 = 57-bit (5-level), bit 4 (reserved).
Bits: 8..13
Sourcepub const fn with_sagaw(self, value: u8) -> Self
pub const fn with_sagaw(self, value: u8) -> Self
Supported Adjusted Guest Address Widths (5 bits). Bit 0 (reserved), bit 1 = 39-bit (3-level), bit 2 = 48-bit (4-level), bit 3 = 57-bit (5-level), bit 4 (reserved).
Bits: 8..13
Sourcepub const fn set_sagaw(&mut self, value: u8)
pub const fn set_sagaw(&mut self, value: u8)
Supported Adjusted Guest Address Widths (5 bits). Bit 0 (reserved), bit 1 = 39-bit (3-level), bit 2 = 48-bit (4-level), bit 3 = 57-bit (5-level), bit 4 (reserved).
Bits: 8..13
Sourcepub const fn set_sagaw_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_sagaw_checked(&mut self, value: u8) -> Result<(), ()>
Supported Adjusted Guest Address Widths (5 bits). Bit 0 (reserved), bit 1 = 39-bit (3-level), bit 2 = 48-bit (4-level), bit 3 = 57-bit (5-level), bit 4 (reserved).
Bits: 8..13
Sourcepub const fn mgaw(&self) -> u8
pub const fn mgaw(&self) -> u8
Maximum Guest Address Width (6 bits) — value is MGAW-1. 47 = 48-bit address width.
Bits: 16..22
Sourcepub const fn with_mgaw_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_mgaw_checked(self, value: u8) -> Result<Self, ()>
Maximum Guest Address Width (6 bits) — value is MGAW-1. 47 = 48-bit address width.
Bits: 16..22
Sourcepub const fn with_mgaw(self, value: u8) -> Self
pub const fn with_mgaw(self, value: u8) -> Self
Maximum Guest Address Width (6 bits) — value is MGAW-1. 47 = 48-bit address width.
Bits: 16..22
Sourcepub const fn set_mgaw(&mut self, value: u8)
pub const fn set_mgaw(&mut self, value: u8)
Maximum Guest Address Width (6 bits) — value is MGAW-1. 47 = 48-bit address width.
Bits: 16..22
Sourcepub const fn set_mgaw_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_mgaw_checked(&mut self, value: u8) -> Result<(), ()>
Maximum Guest Address Width (6 bits) — value is MGAW-1. 47 = 48-bit address width.
Bits: 16..22
Sourcepub const fn zlr(&self) -> bool
pub const fn zlr(&self) -> bool
Zero-Length Read — 1 = supports zero-length read requests.
Bits: 22..23
Sourcepub const fn with_zlr_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_zlr_checked(self, value: bool) -> Result<Self, ()>
Zero-Length Read — 1 = supports zero-length read requests.
Bits: 22..23
Sourcepub const fn with_zlr(self, value: bool) -> Self
pub const fn with_zlr(self, value: bool) -> Self
Zero-Length Read — 1 = supports zero-length read requests.
Bits: 22..23
Sourcepub const fn set_zlr(&mut self, value: bool)
pub const fn set_zlr(&mut self, value: bool)
Zero-Length Read — 1 = supports zero-length read requests.
Bits: 22..23
Sourcepub const fn set_zlr_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_zlr_checked(&mut self, value: bool) -> Result<(), ()>
Zero-Length Read — 1 = supports zero-length read requests.
Bits: 22..23
Sourcepub const fn fro(&self) -> u16
pub const fn fro(&self) -> u16
Fault Recording Register Offset (10 bits). Offset in 16-byte units from register base. FRO=0x12 → offset 0x120.
Bits: 24..34
Sourcepub const fn with_fro_checked(self, value: u16) -> Result<Self, ()>
pub const fn with_fro_checked(self, value: u16) -> Result<Self, ()>
Fault Recording Register Offset (10 bits). Offset in 16-byte units from register base. FRO=0x12 → offset 0x120.
Bits: 24..34
Sourcepub const fn with_fro(self, value: u16) -> Self
pub const fn with_fro(self, value: u16) -> Self
Fault Recording Register Offset (10 bits). Offset in 16-byte units from register base. FRO=0x12 → offset 0x120.
Bits: 24..34
Sourcepub const fn set_fro(&mut self, value: u16)
pub const fn set_fro(&mut self, value: u16)
Fault Recording Register Offset (10 bits). Offset in 16-byte units from register base. FRO=0x12 → offset 0x120.
Bits: 24..34
Sourcepub const fn set_fro_checked(&mut self, value: u16) -> Result<(), ()>
pub const fn set_fro_checked(&mut self, value: u16) -> Result<(), ()>
Fault Recording Register Offset (10 bits). Offset in 16-byte units from register base. FRO=0x12 → offset 0x120.
Bits: 24..34
Sourcepub const fn sllps(&self) -> u8
pub const fn sllps(&self) -> u8
Second-Level Large Page Support (4 bits). Bit 0 = 2MB (21-bit), bit 1 = 1GB (30-bit).
Bits: 34..38
Sourcepub const fn with_sllps_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_sllps_checked(self, value: u8) -> Result<Self, ()>
Second-Level Large Page Support (4 bits). Bit 0 = 2MB (21-bit), bit 1 = 1GB (30-bit).
Bits: 34..38
Sourcepub const fn with_sllps(self, value: u8) -> Self
pub const fn with_sllps(self, value: u8) -> Self
Second-Level Large Page Support (4 bits). Bit 0 = 2MB (21-bit), bit 1 = 1GB (30-bit).
Bits: 34..38
Sourcepub const fn set_sllps(&mut self, value: u8)
pub const fn set_sllps(&mut self, value: u8)
Second-Level Large Page Support (4 bits). Bit 0 = 2MB (21-bit), bit 1 = 1GB (30-bit).
Bits: 34..38
Sourcepub const fn set_sllps_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_sllps_checked(&mut self, value: u8) -> Result<(), ()>
Second-Level Large Page Support (4 bits). Bit 0 = 2MB (21-bit), bit 1 = 1GB (30-bit).
Bits: 34..38
Sourcepub const fn with_psi_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_psi_checked(self, value: bool) -> Result<Self, ()>
Page-Selective Invalidation support.
Bits: 39..40
Sourcepub const fn with_psi(self, value: bool) -> Self
pub const fn with_psi(self, value: bool) -> Self
Page-Selective Invalidation support.
Bits: 39..40
Sourcepub const fn set_psi_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_psi_checked(&mut self, value: bool) -> Result<(), ()>
Page-Selective Invalidation support.
Bits: 39..40
Sourcepub const fn nfr(&self) -> u8
pub const fn nfr(&self) -> u8
Number of Fault Recording registers minus 1 (8 bits). NFR=0 means 1 fault record.
Bits: 40..48
Sourcepub const fn with_nfr_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_nfr_checked(self, value: u8) -> Result<Self, ()>
Number of Fault Recording registers minus 1 (8 bits). NFR=0 means 1 fault record.
Bits: 40..48
Sourcepub const fn with_nfr(self, value: u8) -> Self
pub const fn with_nfr(self, value: u8) -> Self
Number of Fault Recording registers minus 1 (8 bits). NFR=0 means 1 fault record.
Bits: 40..48
Sourcepub const fn set_nfr(&mut self, value: u8)
pub const fn set_nfr(&mut self, value: u8)
Number of Fault Recording registers minus 1 (8 bits). NFR=0 means 1 fault record.
Bits: 40..48
Sourcepub const fn set_nfr_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_nfr_checked(&mut self, value: u8) -> Result<(), ()>
Number of Fault Recording registers minus 1 (8 bits). NFR=0 means 1 fault record.
Bits: 40..48
Sourcepub const fn mamv(&self) -> u8
pub const fn mamv(&self) -> u8
Maximum Address Mask Value (6 bits) for page-selective invalidation.
Bits: 48..54
Sourcepub const fn with_mamv_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_mamv_checked(self, value: u8) -> Result<Self, ()>
Maximum Address Mask Value (6 bits) for page-selective invalidation.
Bits: 48..54
Sourcepub const fn with_mamv(self, value: u8) -> Self
pub const fn with_mamv(self, value: u8) -> Self
Maximum Address Mask Value (6 bits) for page-selective invalidation.
Bits: 48..54
Sourcepub const fn set_mamv(&mut self, value: u8)
pub const fn set_mamv(&mut self, value: u8)
Maximum Address Mask Value (6 bits) for page-selective invalidation.
Bits: 48..54
Sourcepub const fn set_mamv_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_mamv_checked(&mut self, value: u8) -> Result<(), ()>
Maximum Address Mask Value (6 bits) for page-selective invalidation.
Bits: 48..54
Sourcepub const fn dwd(&self) -> bool
pub const fn dwd(&self) -> bool
DMA Write Draining — 1 = hardware drains write buffers.
Bits: 54..55
Sourcepub const fn with_dwd_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dwd_checked(self, value: bool) -> Result<Self, ()>
DMA Write Draining — 1 = hardware drains write buffers.
Bits: 54..55
Sourcepub const fn with_dwd(self, value: bool) -> Self
pub const fn with_dwd(self, value: bool) -> Self
DMA Write Draining — 1 = hardware drains write buffers.
Bits: 54..55
Sourcepub const fn set_dwd(&mut self, value: bool)
pub const fn set_dwd(&mut self, value: bool)
DMA Write Draining — 1 = hardware drains write buffers.
Bits: 54..55
Sourcepub const fn set_dwd_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_dwd_checked(&mut self, value: bool) -> Result<(), ()>
DMA Write Draining — 1 = hardware drains write buffers.
Bits: 54..55
Sourcepub const fn drd(&self) -> bool
pub const fn drd(&self) -> bool
DMA Read Draining — 1 = hardware drains read requests.
Bits: 55..56
Sourcepub const fn with_drd_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_drd_checked(self, value: bool) -> Result<Self, ()>
DMA Read Draining — 1 = hardware drains read requests.
Bits: 55..56
Sourcepub const fn with_drd(self, value: bool) -> Self
pub const fn with_drd(self, value: bool) -> Self
DMA Read Draining — 1 = hardware drains read requests.
Bits: 55..56
Sourcepub const fn set_drd(&mut self, value: bool)
pub const fn set_drd(&mut self, value: bool)
DMA Read Draining — 1 = hardware drains read requests.
Bits: 55..56
Sourcepub const fn set_drd_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_drd_checked(&mut self, value: bool) -> Result<(), ()>
DMA Read Draining — 1 = hardware drains read requests.
Bits: 55..56
Sourcepub const fn fl1gp(&self) -> bool
pub const fn fl1gp(&self) -> bool
First-Level 1GB page support (not used in legacy mode).
Bits: 56..57
Sourcepub const fn with_fl1gp_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_fl1gp_checked(self, value: bool) -> Result<Self, ()>
First-Level 1GB page support (not used in legacy mode).
Bits: 56..57
Sourcepub const fn with_fl1gp(self, value: bool) -> Self
pub const fn with_fl1gp(self, value: bool) -> Self
First-Level 1GB page support (not used in legacy mode).
Bits: 56..57
Sourcepub const fn set_fl1gp(&mut self, value: bool)
pub const fn set_fl1gp(&mut self, value: bool)
First-Level 1GB page support (not used in legacy mode).
Bits: 56..57
Sourcepub const fn set_fl1gp_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_fl1gp_checked(&mut self, value: bool) -> Result<(), ()>
First-Level 1GB page support (not used in legacy mode).
Bits: 56..57
Sourcepub const fn pi(&self) -> bool
pub const fn pi(&self) -> bool
Page-walk Incoherency — 1 = page walk results may be incoherent.
Bits: 59..60
Sourcepub const fn with_pi_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_pi_checked(self, value: bool) -> Result<Self, ()>
Page-walk Incoherency — 1 = page walk results may be incoherent.
Bits: 59..60
Sourcepub const fn with_pi(self, value: bool) -> Self
pub const fn with_pi(self, value: bool) -> Self
Page-walk Incoherency — 1 = page walk results may be incoherent.
Bits: 59..60