Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
4fb68454
Commit
4fb68454
authored
18 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
formatting nits
parent
efb01c1d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ioapic.c
+2
-2
2 additions, 2 deletions
ioapic.c
lapic.c
+7
-7
7 additions, 7 deletions
lapic.c
main.c
+6
-3
6 additions, 3 deletions
main.c
mp.c
+2
-1
2 additions, 1 deletion
mp.c
with
17 additions
and
13 deletions
ioapic.c
+
2
−
2
View file @
4fb68454
...
...
@@ -37,7 +37,7 @@ ioapic_init(void)
uchar
id
;
int
i
;
if
(
!
ismp
)
if
(
!
ismp
)
return
;
io
=
(
struct
ioapic
*
)
IO_APIC_BASE
;
...
...
@@ -71,7 +71,7 @@ ioapic_enable (int irq, int cpunum)
uint
l
,
h
;
struct
ioapic
*
io
;
if
(
!
ismp
)
if
(
!
ismp
)
return
;
io
=
(
struct
ioapic
*
)
IO_APIC_BASE
;
...
...
This diff is collapsed.
Click to expand it.
lapic.c
+
7
−
7
View file @
4fb68454
...
...
@@ -105,7 +105,7 @@ lapic_write(int r, int data)
void
lapic_timerinit
(
void
)
{
if
(
!
lapicaddr
)
if
(
!
lapicaddr
)
return
;
lapic_write
(
LAPIC_TDCR
,
LAPIC_X1
);
...
...
@@ -118,7 +118,7 @@ lapic_timerinit(void)
void
lapic_timerintr
(
void
)
{
if
(
lapicaddr
)
if
(
lapicaddr
)
lapic_write
(
LAPIC_EOI
,
0
);
}
...
...
@@ -127,7 +127,7 @@ lapic_init(int c)
{
uint
r
,
lvt
;
if
(
!
lapicaddr
)
if
(
!
lapicaddr
)
return
;
lapic_write
(
LAPIC_DFR
,
0xFFFFFFFF
);
// Set dst format register
...
...
@@ -162,21 +162,21 @@ lapic_init(int c)
void
lapic_enableintr
(
void
)
{
if
(
lapicaddr
)
if
(
lapicaddr
)
lapic_write
(
LAPIC_TPR
,
0
);
}
void
lapic_disableintr
(
void
)
{
if
(
lapicaddr
)
if
(
lapicaddr
)
lapic_write
(
LAPIC_TPR
,
0xFF
);
}
void
lapic_eoi
(
void
)
{
if
(
lapicaddr
)
if
(
lapicaddr
)
lapic_write
(
LAPIC_EOI
,
0
);
}
...
...
@@ -184,7 +184,7 @@ int
cpu
(
void
)
{
int
x
;
if
(
lapicaddr
)
if
(
lapicaddr
)
x
=
(
lapic_read
(
LAPIC_ID
)
>>
24
)
&
0xFF
;
else
x
=
0
;
...
...
This diff is collapsed.
Click to expand it.
main.c
+
6
−
3
View file @
4fb68454
...
...
@@ -74,8 +74,10 @@ main0(void)
mp_startthem
();
// turn on timer
if
(
ismp
)
lapic_timerinit
();
else
pit8253_timerinit
();
if
(
ismp
)
lapic_timerinit
();
else
pit8253_timerinit
();
// enable interrupts on the local APIC
lapic_enableintr
();
...
...
@@ -126,7 +128,8 @@ process0()
p0
->
cwd
=
iget
(
rootdev
,
1
);
iunlock
(
p0
->
cwd
);
// dummy user memory to make copyproc() happy
// dummy user memory to make copyproc() happy.
// must be big enough to hold the init binary.
p0
->
sz
=
PAGE
;
p0
->
mem
=
kalloc
(
p0
->
sz
);
...
...
This diff is collapsed.
Click to expand it.
mp.c
+
2
−
1
View file @
4fb68454
...
...
@@ -191,7 +191,8 @@ mp_init(void)
int
mp_bcpu
(
void
)
{
if
(
ismp
)
return
bcpu
-
cpus
;
if
(
ismp
)
return
bcpu
-
cpus
;
else
return
0
;
}
...
...
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