aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/interrupt/mod.rs
Commit message (Collapse)AuthorAge
* interrupt: add irq_save/restore helpersTianhao Wang2024-06-11
| | | | Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* interrupt: set up dummy pagefault handlerTianhao Wang2024-06-11
| | | | Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* interrupt: better trampolines for interruptsTianhao Wang2024-06-11
| | | | | | | | | | | 1. define trampolines for both exceptions with error code (automatically pushed to stack) and those without. 2. do not repeat vectors for unused IRQ numbers: we need 48, no need to fill in 256. 3. also pass the pointer to trap frame (on the stack) to the handler code Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* toolchain: bump rust toolchain versionTianhao Wang2024-06-11
| | | | | | | | | | | | | | | | | | | 1. allow unexpected cfgs in lib.rs, in this case "no_global_oom_handling" is cause warnings [1] 2. for large code models the compiler (rust linkers) now put code and data in `.ltext`, `.ldata`, `.lbss`, `.lrodata` instead of the same `.text` , `.data` ... etc. We are adjusting accordingly in the linker script. 3. unsafe assertions identified undefined behaviours, in this case a repr(C) struct was not mared as repr(packed), therefore having an unexpected size. The unsafe assertions was not enabled by default in debug builds so the idt setup code with from_raw_parts_mut() has been working on UB. Glad we can catch this.... related: [1] https://github.com/rust-lang/rust/pull/123501 related: [2] https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#asserting-unsafe-preconditions
* chore: add v2p and p2v conversion wrt. id mappingTianhao Wang2024-06-11
| | | | Also renamed a few symbols to avoid confusion.
* chore: cleanupTianhao Wang2024-06-11
| | | | Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* choreTianhao Wang2024-06-11
|
* choreTianhao Wang2024-06-11
|
* interrupt: add rust binding for idtTianhao Wang2024-06-11
|
* interrupt: rename `guardian` to `interrupt_gate`Tianhao Wang2024-06-11
|
* mask interrupt during handler routineTianhao Wang2024-06-11
|
* basic interrupt/PIC supportTianhao Wang2024-06-11