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
d26025d1
Commit
d26025d1
authored
15 years ago
by
Russ Cox
Browse files
Options
Downloads
Patches
Plain Diff
can set just %gs now.
parent
7e0cc8e3
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
proc.c
+1
-2
1 addition, 2 deletions
proc.c
x86.h
+1
-2
1 addition, 2 deletions
x86.h
with
2 additions
and
4 deletions
proc.c
+
1
−
2
View file @
d26025d1
...
...
@@ -72,10 +72,9 @@ ksegment(void)
c
->
gdt
[
SEG_KDATA
]
=
SEG
(
STA_W
,
0
,
0xffffffff
,
0
);
c
->
gdt
[
SEG_KCPU
]
=
SEG
(
STA_W
,
&
c
->
cpu
,
8
,
0
);
lgdt
(
c
->
gdt
,
sizeof
(
c
->
gdt
));
load
fs
gs
(
SEG_KCPU
<<
3
);
loadgs
(
SEG_KCPU
<<
3
);
// Initialize cpu-local storage.
asm
volatile
(
""
);
// Do not let gcc reorder across this line.
cpu
=
c
;
proc
=
0
;
}
...
...
This diff is collapsed.
Click to expand it.
x86.h
+
1
−
2
View file @
d26025d1
...
...
@@ -104,9 +104,8 @@ xchg(volatile uint *addr, uint newval)
}
static
inline
void
load
fs
gs
(
ushort
v
)
loadgs
(
ushort
v
)
{
asm
volatile
(
"movw %0, %%fs"
:
:
"r"
(
v
));
asm
volatile
(
"movw %0, %%gs"
:
:
"r"
(
v
));
}
...
...
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