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
e1872bb1
Commit
e1872bb1
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
formatting, fix comment
parent
e0240674
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
trapasm.S
+21
-16
21 additions, 16 deletions
trapasm.S
with
21 additions
and
16 deletions
trapasm.S
+
21
−
16
View file @
e1872bb1
.
text
.
globl
trap
.
globl
trapret1
.
globl
alltraps
.
set
SEG_KDATA_SEL
0x10
#
selector
for
SEG_KDATA
#
vectors
.
S
sends
all
traps
here
.
alltraps
:
/
*
vectors
.
S
sends
all
traps
here
*/
pushl
%
ds
#
build
pushl
%
es
#
trap
pushal
#
frame
movl
$
16
,%
eax
#
SEG_KDATA
<<
3
movw
%
ax
,%
ds
#
kernel
movw
%
ax
,%
es
#
segments
pushl
%
esp
#
pass
pointer
to
this
trapframe
call
trap
#
and
call
trap
()
#
Build
trap
frame
.
pushl
%
ds
pushl
%
es
pushal
#
Set
up
data
segments
.
movl
$SEG_KDATA_SEL
,
%
eax
movw
%
ax
,%
ds
movw
%
ax
,%
es
#
Call
trap
(
tf
),
where
tf
=%
esp
pushl
%
esp
call
trap
addl
$
4
,
%
esp
#
return
falls
through
to
trapret
...
/
*
*
a
forked
process
RETs
here
*
expects
ESP
to
point
to
a
Trapframe
*/
#
Return
falls
through
to
trapret
...
.
globl
trapret
trapret
:
popal
popl
%
es
popl
%
ds
addl
$
0x8
,
%
esp
/*
trapno
and
errcode
*/
addl
$
0x8
,
%
esp
#
trapno
and
errcode
iret
#
A
forked
process
switches
to
user
mode
by
calling
#
forkret1
(
tf
),
where
tf
is
the
trap
frame
to
use
.
.
globl
forkret1
forkret1
:
movl
4
(%
esp
),
%
esp
...
...
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