Skip to content

Update docs to clarify new set_handler_fn behavior #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [Add structures::gdt::Entry type](https://github.com/rust-osdev/x86_64/pull/380)
- [Allow GDT to be loaded with shared reference](https://github.com/rust-osdev/x86_64/pull/381)
- [seal off the `PageSize` trait](https://github.com/rust-osdev/x86_64/pull/404)
- [idt: Fixup Options structure and cleanup set_handler_fn](https://github.com/rust-osdev/x86_64/pull/226)

## New Features

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

## Other improvements

- [idt: Fixup Options structure and cleanup set_handler_fn](https://github.com/rust-osdev/x86_64/pull/226)

# 0.14.11 – 2023-09-15

## New Features
Expand Down
20 changes: 12 additions & 8 deletions src/structures/idt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,12 @@ impl<F> Entry<F> {
}
}

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

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