Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6bea24b9
Commit
6bea24b9
authored
Aug 01, 2004
by
Patrick Mochel
Committed by
Patrick Mochel
Aug 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[swsusp] Fix x86-64 low-level support.
From Pavel Machek.
parent
fa7f8704
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
arch/x86_64/kernel/suspend_asm.S
arch/x86_64/kernel/suspend_asm.S
+15
-20
No files found.
arch/x86_64/kernel/suspend_asm.S
View file @
6bea24b9
/*
originally
gcc
generated
,
but
now
changed
.
don
't overwrite. */
/*
Originally
gcc
generated
,
modified
by
hand
*
*
This
may
not
use
any
stack
,
nor
any
variable
that
is
not
"NoSave"
:
*
*
Its
rewriting
one
kernel
image
with
another
.
What
is
stack
in
"old"
*
image
could
very
well
be
data
page
in
"new"
image
,
and
overwriting
*
your
own
stack
under
you
is
bad
idea
.
*/
.
text
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page.h>
/*
Input
:
*
rdi
resume
flag
*/
ENTRY
(
do_magic
)
.
LFB5
:
subq
$
8
,
%
rsp
.
LCFI2
:
testl
%
edi
,
%
edi
jne
.
L90
call
do_magic_suspend_1
call
save_processor_state
ENTRY
(
swsusp_arch_suspend
)
movq
%
rsp
,
saved_context_esp
(%
rip
)
movq
%
rax
,
saved_context_eax
(%
rip
)
...
...
@@ -36,9 +32,10 @@ ENTRY(do_magic)
movq
%
r15
,
saved_context_r15
(%
rip
)
pushfq
; popq saved_context_eflags(%rip)
addq
$
8
,
%
rsp
jmp
do_magic_suspend_2
.
L90
:
call
swsusp_save
ret
ENTRY
(
swsusp_arch_resume
)
/
*
set
up
cr3
*/
leaq
init_level4_pgt
(%
rip
),%
rax
subq
$
__START_KERNEL_map
,%
rax
...
...
@@ -53,7 +50,6 @@ ENTRY(do_magic)
movq
%
rcx
,
%
cr3
;
movq
%
rax
,
%
cr4
; # turn PGE back on
call
do_magic_resume_1
movl
nr_copy_pages
(%
rip
),
%
eax
xorl
%
ecx
,
%
ecx
movq
$
0
,
loop
(%
rip
)
...
...
@@ -113,9 +109,8 @@ ENTRY(do_magic)
movq
saved_context_r14
(%
rip
),
%
r14
movq
saved_context_r15
(%
rip
),
%
r15
pushq
saved_context_eflags
(%
rip
)
; popfq
call
restore_processor_state
addq
$
8
,
%
rsp
jmp
do_magic_resume_2
call
swsusp_restore
ret
.
section
.
data
.
nosave
loop
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment