Crate generic_timer_aarch64
source ·Expand description
Support for aarch64’s generic timer and system counter.
+Crate generic_timer_aarch64
source ·Expand description
Support for aarch64’s generic timer and system counter.
Docs: https://developer.arm.com/documentation/102379/latest/
Function interrupts::deregister_interrupt
source · pub fn deregister_interrupt(
+deregister_interrupt in interrupts - Rust Function interrupts::deregister_interrupt
source · pub fn deregister_interrupt(
interrupt_num: u8,
func: InterruptHandler
) -> Result<(), &'static str>
Expand description
Deregisters an interrupt handler, making it available to the rest of the system again.
diff --git a/doc/interrupts/fn.eoi.html b/doc/interrupts/fn.eoi.html
index 385ac69e86..5ce06ed8be 100644
--- a/doc/interrupts/fn.eoi.html
+++ b/doc/interrupts/fn.eoi.html
@@ -1,7 +1,7 @@
-eoi in interrupts - Rust Function interrupts::eoi
source · pub fn eoi(irq: Option<u8>)
Expand description
Send an end of interrupt signal, notifying the interrupt chip that
+
eoi in interrupts - Rust Function interrupts::eoi
source · pub fn eoi(irq: InterruptNumber)
Expand description
Send an end of interrupt signal, notifying the interrupt chip that
the given interrupt request irq
has been serviced.
This function supports all types of interrupt chips – APIC, x2apic, PIC –
and will perform the correct EOI operation based on which chip is currently active.
-The irq
argument is only used if the PIC
chip is active,
-but it doesn’t hurt to always provide it.
+The irq
argument is only used if the legacy PIC
chip is active on this system;
+newer APIC chips do not use this.
\ No newline at end of file
diff --git a/doc/interrupts/fn.init.html b/doc/interrupts/fn.init.html
index 23b5aaa69f..310d0f22e7 100644
--- a/doc/interrupts/fn.init.html
+++ b/doc/interrupts/fn.init.html
@@ -1,4 +1,4 @@
-init in interrupts - Rust Function interrupts::init
source · pub fn init(
+init in interrupts - Rust Function interrupts::init
source · pub fn init(
double_fault_stack_top_unusable: VirtualAddress,
privilege_stack_top_unusable: VirtualAddress
) -> Result<&'static LockedIdt, &'static str>
Expand description
Initializes the interrupt subsystem and sets up an initial Interrupt Descriptor Table (IDT).
diff --git a/doc/interrupts/fn.init_ap.html b/doc/interrupts/fn.init_ap.html
index e4143ec129..225d9829d0 100644
--- a/doc/interrupts/fn.init_ap.html
+++ b/doc/interrupts/fn.init_ap.html
@@ -1,4 +1,4 @@
-init_ap in interrupts - Rust Function interrupts::init_ap
source · pub fn init_ap(
+init_ap in interrupts - Rust Function interrupts::init_ap
source · pub fn init_ap(
cpu_id: CpuId,
double_fault_stack_top_unusable: VirtualAddress,
privilege_stack_top_unusable: VirtualAddress
diff --git a/doc/interrupts/fn.is_exception_handler_with_error_code.html b/doc/interrupts/fn.is_exception_handler_with_error_code.html
index 7aceef5fc0..78b79bb131 100644
--- a/doc/interrupts/fn.is_exception_handler_with_error_code.html
+++ b/doc/interrupts/fn.is_exception_handler_with_error_code.html
@@ -1,4 +1,4 @@
-is_exception_handler_with_error_code in interrupts - Rust Function interrupts::is_exception_handler_with_error_code
source · pub fn is_exception_handler_with_error_code(address: u64) -> bool
Expand description
Returns true
if the given address is the exception handler in the current IDT
+
is_exception_handler_with_error_code in interrupts - Rust Function interrupts::is_exception_handler_with_error_code
source · pub fn is_exception_handler_with_error_code(address: u64) -> bool
Expand description
Returns true
if the given address is the exception handler in the current IDT
for any exception in which the CPU pushes an error code onto the stack.
On x86, only these exceptions cause the CPU to push error codes: 8, 10, 11, 12, 13, 14, 17, 29, 30.
Obtains a lock on the global IDT
instance.
diff --git a/doc/interrupts/fn.register_interrupt.html b/doc/interrupts/fn.register_interrupt.html
index 5de3208ebc..6ae96ed9be 100644
--- a/doc/interrupts/fn.register_interrupt.html
+++ b/doc/interrupts/fn.register_interrupt.html
@@ -1,4 +1,4 @@
-register_interrupt in interrupts - Rust Function interrupts::register_interrupt
source · pub fn register_interrupt(
+register_interrupt in interrupts - Rust Function interrupts::register_interrupt
source · pub fn register_interrupt(
interrupt_num: u8,
func: InterruptHandler
) -> Result<(), usize>
Expand description
Registers an interrupt handler at the given IRQ interrupt number.
diff --git a/doc/interrupts/fn.register_msi_interrupt.html b/doc/interrupts/fn.register_msi_interrupt.html
index a3c90223ab..435277dc9e 100644
--- a/doc/interrupts/fn.register_msi_interrupt.html
+++ b/doc/interrupts/fn.register_msi_interrupt.html
@@ -1,4 +1,4 @@
-register_msi_interrupt in interrupts - Rust Function interrupts::register_msi_interrupt
source · pub fn register_msi_interrupt(
+register_msi_interrupt in interrupts - Rust Function interrupts::register_msi_interrupt
source · pub fn register_msi_interrupt(
func: InterruptHandler
) -> Result<u8, &'static str>
Expand description
Allocates and returns an unused interrupt number and sets its handler function.
Returns an error if there are no unused interrupt number, which is highly unlikely.
diff --git a/doc/interrupts/macro.interrupt_handler.html b/doc/interrupts/macro.interrupt_handler.html
index 39c3bb2ce9..2ef562f48d 100644
--- a/doc/interrupts/macro.interrupt_handler.html
+++ b/doc/interrupts/macro.interrupt_handler.html
@@ -1,48 +1,45 @@
-interrupt_handler in interrupts - Rust Macro interrupts::interrupt_handler
source · macro_rules! interrupt_handler {
+interrupt_handler in interrupts - Rust Macro interrupts::interrupt_handler
source · macro_rules! interrupt_handler {
+ ($name:ident, _, $stack_frame:ident, $code:block) => { ... };
($name:ident, $x86_64_eoi_param:expr, $stack_frame:ident, $code:block) => { ... };
}
Expand description
Macro which helps writing cross-platform interrupt handlers.
Arguments
-$name
: the name of the function
-$x86_64_eoi_param
: Some(irq_num)
if this interrupt can be handled while
-the PIC chip is active and the handler returns HandlerDidNotSendEoi
; None
otherwise.
-Ignored on aarch64
. See eoi
for more information. If the IRQ number isn’t
-constant and this interrupt can happen with the PIC chip active, call eoi
-manually as in Example 2.
+$name
: the name of the interrupt handler function.
+$x86_64_eoi_param
: one of two possible values:
+
+- the literal underscore character
_
, used to indicate that this value isn’t used
+and the interrupt handler does not care about its value.
+
+- This is useful for interrupt handlers that are aarch64 specific
+or can only occur on x86_64’s newer APIC interrupt chips, which do not require
+specifying a specific IRQ number when sending an end of interrupt (EOI).
+
+
+- a valid
InterruptNumber
if this interrupt may be handled by the legacy PIC chip
+on x86_64, which is used if the handler returns HandlerDidNotSendEoi
.
+
+
$stack_frame
: Name for the InterruptStackFrame
parameter.
-$code
: The code for the interrupt handler itself. It must return an crate::EoiBehaviour
enum.
+$code
: The code for the interrupt handler itself, which must return crate::EoiBehaviour
.
-Example 1
+Example 1
This simply logs the stack frame to the console.
-ⓘinterrupt_handler!(my_int_0x29_handler, Some(interrupts::IRQ_BASE_OFFSET + 0x9), stack_frame, {
+ⓘinterrupt_handler!(my_int_0x29_handler, interrupts::IRQ_BASE_OFFSET + 0x9, stack_frame, {
trace!("my_int_0x29_handler running! stack frame: {:?}", stack_frame);
- // loop {}
-
- EoiBehaviour::HandlerDidNotSendEoi
+ EoiBehaviour::HandlerDidNotSendEoi
});
-Example 2
-Here’s how eoi
can be called manually. Note how we can pass None
as
-$x86_64_eoi_param
, since we call eoi
in the handler.
+Example 2
+Here’s how eoi
can be called manually. Note how we use _
for the second parameter
+in the macro (the $x86_64_eoi_param
), since we call eoi
in the handler.
-ⓘinterrupt_handler!(my_int_0x29_handler, None, stack_frame, {
+ⓘinterrupt_handler!(my_int_0x29_handler, _, stack_frame, {
trace!("my_int_0x29_handler running! stack frame: {:?}", stack_frame);
- #[cfg(target_arch = "x86_64")]
+ // Call `eoi` manually.
let irq_num = 0x29;
-
- #[cfg(target_arch = "aarch64")]
- let irq_num = 0x29;
-
- // Calling `eoi` manually:
- {
- #[cfg(target_arch = "x86_64")]
- eoi(Some(irq_num));
-
- #[cfg(target_arch = "aarch64")]
- eoi(irq_num);
- }
+ eoi(irq_num);
EoiBehaviour::HandlerSentEoi
});
diff --git a/doc/scheduler/index.html b/doc/scheduler/index.html
index 47a42c80a1..89cc40355a 100644
--- a/doc/scheduler/index.html
+++ b/doc/scheduler/index.html
@@ -1,4 +1,4 @@
-scheduler - Rust Expand description
Offers the ability to control or configure the active task scheduling policy.
+scheduler - Rust Expand description
Offers the ability to control or configure the active task scheduling policy.
What is and isn’t in this crate?
This crate also defines the timer interrupt handler used for preemptive
task switching on each CPU. In init()
, it registers that handler
diff --git a/doc/search-index.js b/doc/search-index.js
index fa57c8aeff..311a56e03a 100644
--- a/doc/search-index.js
+++ b/doc/search-index.js
@@ -70,7 +70,7 @@ var searchIndex = JSON.parse('{\
"idle":{"doc":"CPU idle management.","t":"DLLLMMLLFLMMMLLL","n":["IdleState","borrow","borrow_mut","clone","eax","exit_latency","fmt","from","idle_states","into","name","target_residency","tlb_flushed","try_from","try_into","type_id"],"q":[[0,"idle"]],"d":["A CPU idle state.","","","","The value of EAX when calling MWAIT to enter the idle …","The amount of time it takes for the CPU to exit the idle …","","Returns the argument unchanged.","","Calls U::from(self)
.","The name of the idle state.","The amount of time the CPU must spend in the idle state to …","Whether entering the state flushes the TLB.","","",""],"i":[0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1],"f":[0,[[]],[[]],[1,1],0,0,[[1,2],3],[[]],[[],[[5,[[4,[1]]]]]],[[]],0,0,0,[[],6],[[],6],[[],7]],"c":[],"p":[[3,"IdleState"],[3,"Formatter"],[6,"Result"],[15,"slice"],[4,"Option"],[4,"Result"],[3,"TypeId"]]},\
"intel_ethernet":{"doc":"Definitions of descriptor types and type aliases for NIC …","t":"ADDDDRRIRRRRRRRRRRRILLLLLLLLMMMMMMKLLMKLLMLLLLLLLLLLLLLLLLLLLMKKLLLLLLLLKLLMMMMMMMKLLKLLKLLMMLLLLLLLLLLLLMMKLL","n":["descriptors","AdvancedRxDescriptor","AdvancedTxDescriptor","LegacyRxDescriptor","LegacyTxDescriptor","RX_STATUS_DD","RX_STATUS_EOP","RxDescriptor","TX_CMD_DEXT","TX_CMD_EOP","TX_CMD_IC","TX_CMD_IDE","TX_CMD_IFCS","TX_CMD_RPS","TX_CMD_RS","TX_CMD_VLE","TX_DTYP_ADV","TX_PAYLEN_SHIFT","TX_STATUS_DD","TxDescriptor","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","checksum","cmd","cso","css","data_len","dcmd","descriptor_done","descriptor_done","descriptor_done","dtyp_mac_rsv","end_of_packet","end_of_packet","end_of_packet","errors","fmt","fmt","fmt","fmt","from","from","from","from","get_ext_error","get_ext_status","get_fdf_id","get_hdr_len","get_packet_type","get_pkt_len","get_rsccnt","get_rss_hash","get_rss_type","get_sph","get_vlan_tag","header_buffer_address","init","init","init","init","init","init","into","into","into","into","length","length","length","length","length","packet_buffer_address","packet_buffer_address","paylen_popts_cc_idx_sta","phys_addr","phys_addr","reset_status","reset_status","reset_status","send","send","send","set_packet_address","set_packet_address","set_packet_address","status","status","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","vlan","vlan","wait_for_packet_tx","wait_for_packet_tx","wait_for_packet_tx"],"q":[[0,"intel_ethernet"],[1,"intel_ethernet::descriptors"]],"d":["The different descriptor types used by Intel NICs. Usually …","Advanced Receive Descriptor used in the Ixgbe driver. It …","Advanced Transmit Descriptor used by the ixgbe
NIC driver.","This struct is a Legacy Receive Descriptor. The driver …","This struct is a Legacy Transmit Descriptor. It’s the …","Rx Status: Descriptor Done","Rx Status: End of Packet","A trait for the minimum set of functions needed to receive …","Tx Command: Descriptor Extension (Advanced format)","Tx Command: End of Packet","Tx Command: Insert Checksum","Tx Command: Interrupt Delay Enable","Tx Command: Insert MAC FCS","Tx Command: Report Packet Sent","Tx Command: Report Status","Tx Command: VLAN Packet Enable","Tx Descriptor Type: advanced","Tx Descriptor paylen shift The paylen is located at bit 46 …","Tx Status: descriptor Done","A trait for the minimum set of functions needed to …","","","","","","","","","Checksum value of the packet after the IP header till the …","Command bits","Checksum offset: where to insert the checksum from the …","Checksum start: where to begin computing the checksum, if …","Length of data buffer","Command bits","Returns true if the descriptor has a received packet …","","","A multi-part field:","Returns true if the descriptor’s packet buffer is the …","","","Receive errors","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Write Back mode function for the Advanced Receive …","Starting physcal address of the receive buffer for the …","Initializes a receive descriptor by clearing its status …","Initializes a transmit descriptor by clearing all of its …","","","","","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","The length of the packet in the descriptor’s packet …","","","Length of the transmit buffer in bytes","Length of the receive buffer in bytes","Starting physcal address of the receive buffer for the …","Starting physical address of the receive buffer for the …","A multi-part field:","The starting physical address of the transmit buffer","The starting physical address of the receive buffer","Clears the status bits of the descriptor.","","","Updates the transmit descriptor to send the packet. We …","","","Updates the descriptor’s physical address.","","","Status bits","Status bits which tell if the descriptor has been used","","","","","","","","","","","","","Vlan tags ","Vlan tags","Polls the Descriptor Done bit until the packet has been …","",""],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,2,3,7,4,2,3,7,2,4,4,4,7,7,13,2,3,7,13,2,3,2,4,2,3,7,4,2,3,7,3,3,3,3,3,3,3,3,3,3,3,3,13,14,4,2,3,7,4,2,3,7,13,2,3,4,2,3,7,7,4,2,13,2,3,14,4,7,13,2,3,4,2,4,2,3,7,4,2,3,7,4,2,3,7,4,2,14,4,7],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,[[],1],[2,1],[3,1],0,[[],1],[2,1],[3,1],0,[[4,5],6],[[2,5],6],[[3,5],6],[[7,5],6],[[]],[[]],[[]],[[]],[3,8],[3,8],[3,8],[3,8],[3,8],[3,8],[3,8],[3,8],[3,8],[3,1],[3,8],0,[9],[[]],[4],[[2,9]],[[3,9]],[7],[[]],[[]],[[]],[[]],[[],8],[2,8],[3,8],0,0,0,0,0,0,0,[[]],[2],[3],[[9,10]],[[4,9,10]],[[7,9,10]],[9],[[2,9]],[[3,9]],0,0,[[],11],[[],11],[[],11],[[],11],[[],11],[[],11],[[],11],[[],11],[[],12],[[],12],[[],12],[[],12],0,0,[[]],[4],[7]],"c":[],"p":[[15,"bool"],[3,"LegacyRxDescriptor"],[3,"AdvancedRxDescriptor"],[3,"LegacyTxDescriptor"],[3,"Formatter"],[6,"Result"],[3,"AdvancedTxDescriptor"],[15,"u64"],[3,"PhysicalAddress"],[15,"u16"],[4,"Result"],[3,"TypeId"],[8,"RxDescriptor"],[8,"TxDescriptor"]]},\
"interrupt_controller":{"doc":"Support for accessing interupt controllers across multiple …","t":"NEGDIDDNDIDDLLLLLLLLLLLLLLLLLLLLLLLLKLKLLLLLLLLLLLLLLKLKKLLFLLLLLLLKLKLLLLLLLLLLLLLLLLLLLLLLLLLLLKL","n":["AllOtherCpus","InterruptDestination","InterruptNumber","LocalInterruptController","LocalInterruptControllerApi","LocalInterruptControllerId","Priority","SpecificCpu","SystemInterruptController","SystemInterruptControllerApi","SystemInterruptControllerId","SystemInterruptControllerVersion","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","enable_local_timer_interrupt","enable_local_timer_interrupt","end_of_interrupt","end_of_interrupt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","get","get_destination","get_destination","id","id","id","id","init","into","into","into","into","into","into","into","send_ipi","send_ipi","set_destination","set_destination","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","version","version"],"q":[[0,"interrupt_controller"]],"d":["","The CPU where an interrupt should be handled, as well as …","","Struct representing a per-CPU interrupt controller chip.","Functionality provided by local interrupt controllers, …","","","","Structure representing a top-level/system-wide interrupt …","Functionality provided by system-wide interrupt …","","","","","","","","","","","","","","","","","","","","","","","","","","","Enables or disables the local timer interrupt for this …","","Tells this local interrupt controller that the interrupt …","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns a reference to the current CPU’s local interrupt …","Returns the destination(s) that the given interrupt
is …","","Returns the unique ID of this system-wide interrupt …","Returns the unique ID of this local interrupt controller.","","","Initializes the interrupt controller(s) on this system.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Sends an inter-processor interrupt from this local …","","Routes the given interrupt
to the given destination
with …","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the version ID of this system-wide interrupt …",""],"i":[5,0,0,0,0,0,0,5,0,0,0,0,14,7,1,2,3,4,5,14,7,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,18,7,18,7,1,2,3,4,5,14,7,1,2,3,4,5,7,19,14,19,18,14,7,0,14,7,1,2,3,4,5,18,7,19,14,1,2,3,4,5,14,7,1,2,3,4,5,14,7,1,2,3,4,5,14,7,1,2,3,4,5,19,14],"f":[0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[1,1],[2,2],[3,3],[4,4],[5,5],[[]],[[]],[[]],[[]],[[]],[6],[[7,6]],[8],[[7,8]],[[1,9],10],[[2,9],10],[[3,9],10],[[4,9],10],[[5,9],10],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[11,[7]]]],[8,[[13,[12]]]],[[14,8],[[13,[12]]]],[[],2],[[],3],[14,2],[7,3],[15,[[13,[12]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[8,5]],[[7,8,5]],[[8,[11,[16]],4],[[13,[12]]]],[[14,8,[11,[16]],4],[[13,[12]]]],[[]],[[]],[[]],[[]],[[]],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],13],[[],17],[[],17],[[],17],[[],17],[[],17],[[],17],[[],17],[[],1],[14,1]],"c":[],"p":[[3,"SystemInterruptControllerVersion"],[3,"SystemInterruptControllerId"],[3,"LocalInterruptControllerId"],[3,"Priority"],[4,"InterruptDestination"],[15,"bool"],[3,"LocalInterruptController"],[6,"InterruptNumber"],[3,"Formatter"],[6,"Result"],[4,"Option"],[15,"str"],[4,"Result"],[3,"SystemInterruptController"],[6,"MmiRef"],[3,"CpuId"],[3,"TypeId"],[8,"LocalInterruptControllerApi"],[8,"SystemInterruptControllerApi"]]},\
-"interrupts":{"doc":"Basic interrupt handling structures and simple handler …","t":"RENNHRGGDLLLLLLFFLLLLLFFOOLLFFFLLLLLL","n":["CPU_LOCAL_TIMER_IRQ","EoiBehaviour","HandlerDidNotSendEoi","HandlerSentEoi","IDT","IRQ_BASE_OFFSET","InterruptHandler","InterruptNumber","InterruptStackFrame","as_mut","borrow","borrow","borrow_mut","borrow_mut","deref","deregister_interrupt","eoi","eq","fmt","fmt","from","from","init","init_ap","interrupt_handler","interrupt_handler","into","into","is_exception_handler_with_error_code","register_interrupt","register_msi_interrupt","try_from","try_from","try_into","try_into","type_id","type_id"],"q":[[0,"interrupts"]],"d":["The IRQ number reserved for CPU-local timer interrupts, …","","The interrupt handler hasn’t called the eoi
function, in …","The interrupt handler has called the eoi
function.","The single system-wide Interrupt Descriptor Table (IDT).","The offset added to the first IRQ: 0x20
.","A handler function for an interrupt or an exception …","","Wrapper type for the interrupt stack frame pushed by the …","Gives mutable access to the contents of the interrupt …","","","","","","Deregisters an interrupt handler, making it available to …","Send an end of interrupt signal, notifying the interrupt …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Initializes the interrupt subsystem and sets up an initial …","Similar to init()
, but for APs to call after the BSP has …","Macro which helps writing cross-platform interrupt …","Macro which helps writing cross-platform interrupt …","Calls U::from(self)
.","Calls U::from(self)
.","Returns true
if the given address is the exception handler …","Registers an interrupt handler at the given IRQ interrupt …","Allocates and returns an unused interrupt number and sets …","","","","","",""],"i":[0,0,10,10,0,0,0,0,0,1,10,1,10,1,1,0,0,10,10,1,10,1,0,0,0,0,10,1,0,0,0,10,1,10,1,10,1],"f":[0,0,0,0,0,0,0,0,0,[1,[[4,[2,3]]]],[[]],[[]],[[]],[[]],[1],[[5,6],[[8,[7]]]],[[[9,[5]]]],[[10,10],11],[[10,12],13],[[1,12],[[8,[14]]]],[[]],[[]],[[15,15],[[8,[16,7]]]],[[17,15,15],[[8,[16,7]]]],0,0,[[]],[[]],[18,11],[[5,6],[[8,[19]]]],[6,[[8,[5,7]]]],[[],8],[[],8],[[],8],[[],8],[[],20],[[],20]],"c":[],"p":[[3,"InterruptStackFrame"],[3,"InterruptStackFrameValue"],[3,"ReadWrite"],[3,"Volatile"],[15,"u8"],[6,"InterruptHandler"],[15,"str"],[4,"Result"],[4,"Option"],[4,"EoiBehaviour"],[15,"bool"],[3,"Formatter"],[6,"Result"],[3,"Error"],[3,"VirtualAddress"],[3,"LockedIdt"],[3,"CpuId"],[15,"u64"],[15,"usize"],[3,"TypeId"]]},\
+"interrupts":{"doc":"Basic interrupt handling structures and simple handler …","t":"RENNHRGGDLLLLLLFFLLLLLFFOOLLFFFLLLLLL","n":["CPU_LOCAL_TIMER_IRQ","EoiBehaviour","HandlerDidNotSendEoi","HandlerSentEoi","IDT","IRQ_BASE_OFFSET","InterruptHandler","InterruptNumber","InterruptStackFrame","as_mut","borrow","borrow","borrow_mut","borrow_mut","deref","deregister_interrupt","eoi","eq","fmt","fmt","from","from","init","init_ap","interrupt_handler","interrupt_handler","into","into","is_exception_handler_with_error_code","register_interrupt","register_msi_interrupt","try_from","try_from","try_into","try_into","type_id","type_id"],"q":[[0,"interrupts"]],"d":["The IRQ number reserved for CPU-local timer interrupts, …","","The interrupt handler hasn’t called the eoi
function, in …","The interrupt handler has called the eoi
function.","The single system-wide Interrupt Descriptor Table (IDT).","The offset added to the first IRQ: 0x20
.","A handler function for an interrupt or an exception …","","Wrapper type for the interrupt stack frame pushed by the …","Gives mutable access to the contents of the interrupt …","","","","","","Deregisters an interrupt handler, making it available to …","Send an end of interrupt signal, notifying the interrupt …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Initializes the interrupt subsystem and sets up an initial …","Similar to init()
, but for APs to call after the BSP has …","Macro which helps writing cross-platform interrupt …","Macro which helps writing cross-platform interrupt …","Calls U::from(self)
.","Calls U::from(self)
.","Returns true
if the given address is the exception handler …","Registers an interrupt handler at the given IRQ interrupt …","Allocates and returns an unused interrupt number and sets …","","","","","",""],"i":[0,0,10,10,0,0,0,0,0,1,10,1,10,1,1,0,0,10,10,1,10,1,0,0,0,0,10,1,0,0,0,10,1,10,1,10,1],"f":[0,0,0,0,0,0,0,0,0,[1,[[4,[2,3]]]],[[]],[[]],[[]],[[]],[1],[[5,6],[[8,[7]]]],[9],[[10,10],11],[[10,12],13],[[1,12],[[8,[14]]]],[[]],[[]],[[15,15],[[8,[16,7]]]],[[17,15,15],[[8,[16,7]]]],0,0,[[]],[[]],[18,11],[[5,6],[[8,[19]]]],[6,[[8,[5,7]]]],[[],8],[[],8],[[],8],[[],8],[[],20],[[],20]],"c":[],"p":[[3,"InterruptStackFrame"],[3,"InterruptStackFrameValue"],[3,"ReadWrite"],[3,"Volatile"],[15,"u8"],[6,"InterruptHandler"],[15,"str"],[4,"Result"],[6,"InterruptNumber"],[4,"EoiBehaviour"],[15,"bool"],[3,"Formatter"],[6,"Result"],[3,"Error"],[3,"VirtualAddress"],[3,"LockedIdt"],[3,"CpuId"],[15,"u64"],[15,"usize"],[3,"TypeId"]]},\
"io":{"doc":"Traits and types for expressing I/O transfers of both …","t":"DIIIIDDIDNEIDNDDNDMKLLLLLLLFLLLLLLLLLLLLLLLLLLMMLLLLLKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLKLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLKLLLLLLLL","n":["BlockByteTransfer","BlockIo","BlockReader","BlockWriter","ByteReader","ByteReaderWrapper","ByteReaderWriterWrapper","ByteWriter","ByteWriterWrapper","InvalidInput","IoError","KnownLength","LockableIo","Other","Reader","ReaderWriter","TimedOut","Writer","block_range","block_size","block_size","block_size","block_size","block_size","block_size","block_size","block_size","blocks_from_bytes","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","byte_range_absolute","bytes_in_block_range","clone","clone_into","deref","deref","deref_mut","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","flush","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","into","into","into","len","len","len","len","len","len","len","len","new","new","new","read","read","read","read","read_at","read_at","read_at","read_at","read_at","read_at","read_at","read_blocks","read_blocks","read_blocks","read_blocks","read_blocks","read_blocks","read_blocks","seek","seek","seek","seek","seek","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","write","write","write","write","write_at","write_at","write_at","write_at","write_at","write_at","write_at","write_blocks","write_blocks","write_blocks","write_blocks","write_blocks","write_blocks","write_blocks","write_str","write_str"],"q":[[0,"io"]],"d":["Describes an operation for performing byte-wise I/O on a …","A parent trait used to specify the block size (in bytes) …","A trait that represents an I/O stream (e.g., an I/O …","A trait that represents an I/O stream (e.g., an I/O …","A trait that represents an I/O stream that can be read …","A wrapper struct that implements a byte-wise reader atop a …","A wrapper struct that implements a byte-wise reader and …","A trait that represents an I/O stream that can be written …","A wrapper struct that implements a byte-wise writer atop a …","An input parameter or argument was incorrect or invalid.","Errors that can be returned from I/O operations.","A trait that represents an I/O stream that has a known …","A struct that holds an IO object wrapped in a Lockable
…","A miscellaneous error occurred.","A stateful reader that keeps track of its current offset …","A readable and writable “stateful” I/O stream that …","The I/O operation timed out and was canceled.","A stateful writer that keeps track of its current offset …","The range of blocks to transfer.","Returns the size in bytes of a single block (i.e., sector),","","","","","","","","Calculates block-wise bounds for an I/O transfer based on …","","","","","","","","","","","","","","","","","","","The byte-wise range specified in absolute bytes from the …","The range of bytes relative to the blocks specified by …","","","","","","Flushes this entire writer’s output stream, ensuring …","Flushes this writer’s output stream, ensuring all …","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Calls U::from(self)
.","Returns the length (size in bytes) of this I/O stream or …","","","","","","","","Creates a new ReaderWriter
with an initial offset of 0.","Creates a new Reader
with an initial offset of 0.","Creates a new Writer
with an initial offset of 0.","","","","","Reads bytes of data from this reader into the given buffer
.","","","","","","","Reads blocks of data from this reader into the given buffer
…","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Writes bytes of data from the given buffer
to this writer.","","","","","","","Writes blocks of data from the given buffer
to this writer.","","","","","","","",""],"i":[0,0,0,0,0,0,0,0,0,20,0,0,0,20,0,0,20,0,16,7,3,5,6,8,9,10,14,0,3,5,6,8,9,10,20,14,16,3,5,6,8,9,10,20,14,16,16,16,14,14,8,14,8,4,22,5,5,6,6,8,8,8,10,10,10,14,14,14,14,14,14,20,14,16,3,3,3,5,5,5,6,6,6,8,9,10,20,20,14,14,14,16,3,5,6,8,9,10,20,14,16,30,3,5,6,8,9,10,14,8,9,10,8,9,14,14,31,3,5,8,9,14,14,2,3,5,8,9,14,14,8,9,10,14,14,14,3,5,6,8,9,10,20,14,16,3,5,6,8,9,10,20,14,16,3,5,6,8,9,10,20,14,16,8,10,14,14,22,5,6,8,10,14,14,4,5,6,8,10,14,14,14,14],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[],1],[[[3,[2]]],1],[[[5,[[0,[2,4]]]]],1],[[[6,[[0,[2,4]]]]],1],[[[8,[7]]],1],[[[9,[7]]],1],[[[10,[7]]],1],[[[14,[[0,[7,11]],[0,[[12,[[0,[7,11]]]],11]],[13,[[0,[[12,[[0,[7,11]]]],11]]]]]]],1],[[[15,[1]],1],[[18,[[17,[16]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,[[[14,[11,[0,[[12,[11]],11]],[0,[[13,[[0,[[12,[11]],11]]]],19]]]]],[[14,[11,[0,[[12,[11]],11]],[0,[[13,[[0,[[12,[11]],11]]]],19]]]]]],[[]],[8],[[[14,[11,[0,[[12,[11]],11]],[13,[[0,[[12,[11]],11]]]]]]],[[0,[[12,[11]],11]]]],[8],[[],[[21,[20]]]],[[],[[21,[20]]]],[[[5,[[0,[2,4]]]]],[[21,[20]]]],[[[5,[[0,[2,4]]]]],[[21,[20]]]],[[[6,[[0,[2,4]]]]],[[21,[20]]]],[[[6,[[0,[2,4]]]]],[[21,[20]]]],[[[8,[22]]],23],[[[8,[4]]],[[21,[20]]]],[[[8,[22]]],[[21,[20]]]],[[[10,[22]]],23],[[[10,[4]]],[[21,[20]]]],[[[10,[22]]],[[21,[20]]]],[[[14,[[0,[24,11]],[0,[[12,[[0,[24,11]]]],11]],[13,[[0,[[12,[[0,[24,11]]]],11]]]]]]],23],[[[14,[[0,[24,11]],[0,[[12,[[0,[24,11]]]],11]],[13,[[0,[[12,[[0,[24,11]]]],11]]]]]]],23],[[[14,[[0,[4,11]],[0,[[12,[[0,[4,11]]]],11]],[13,[[0,[[12,[[0,[4,11]]]],11]]]]]]],[[21,[20]]]],[[[14,[[0,[22,11]],[0,[[12,[[0,[22,11]]]],11]],[13,[[0,[[12,[[0,[22,11]]]],11]]]]]]],[[21,[20]]]],[[[14,[[0,[22,11]],[0,[[12,[[0,[22,11]]]],11]],[13,[[0,[[12,[[0,[22,11]]]],11]]]]]]],[[21,[20]]]],[[[14,[[0,[4,11]],[0,[[12,[[0,[4,11]]]],11]],[13,[[0,[[12,[[0,[4,11]]]],11]]]]]]],[[21,[20]]]],[[20,25],26],[[[14,[[0,[11,27]],[0,[[12,[[0,[11,27]]]],11,27]],[0,[[13,[[0,[[12,[[0,[11,27]]]],11,27]]]],27]]]],25],26],[[16,25],26],[2,[[3,[2]]]],[28],[[]],[[]],[28],[[[0,[2,4]]],[[5,[[0,[2,4]]]]]],[28],[[]],[[[0,[2,4]]],[[6,[[0,[2,4]]]]]],[[]],[[]],[[]],[[]],[29,20],[[[13,[[0,[[12,[11]],11]]]]],[[14,[11,[0,[[12,[11]],11]],[13,[[0,[[12,[11]],11]]]]]]]],[28],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],1],[[[3,[[0,[30,2]]]]],1],[[[5,[[0,[30,2,4]]]]],1],[[[6,[[0,[30,2,4]]]]],1],[[[8,[30]]],1],[[[9,[30]]],1],[[[10,[30]]],1],[[[14,[[0,[30,11]],[0,[[12,[[0,[30,11]]]],11]],[13,[[0,[[12,[[0,[30,11]]]],11]]]]]]],1],[[[0,[31,22]]],[[8,[[0,[31,22]]]]]],[31,[[9,[31]]]],[22,[[10,[22]]]],[[[8,[31]],[33,[32]]],[[23,[1]]]],[[[9,[31]],[33,[32]]],[[23,[1]]]],[[[14,[[0,[34,11]],[0,[[12,[[0,[34,11]]]],11]],[13,[[0,[[12,[[0,[34,11]]]],11]]]]]],[33,[32]]],[[23,[1]]]],[[[14,[[0,[34,11]],[0,[[12,[[0,[34,11]]]],11]],[13,[[0,[[12,[[0,[34,11]]]],11]]]]]],[33,[32]]],[[23,[1]]]],[[[33,[32]],1],[[21,[1,20]]]],[[[3,[2]],[33,[32]],1],[[21,[1,20]]]],[[[5,[[0,[2,4]]]],[33,[32]],1],[[21,[1,20]]]],[[[8,[31]],[33,[32]],1],[[21,[1,20]]]],[[[9,[31]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[31,11]],[0,[[12,[[0,[31,11]]]],11]],[13,[[0,[[12,[[0,[31,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[31,11]],[0,[[12,[[0,[31,11]]]],11]],[13,[[0,[[12,[[0,[31,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[33,[32]],1],[[21,[1,20]]]],[[[3,[2]],[33,[32]],1],[[21,[1,20]]]],[[[5,[[0,[2,4]]]],[33,[32]],1],[[21,[1,20]]]],[[[8,[2]],[33,[32]],1],[[21,[1,20]]]],[[[9,[2]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[2,11]],[0,[[12,[[0,[2,11]]]],11]],[13,[[0,[[12,[[0,[2,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[2,11]],[0,[[12,[[0,[2,11]]]],11]],[13,[[0,[[12,[[0,[2,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[8,[30]],35],[[23,[36]]]],[[[9,[30]],35],[[23,[36]]]],[[[10,[30]],35],[[23,[36]]]],[[[14,[[0,[37,11]],[0,[[12,[[0,[37,11]]]],11]],[13,[[0,[[12,[[0,[37,11]]]],11]]]]]],35],[[23,[36]]]],[[[14,[[0,[37,11]],[0,[[12,[[0,[37,11]]]],11]],[13,[[0,[[12,[[0,[37,11]]]],11]]]]]],35],[[23,[36]]]],[[]],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[[8,[22]],[33,[32]]],[[23,[1]]]],[[[10,[22]],[33,[32]]],[[23,[1]]]],[[[14,[[0,[24,11]],[0,[[12,[[0,[24,11]]]],11]],[13,[[0,[[12,[[0,[24,11]]]],11]]]]]],[33,[32]]],[[23,[1]]]],[[[14,[[0,[24,11]],[0,[[12,[[0,[24,11]]]],11]],[13,[[0,[[12,[[0,[24,11]]]],11]]]]]],[33,[32]]],[[23,[1]]]],[[[33,[32]],1],[[21,[1,20]]]],[[[5,[[0,[2,4]]]],[33,[32]],1],[[21,[1,20]]]],[[[6,[[0,[2,4]]]],[33,[32]],1],[[21,[1,20]]]],[[[8,[22]],[33,[32]],1],[[21,[1,20]]]],[[[10,[22]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[22,11]],[0,[[12,[[0,[22,11]]]],11]],[13,[[0,[[12,[[0,[22,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[22,11]],[0,[[12,[[0,[22,11]]]],11]],[13,[[0,[[12,[[0,[22,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[33,[32]],1],[[21,[1,20]]]],[[[5,[[0,[2,4]]]],[33,[32]],1],[[21,[1,20]]]],[[[6,[[0,[2,4]]]],[33,[32]],1],[[21,[1,20]]]],[[[8,[4]],[33,[32]],1],[[21,[1,20]]]],[[[10,[4]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[4,11]],[0,[[12,[[0,[4,11]]]],11]],[13,[[0,[[12,[[0,[4,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[4,11]],[0,[[12,[[0,[4,11]]]],11]],[13,[[0,[[12,[[0,[4,11]]]],11]]]]]],[33,[32]],1],[[21,[1,20]]]],[[[14,[[0,[39,11]],[0,[[12,[[0,[39,11]]]],11]],[13,[[0,[[12,[[0,[39,11]]]],11]]]]]],29],26],[[[14,[[0,[39,11]],[0,[[12,[[0,[39,11]]]],11]],[13,[[0,[[12,[[0,[39,11]]]],11]]]]]],29],26]],"c":[],"p":[[15,"usize"],[8,"BlockReader"],[3,"ByteReaderWrapper"],[8,"BlockWriter"],[3,"ByteReaderWriterWrapper"],[3,"ByteWriterWrapper"],[8,"BlockIo"],[3,"ReaderWriter"],[3,"Reader"],[3,"Writer"],[8,"Sized"],[8,"Lockable"],[8,"Borrow"],[3,"LockableIo"],[3,"Range"],[3,"BlockByteTransfer"],[4,"Option"],[15,"array"],[8,"Clone"],[4,"IoError"],[4,"Result"],[8,"ByteWriter"],[6,"Result"],[8,"Write"],[3,"Formatter"],[6,"Result"],[8,"Debug"],[15,"never"],[15,"str"],[8,"KnownLength"],[8,"ByteReader"],[15,"u8"],[15,"slice"],[8,"Read"],[4,"SeekFrom"],[15,"u64"],[8,"Seek"],[3,"TypeId"],[8,"Write"]]},\
"ioapic":{"doc":"","t":"DLLLLLFFLLMLLLLLLL","n":["IoApic","arbitration_id","borrow","borrow_mut","create","from","get_ioapic","get_ioapics","handles_irq","id","id","into","mask_irq","set_irq","try_from","try_into","type_id","version"],"q":[[0,"ioapic"]],"d":["A representation of an IoApic (x86-specific interrupt chip …","gets this IoApic’s arbitration id.","","","Creates a new IoApic struct from the given id
, …","Returns the argument unchanged.","If an IoApic
with the given id
exists, then lock it …","Returns an iterator over the list of IoApic
s.","Returns whether this IoApic handles the given irq_num
, …","gets this IoApic’s id.","The ID of this IoApic.","Calls U::from(self)
.","Masks (disables) the given IRQ line. NOTE: this function …","Set IRQ to an interrupt vector.","","","","gets this IoApic’s version."],"i":[0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1],"f":[0,[1,2],[[]],[[]],[[3,4,5,2],[[7,[6]]]],[[]],[4,[[9,[[8,[1]]]]]],[[],[[10,[4,[8,[1]]]]]],[[1,2],11],[1,2],0,[[]],[[1,4]],[[1,4,12,4],[[7,[6]]]],[[],7],[[],7],[[],13],[1,2]],"c":[],"p":[[3,"IoApic"],[15,"u32"],[3,"PageTable"],[15,"u8"],[3,"PhysicalAddress"],[15,"str"],[4,"Result"],[6,"Mutex"],[4,"Option"],[3,"AtomicMapIter"],[15,"bool"],[3,"ApicId"],[3,"TypeId"]]},\
"iommu":{"doc":"Intel VT-d (IOMMU) implementation.","t":"DLLLFLFLLL","n":["IntelIommu","borrow","borrow_mut","from","init","into","iommu_present","try_from","try_into","type_id"],"q":[[0,"iommu"]],"d":["Struct representing IOMMU (TODO: rename since this is …","","","Returns the argument unchanged.","Initialize the IOMMU hardware.","Calls U::from(self)
.","Returns true
if an IOMMU exists and has been initialized.","","",""],"i":[0,9,9,9,0,9,0,9,9,9],"f":[0,[[]],[[]],[[]],[[1,2,3,4],[[6,[5]]]],[[]],[[],7],[[],6],[[],6],[[],8]],"c":[],"p":[[15,"u8"],[15,"u16"],[3,"PhysicalAddress"],[3,"PageTable"],[15,"str"],[4,"Result"],[15,"bool"],[3,"TypeId"],[3,"IntelIommu"]]},\
diff --git a/doc/src/ata/lib.rs.html b/doc/src/ata/lib.rs.html
index ab89f81ec1..9c6d5fb259 100644
--- a/doc/src/ata/lib.rs.html
+++ b/doc/src/ata/lib.rs.html
@@ -2018,13 +2018,13 @@
/// The primary ATA interrupt handler. Not yet used for anything, but useful for DMA.
extern "x86-interrupt" fn primary_ata_handler(_stack_frame: InterruptStackFrame ) {
info!("Primary ATA Interrupt ({:#X})", ATA_PRIMARY_IRQ);
- interrupts::eoi(Some(ATA_PRIMARY_IRQ));
+ interrupts::eoi(ATA_PRIMARY_IRQ);
}
/// The primary ATA interrupt handler. Not yet used for anything, but useful for DMA.
extern "x86-interrupt" fn secondary_ata_handler(_stack_frame: InterruptStackFrame ) {
info!("Secondary ATA Interrupt ({:#X})", ATA_SECONDARY_IRQ);
- interrupts::eoi(Some(ATA_SECONDARY_IRQ));
+ interrupts::eoi(ATA_SECONDARY_IRQ);
}
diff --git a/doc/src/e1000/lib.rs.html b/doc/src/e1000/lib.rs.html
index 753debcd5e..c0c32ac8f9 100644
--- a/doc/src/e1000/lib.rs.html
+++ b/doc/src/e1000/lib.rs.html
@@ -943,7 +943,7 @@
if let Err(e) = e1000_nic.handle_interrupt() {
error!("e1000_handler(): error handling interrupt: {:?}", e);
}
- eoi(Some(e1000_nic.interrupt_num));
+ eoi(e1000_nic.interrupt_num);
} else {
error!("BUG: e1000_handler(): E1000 NIC hasn't yet been initialized!");
}
diff --git a/doc/src/generic_timer_aarch64/lib.rs.html b/doc/src/generic_timer_aarch64/lib.rs.html
index 655576a895..f9487d7292 100644
--- a/doc/src/generic_timer_aarch64/lib.rs.html
+++ b/doc/src/generic_timer_aarch64/lib.rs.html
@@ -87,6 +87,7 @@
87
88
89
+90
//! Support for aarch64's generic timer and system counter.
//!
//! Docs: <https://developer.arm.com/documentation/102379/latest/>
@@ -158,14 +159,15 @@
enable_timer_interrupt(true);
}
-/// Enables/disables the generic system timer interrupt on the current CPU.
+/// Enables/disables the generic system timer and its interrupt on the current CPU.
///
/// This writes the `CNTP_CTL_EL0` system register.
pub fn enable_timer_interrupt(enable: bool) {
- // Unmask the interrupt (to enable it), and enable the timer.
+ // If enable: unmask the interrupt (set bit to 0), and enable the timer.
+ // If disable: mask the interrupt (set bit to 1), and disable the timer.
CNTP_CTL_EL0.write(
- CNTP_CTL_EL0::IMASK.val(!enable as u64)
- + CNTP_CTL_EL0::ENABLE.val(enable as u64)
+ CNTP_CTL_EL0::ENABLE.val(enable as u64)
+ + CNTP_CTL_EL0::IMASK.val(!enable as u64)
);
if false {
diff --git a/doc/src/interrupts/x86_64/mod.rs.html b/doc/src/interrupts/x86_64/mod.rs.html
index dad980535c..6b0d8b30a6 100644
--- a/doc/src/interrupts/x86_64/mod.rs.html
+++ b/doc/src/interrupts/x86_64/mod.rs.html
@@ -381,7 +381,6 @@
381
382
383
-384
pub use pic::IRQ_BASE_OFFSET;
// use rtc;
@@ -421,6 +420,9 @@
#[macro_export]
#[doc = include_str!("../macro-doc.md")]
macro_rules! interrupt_handler {
+ ($name:ident, _, $stack_frame:ident, $code:block) => {
+ interrupt_handler!($name, 0, $stack_frame, $code);
+ };
($name:ident, $x86_64_eoi_param:expr, $stack_frame:ident, $code:block) => {
extern "x86-interrupt" fn $name(sf: $crate::InterruptStackFrame) {
let $stack_frame = &sf;
@@ -428,7 +430,7 @@
$crate::eoi($x86_64_eoi_param);
}
}
- }
+ };
}
@@ -663,9 +665,9 @@
/// This function supports all types of interrupt chips -- APIC, x2apic, PIC --
/// and will perform the correct EOI operation based on which chip is currently active.
///
-/// The `irq` argument is only used if the `PIC` chip is active,
-/// but it doesn't hurt to always provide it.
-pub fn eoi(irq: Option<u8>) {
+/// The `irq` argument is only used if the legacy `PIC` chip is active on this system;
+/// newer APIC chips do not use this.
+pub fn eoi(irq: InterruptNumber) {
match INTERRUPT_CHIP.load() {
InterruptChip::APIC | InterruptChip::X2APIC => {
if let Some(my_apic) = apic::get_my_apic() {
@@ -676,11 +678,7 @@
}
InterruptChip::PIC => {
if let Some(_pic) = PIC.get() {
- if let Some(irq) = irq {
- _pic.notify_end_of_interrupt(irq);
- } else {
- error!("BUG: missing required IRQ argument for PIC EOI!");
- }
+ _pic.notify_end_of_interrupt(irq);
} else {
error!("BUG: couldn't get PIC instance to send EOI!");
}
@@ -691,7 +689,7 @@
extern "x86-interrupt" fn apic_spurious_interrupt_handler(_stack_frame: InterruptStackFrame) {
warn!("APIC SPURIOUS INTERRUPT HANDLER!");
- eoi(Some(apic::APIC_SPURIOUS_INTERRUPT_IRQ));
+ eoi(apic::APIC_SPURIOUS_INTERRUPT_IRQ);
}
extern "x86-interrupt" fn unimplemented_interrupt_handler(_stack_frame: InterruptStackFrame) {
@@ -718,7 +716,7 @@
}
};
- eoi(Some(0xFF));
+ eoi(0xFF);
}
@@ -737,7 +735,7 @@
if irq_regs.master_isr & 0x80 == 0x80 {
println!("\nGot real IRQ7, not spurious! (Unexpected behavior)");
error!("Got real IRQ7, not spurious! (Unexpected behavior)");
- eoi(Some(IRQ_BASE_OFFSET + 0x7));
+ eoi(IRQ_BASE_OFFSET + 0x7);
}
else {
// do nothing. Do not send an EOI.
@@ -762,7 +760,7 @@
// // we must ack the interrupt and send EOI before calling the handler,
// // because the handler will not return.
// rtc::rtc_ack_irq();
-// eoi(Some(IRQ_BASE_OFFSET + 0x8));
+// eoi(IRQ_BASE_OFFSET + 0x8);
// rtc::handle_rtc_interrupt();
// }
diff --git a/doc/src/keyboard/lib.rs.html b/doc/src/keyboard/lib.rs.html
index d18280d97e..d6b9ffe708 100644
--- a/doc/src/keyboard/lib.rs.html
+++ b/doc/src/keyboard/lib.rs.html
@@ -320,7 +320,7 @@
warn!("ps2_keyboard_handler(): KEYBOARD isn't initialized yet, skipping interrupt.");
}
- interrupts::eoi(Some(PS2_KEYBOARD_IRQ));
+ interrupts::eoi(PS2_KEYBOARD_IRQ);
}
diff --git a/doc/src/mouse/lib.rs.html b/doc/src/mouse/lib.rs.html
index 7a383bb32d..d0e6974fb5 100644
--- a/doc/src/mouse/lib.rs.html
+++ b/doc/src/mouse/lib.rs.html
@@ -190,7 +190,7 @@
warn!("ps2_mouse_handler(): MOUSE isn't initialized yet, skipping interrupt.");
}
- interrupts::eoi(Some(PS2_MOUSE_IRQ));
+ interrupts::eoi(PS2_MOUSE_IRQ);
}
diff --git a/doc/src/pit_clock/lib.rs.html b/doc/src/pit_clock/lib.rs.html
index 64e2fea052..ade03d6fb3 100644
--- a/doc/src/pit_clock/lib.rs.html
+++ b/doc/src/pit_clock/lib.rs.html
@@ -148,6 +148,6 @@
let ticks = PIT_TICKS.fetch_add(1, Ordering::Acquire);
trace!("PIT timer interrupt, ticks: {}", ticks);
- interrupts::eoi(Some(PIT_CHANNEL_0_IRQ));
+ interrupts::eoi(PIT_CHANNEL_0_IRQ);
}
\ No newline at end of file
diff --git a/doc/src/scheduler/lib.rs.html b/doc/src/scheduler/lib.rs.html
index 9774560c6d..c3841b53be 100644
--- a/doc/src/scheduler/lib.rs.html
+++ b/doc/src/scheduler/lib.rs.html
@@ -90,9 +90,6 @@
90
91
92
-93
-94
-95
//! Offers the ability to control or configure the active task scheduling policy.
//!
//! ## What is and isn't in this crate?
@@ -143,7 +140,7 @@
}
// Architecture-independent timer interrupt handler for preemptive scheduling.
-interrupt_handler!(timer_tick_handler, None, _stack_frame, {
+interrupt_handler!(timer_tick_handler, _, _stack_frame, {
#[cfg(target_arch = "aarch64")]
generic_timer_aarch64::set_next_timer_interrupt(get_timeslice_ticks());
@@ -161,9 +158,6 @@
// We must acknowledge the interrupt *before* the end of this handler
// because we switch tasks here, which doesn't return.
- #[cfg(target_arch = "x86_64")]
- eoi(Some(CPU_LOCAL_TIMER_IRQ));
- #[cfg(target_arch = "aarch64")]
eoi(CPU_LOCAL_TIMER_IRQ);
schedule();
diff --git a/doc/src/serial_port/lib.rs.html b/doc/src/serial_port/lib.rs.html
index e9c1f14adf..22708c8513 100644
--- a/doc/src/serial_port/lib.rs.html
+++ b/doc/src/serial_port/lib.rs.html
@@ -802,7 +802,7 @@
//
// * On x86_64, this is IRQ 0x24, used for COM1 and COM3 serial ports.
// * On aarch64, this is interrupt 0x21, used for the PL011 UART serial port.
-interrupt_handler!(primary_serial_port_interrupt_handler, Some(interrupts::IRQ_BASE_OFFSET + 0x4), _stack_frame, {
+interrupt_handler!(primary_serial_port_interrupt_handler, interrupts::IRQ_BASE_OFFSET + 0x4, _stack_frame, {
// log::trace!("COM1/COM3 serial handler");
#[cfg(target_arch = "aarch64")] {
@@ -819,7 +819,7 @@
});
// Cross-platform interrupt handler, only used on x86_64 for COM2 and COM4 (IRQ 0x23).
-interrupt_handler!(secondary_serial_port_interrupt_handler, Some(interrupts::IRQ_BASE_OFFSET + 0x3), _stack_frame, {
+interrupt_handler!(secondary_serial_port_interrupt_handler, interrupts::IRQ_BASE_OFFSET + 0x3, _stack_frame, {
// trace!("COM2/COM4 serial handler");
if let Some(func) = INTERRUPT_ACTION_COM2_COM4.get() {
func()