projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7bd128f
)
Fix pic_eoi() for slave PIC interrupts.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 29 Aug 2004 21:36:22 +0000
(21:36 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 29 Aug 2004 21:36:22 +0000
(21:36 +0000)
src/threads/interrupt.c
patch
|
blob
|
history
diff --git
a/src/threads/interrupt.c
b/src/threads/interrupt.c
index dc4b31ba3d5a0256f57fd1a0bc84aae15419d7e8..6945e0a2d6843089c9e8421bc1e987d5038dcc94 100644
(file)
--- a/
src/threads/interrupt.c
+++ b/
src/threads/interrupt.c
@@
-88,10
+88,13
@@
pic_init (void)
If we don't acknowledge the IRQ, we'll never get it again, so
this is important. */
static void
If we don't acknowledge the IRQ, we'll never get it again, so
this is important. */
static void
-pic_eoi (
void
)
+pic_eoi (
int irq
)
{
/* FIXME? The Linux code is much more complicated. */
{
/* FIXME? The Linux code is much more complicated. */
+ ASSERT (irq >= 0x20 && irq < 0x30);
outb (0x20, 0x20);
outb (0x20, 0x20);
+ if (irq >= 0x28)
+ outb (0xa0, 0x20);
}
\f
#define INTR_CNT 256
}
\f
#define INTR_CNT 256
@@
-133,7
+136,7
@@
intr_handler (struct intr_frame *args)
ASSERT (intr_get_level () == IF_OFF);
ASSERT (intr_context ());
intr_in_progress = false;
ASSERT (intr_get_level () == IF_OFF);
ASSERT (intr_context ());
intr_in_progress = false;
- pic_eoi ();
+ pic_eoi (
args->vec_no
);
if (yield_on_return)
thread_yield ();
if (yield_on_return)
thread_yield ();
@@
-275,8
+278,8
@@
intr_kill (struct intr_frame *f)
switch (f->cs)
{
case SEL_UCSEG:
switch (f->cs)
{
case SEL_UCSEG:
- printk ("
[%p] Interrupt %#04x (%s), killing process
.\n",
- thread_current (), f->vec_no, intr_name (f->vec_no));
+ printk ("
%s: dying due to interrupt %#04x (%s)
.\n",
+ thread_current ()
->name
, f->vec_no, intr_name (f->vec_no));
thread_exit ();
case SEL_KCSEG:
thread_exit ();
case SEL_KCSEG: