Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Interrupts #72

Merged
merged 9 commits into from Oct 1, 2016
Merged

Interrupts #72

merged 9 commits into from Oct 1, 2016

Conversation

steveklabnik
Copy link
Member

@steveklabnik steveklabnik commented Oct 1, 2016

Re-introduce interrupts.

  1. Add a pic crate, we need to remap the pic to enable interrupts.
  2. Create the trampoline for creating interrupts
  3. Set up the GPF handler. All unused interrupts go here, thanks to the
    x86 crates' MISSING handler.
  4. Set up the timer handler. We don't want to do anything with it yet.
  5. Set up panic to print something.

Okay, so 5 really, really isn't great. I'm not sure how to get around
it, though. Basically, we have to create a static reference to the thing
we're trying to not keep static. It's gross. Idk.

1. Support creating an IdtRef in the kernel::Context. This will be
something like a Vec or String: it will refer to the actual IDT, which
is static.
2. Make a factory function for the IdtRef, so that the other crate can
get one.
@steveklabnik
Copy link
Member Author

@ketsuban comments on IRC

16:14 < Ketsuban> You might consider serial output rather than VGA, if staticness is a concern.

Lots to go over here! This step is pretty big.

1. Add a pic crate, we need to remap the pic to enable interrupts.
2. Create the trampoline for creating interrupts
3. Set up the GPF handler. All unused interrupts go here, thanks to the
   x86 crates' MISSING handler.
4. Set up the timer handler. We don't want to do anything with it yet.
5. Set up panic to print something.

Okay, so #5 really, really isn't great. I'm not sure how to get around
it, though. Basically, we have to create a static reference to the thing
we're trying to not keep static. It's gross. Idk.
This is just too much of a PTA in too many places. This code is cleaner,
even though things are global.
This is more idiomatic.
@steveklabnik
Copy link
Member Author

I think this is good to go 🎊

@steveklabnik steveklabnik merged commit 50d61bf into master Oct 1, 2016
@steveklabnik steveklabnik deleted the interrupts branch October 1, 2016 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant