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
nexedi
linux
Commits
310958f6
Commit
310958f6
authored
Feb 27, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Add S4BIOS support (Pavel Machek)
parent
fcc0694c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
arch/i386/kernel/acpi/wakeup.S
arch/i386/kernel/acpi/wakeup.S
+25
-0
drivers/acpi/hardware/hwsleep.c
drivers/acpi/hardware/hwsleep.c
+45
-0
No files found.
arch/i386/kernel/acpi/wakeup.S
View file @
310958f6
...
...
@@ -319,6 +319,31 @@ ret_point:
pushl
saved_context_eflags
; popfl
ret
ENTRY
(
do_suspend_lowlevel_s4bios
)
cmpl
$
0
,
4
(%
esp
)
jne
ret_point
call
save_processor_state
movl
%
esp
,
saved_context_esp
movl
%
eax
,
saved_context_eax
movl
%
ebx
,
saved_context_ebx
movl
%
ecx
,
saved_context_ecx
movl
%
edx
,
saved_context_edx
movl
%
ebp
,
saved_context_ebp
movl
%
esi
,
saved_context_esi
movl
%
edi
,
saved_context_edi
pushfl
; popl saved_context_eflags
movl
$ret_point
,
saved_eip
movl
%
esp
,
saved_esp
movl
%
ebp
,
saved_ebp
movl
%
ebx
,
saved_ebx
movl
%
edi
,
saved_edi
movl
%
esi
,
saved_esi
call
acpi_enter_sleep_state_s4bios
ret
ALIGN
#
saved
registers
saved_gdt
:
.
long
0
,
0
...
...
drivers/acpi/hardware/hwsleep.c
View file @
310958f6
...
...
@@ -335,6 +335,51 @@ acpi_enter_sleep_state (
return_ACPI_STATUS
(
AE_OK
);
}
/******************************************************************************
*
* FUNCTION: acpi_enter_sleep_state_s4bios
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Perform a S4 bios request.
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
acpi_status
acpi_enter_sleep_state_s4bios
(
void
)
{
u32
in_value
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_enter_sleep_state_s4bios"
);
acpi_set_register
(
ACPI_BITREG_WAKE_STATUS
,
1
,
ACPI_MTX_LOCK
);
acpi_hw_clear_acpi_status
();
acpi_hw_disable_non_wakeup_gpes
();
ACPI_FLUSH_CPU_CACHE
();
status
=
acpi_os_write_port
(
acpi_gbl_FADT
->
smi_cmd
,
(
acpi_integer
)
acpi_gbl_FADT
->
S4bios_req
,
8
);
do
{
acpi_os_stall
(
1000
);
status
=
acpi_get_register
(
ACPI_BITREG_WAKE_STATUS
,
&
in_value
,
ACPI_MTX_LOCK
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
}
while
(
!
in_value
);
return_ACPI_STATUS
(
AE_OK
);
}
/******************************************************************************
*
* FUNCTION: acpi_leave_sleep_state
...
...
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