We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Display
AsidOutOfRangeError
1 parent 861bbbf commit 3ecd11cCopy full SHA for 3ecd11c
src/instructions/tlb.rs
@@ -10,7 +10,7 @@ use crate::{
10
},
11
PrivilegeLevel, VirtAddr,
12
};
13
-use core::{arch::asm, cmp, convert::TryFrom};
+use core::{arch::asm, cmp, convert::TryFrom, fmt};
14
15
/// Invalidate the given address in the TLB using the `invlpg` instruction.
16
#[inline]
@@ -355,6 +355,16 @@ pub struct AsidOutOfRangeError {
355
nasid: u32,
356
}
357
358
+impl fmt::Display for AsidOutOfRangeError {
359
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
360
+ write!(
361
+ f,
362
+ "{} is out of the range of available ASIDS ({})",
363
+ self.asid, self.nasid
364
+ )
365
+ }
366
+}
367
+
368
369
unsafe fn flush_broadcast<S>(
370
va_and_count: Option<(Page<S>, u16)>,
0 commit comments