Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
36618921
Commit
36618921
authored
18 years ago
by
kaashoek
Browse files
Options
Downloads
Patches
Plain Diff
nit
parent
c8b29f6d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
defs.h
+0
-2
0 additions, 2 deletions
defs.h
picirq.c
+18
-18
18 additions, 18 deletions
picirq.c
with
18 additions
and
20 deletions
defs.h
+
0
−
2
View file @
36618921
...
...
@@ -40,8 +40,6 @@ int strncmp(const char *p, const char *q, uint n);
void
syscall
(
void
);
// picirq.c
extern
ushort
irq_mask_8259A
;
void
irq_setmask_8259A
(
ushort
mask
);
void
pic_init
(
void
);
// mp.c
...
...
This diff is collapsed.
Click to expand it.
picirq.c
+
18
−
18
View file @
36618921
...
...
@@ -12,7 +12,24 @@
// Current IRQ mask.
// Initial IRQ mask has interrupt 2 enabled (for slave 8259A).
ushort
irq_mask_8259A
=
0xFFFF
&
~
(
1
<<
IRQ_SLAVE
);
static
ushort
irq_mask_8259A
=
0xFFFF
&
~
(
1
<<
IRQ_SLAVE
);
static
void
irq_setmask_8259A
(
ushort
mask
)
{
int
i
;
irq_mask_8259A
=
mask
;
outb
(
IO_PIC1
+
1
,
(
char
)
mask
);
outb
(
IO_PIC2
+
1
,
(
char
)(
mask
>>
8
));
cprintf
(
"%d: enabled interrupts:"
,
cpu
());
for
(
i
=
0
;
i
<
16
;
i
++
)
if
(
~
mask
&
(
1
<<
i
))
cprintf
(
" %d"
,
i
);
cprintf
(
"
\n
"
);
}
/* Initialize the 8259A interrupt controllers. */
void
...
...
@@ -68,20 +85,3 @@ pic_init(void)
if
(
irq_mask_8259A
!=
0xFFFF
)
irq_setmask_8259A
(
irq_mask_8259A
);
}
void
irq_setmask_8259A
(
ushort
mask
)
{
int
i
;
irq_mask_8259A
=
mask
;
outb
(
IO_PIC1
+
1
,
(
char
)
mask
);
outb
(
IO_PIC2
+
1
,
(
char
)(
mask
>>
8
));
cprintf
(
"%d: enabled interrupts:"
,
cpu
());
for
(
i
=
0
;
i
<
16
;
i
++
)
if
(
~
mask
&
(
1
<<
i
))
cprintf
(
" %d"
,
i
);
cprintf
(
"
\n
"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment