Skip to content

Commit 87d1eb1

Browse files
mrjbomFreax13
authored andcommitted
More precise comments in TaskStateSegment
1 parent 3943178 commit 87d1eb1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/structures/tss.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ use core::mem::size_of;
55

66
/// In 64-bit mode the TSS holds information that is not
77
/// directly related to the task-switch mechanism,
8-
/// but is used for finding kernel level stack
9-
/// if interrupts arrive while in kernel mode.
8+
/// but is used for stack switching when interrupt occurs.
109
#[derive(Debug, Clone, Copy)]
1110
#[repr(C, packed(4))]
1211
pub struct TaskStateSegment {
1312
reserved_1: u32,
1413
/// The full 64-bit canonical forms of the stack pointers (RSP) for privilege levels 0-2.
14+
/// The stack pointers used to load the stack when a privilege level change occurs from a lower privilege level to a higher one.
1515
pub privilege_stack_table: [VirtAddr; 3],
1616
reserved_2: u64,
1717
/// The full 64-bit canonical forms of the interrupt stack table (IST) pointers.
18+
/// The stack pointers used to load the stack when an entry in the Interrupt Descriptor Table has an IST value other than 0.
1819
pub interrupt_stack_table: [VirtAddr; 7],
1920
reserved_3: u64,
2021
reserved_4: u16,

0 commit comments

Comments
 (0)