Skip to content

Commit

Permalink
Merge pull request #488 from Freax13/fix_indentation
Browse files Browse the repository at this point in the history
fix warnings
  • Loading branch information
phil-opp authored May 24, 2024
2 parents 5aff621 + a98580e commit 9a062df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
16 changes: 8 additions & 8 deletions src/registers/model_specific.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ mod x86_64 {
///
/// # Returns
/// - Field 1 (SYSRET): The CS selector is set to this field + 16. SS.Sel is set to
/// this field + 8. Because SYSRET always returns to CPL 3, the
/// RPL bits 1:0 should be initialized to 11b.
/// this field + 8. Because SYSRET always returns to CPL 3, the
/// RPL bits 1:0 should be initialized to 11b.
/// - Field 2 (SYSCALL): This field is copied directly into CS.Sel. SS.Sel is set to
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
/// 33:32 should be initialized to 00b.
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
/// 33:32 should be initialized to 00b.
#[inline]
pub fn read_raw() -> (u16, u16) {
let msr_value = unsafe { Self::MSR.read() };
Expand Down Expand Up @@ -398,11 +398,11 @@ mod x86_64 {
///
/// # Parameters
/// - sysret: The CS selector is set to this field + 16. SS.Sel is set to
/// this field + 8. Because SYSRET always returns to CPL 3, the
/// RPL bits 1:0 should be initialized to 11b.
/// this field + 8. Because SYSRET always returns to CPL 3, the
/// RPL bits 1:0 should be initialized to 11b.
/// - syscall: This field is copied directly into CS.Sel. SS.Sel is set to
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
/// 33:32 should be initialized to 00b.
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
/// 33:32 should be initialized to 00b.
///
/// # Safety
///
Expand Down
12 changes: 5 additions & 7 deletions src/structures/idt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ pub struct InterruptDescriptorTable {
/// is enabled.
/// - Execution of any legacy SSE instruction when `CR4.OSFXSR` is cleared to 0.
/// - Execution of any SSE instruction (uses `YMM`/`XMM` registers), or 64-bit media
/// instruction (uses `MMXTM` registers) when `CR0.EM` = 1.
/// instruction (uses `MMXTM` registers) when `CR0.EM` = 1.
/// - Execution of any SSE floating-point instruction (uses `YMM`/`XMM` registers) that
/// causes a numeric exception when `CR4.OSXMMEXCPT` = 0.
/// causes a numeric exception when `CR4.OSXMMEXCPT` = 0.
/// - Use of the `DR4` or `DR5` debug registers when `CR4.DE` = 1.
/// - Execution of `RSM` when not in `SMM` mode.
///
Expand Down Expand Up @@ -503,7 +503,7 @@ impl InterruptDescriptorTable {
///
/// - `self` is never destroyed.
/// - `self` always stays at the same memory location. It is recommended to wrap it in
/// a `Box`.
/// a `Box`.
///
#[cfg(all(feature = "instructions", target_arch = "x86_64"))]
#[inline]
Expand Down Expand Up @@ -1642,7 +1642,7 @@ mod test {

#[test]
fn entry_derive_test() {
fn foo(_: impl Clone + Copy + PartialEq + fmt::Debug) {}
fn foo(_: impl Copy + PartialEq + fmt::Debug) {}

foo(Entry::<HandlerFuncWithErrCode> {
pointer_low: 0,
Expand All @@ -1667,9 +1667,7 @@ mod test {
});

unsafe {
frame
.as_mut()
.update(|f| f.instruction_pointer = f.instruction_pointer + 2u64);
frame.as_mut().update(|f| f.instruction_pointer += 2u64);
}
}
}

0 comments on commit 9a062df

Please sign in to comment.