Skip to content

Commit 32ed8fc

Browse files
authored
Merge pull request #451 from rust-osdev/update-docs
Update docs to clarify new `set_handler_fn` behavior
2 parents fb5416c + 0c368ad commit 32ed8fc

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Changelog.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- [Add structures::gdt::Entry type](https://github.com/rust-osdev/x86_64/pull/380)
2323
- [Allow GDT to be loaded with shared reference](https://github.com/rust-osdev/x86_64/pull/381)
2424
- [seal off the `PageSize` trait](https://github.com/rust-osdev/x86_64/pull/404)
25+
- [idt: Fixup Options structure and cleanup set_handler_fn](https://github.com/rust-osdev/x86_64/pull/226)
2526

2627
## New Features
2728

@@ -34,10 +35,6 @@
3435
- [gdt: Check that MAX is in range](https://github.com/rust-osdev/x86_64/pull/365)
3536
- [fix `Page::from_page_table_indices`](https://github.com/rust-osdev/x86_64/pull/398)
3637

37-
## Other improvements
38-
39-
- [idt: Fixup Options structure and cleanup set_handler_fn](https://github.com/rust-osdev/x86_64/pull/226)
40-
4138
# 0.14.11 – 2023-09-15
4239

4340
## New Features

src/structures/idt.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -771,10 +771,12 @@ impl<F> Entry<F> {
771771
}
772772
}
773773

774-
/// Set the handler address for the IDT entry and sets the present bit.
775-
///
776-
/// For the code selector field, this function uses the code segment selector currently
777-
/// active in the CPU.
774+
/// Sets the handler address for the IDT entry and sets the following defaults:
775+
/// - The code selector is the code segment currently active in the CPU
776+
/// - The present bit is set
777+
/// - Interrupts are disabled on handler invocation
778+
/// - The privilege level (DPL) is [`PrivilegeLevel::Ring0`]
779+
/// - No IST is configured (existing stack will be used)
778780
///
779781
/// The function returns a mutable reference to the entry's options that allows
780782
/// further customization.
@@ -814,10 +816,12 @@ impl<F> Entry<F> {
814816

815817
#[cfg(feature = "instructions")]
816818
impl<F: HandlerFuncType> Entry<F> {
817-
/// Set the handler function for the IDT entry and sets the present bit.
818-
///
819-
/// For the code selector field, this function uses the code segment selector currently
820-
/// active in the CPU.
819+
/// Sets the handler function for the IDT entry and sets the following defaults:
820+
/// - The code selector is the code segment currently active in the CPU
821+
/// - The present bit is set
822+
/// - Interrupts are disabled on handler invocation
823+
/// - The privilege level (DPL) is [`PrivilegeLevel::Ring0`]
824+
/// - No IST is configured (existing stack will be used)
821825
///
822826
/// The function returns a mutable reference to the entry's options that allows
823827
/// further customization.

0 commit comments

Comments
 (0)