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
db72219b
Commit
db72219b
authored
Feb 27, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Plain Diff
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
parents
be8013e8
2a7a8597
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
707 additions
and
37 deletions
+707
-37
Documentation/kernel-parameters.txt
Documentation/kernel-parameters.txt
+8
-0
arch/i386/kernel/acpi/wakeup.S
arch/i386/kernel/acpi/wakeup.S
+25
-0
arch/i386/kernel/setup.c
arch/i386/kernel/setup.c
+6
-0
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+1
-0
drivers/acpi/events/Makefile
drivers/acpi/events/Makefile
+1
-1
drivers/acpi/events/evgpeblk.c
drivers/acpi/events/evgpeblk.c
+545
-0
drivers/acpi/hardware/hwsleep.c
drivers/acpi/hardware/hwsleep.c
+45
-0
drivers/acpi/osl.c
drivers/acpi/osl.c
+34
-7
drivers/acpi/processor.c
drivers/acpi/processor.c
+14
-11
drivers/acpi/tables.c
drivers/acpi/tables.c
+28
-18
No files found.
Documentation/kernel-parameters.txt
View file @
db72219b
...
...
@@ -516,6 +516,14 @@ running once the system is up.
[KNL,BOOT] Force usage of a specific region of memory
Region of memory to be used, from ss to ss+nn.
mem=nn[KMG]#ss[KMG]
[KNL,BOOT,ACPI] Mark specific memory as ACPI data.
Region of memory to be used, from ss to ss+nn.
mem=nn[KMG]$ss[KMG]
[KNL,BOOT,ACPI] Mark specific memory as reserved.
Region of memory to be used, from ss to ss+nn.
mem=nopentium [BUGS=IA-32] Disable usage of 4MB pages for kernel
memory.
...
...
arch/i386/kernel/acpi/wakeup.S
View file @
db72219b
...
...
@@ -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
...
...
arch/i386/kernel/setup.c
View file @
db72219b
...
...
@@ -552,6 +552,12 @@ static void __init parse_cmdline_early (char ** cmdline_p)
if
(
*
from
==
'@'
)
{
start_at
=
memparse
(
from
+
1
,
&
from
);
add_memory_region
(
start_at
,
mem_size
,
E820_RAM
);
}
else
if
(
*
from
==
'#'
)
{
start_at
=
memparse
(
from
+
1
,
&
from
);
add_memory_region
(
start_at
,
mem_size
,
E820_ACPI
);
}
else
if
(
*
from
==
'$'
)
{
start_at
=
memparse
(
from
+
1
,
&
from
);
add_memory_region
(
start_at
,
mem_size
,
E820_RESERVED
);
}
else
{
limit_regions
(
mem_size
);
userdef
=
1
;
...
...
drivers/acpi/Kconfig
View file @
db72219b
...
...
@@ -6,6 +6,7 @@ menu "ACPI Support"
config ACPI
bool "ACPI Support" if X86
depends on !X86_VISWS
default y if IA64 && (!IA64_HP_SIM || IA64_SGI_SN)
---help---
Advanced Configuration and Power Interface (ACPI) support for
...
...
drivers/acpi/events/Makefile
View file @
db72219b
...
...
@@ -4,6 +4,6 @@
obj-y
:=
evevent.o evregion.o evsci.o evxfevnt.o
\
evmisc.o evrgnini.o evxface.o evxfregn.o
\
evgpe.o
evgpe.o
evgpeblk.o
EXTRA_CFLAGS
+=
$(ACPI_CFLAGS)
drivers/acpi/events/evgpeblk.c
0 → 100644
View file @
db72219b
This diff is collapsed.
Click to expand it.
drivers/acpi/hardware/hwsleep.c
View file @
db72219b
...
...
@@ -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
...
...
drivers/acpi/osl.c
View file @
db72219b
...
...
@@ -514,10 +514,12 @@ acpi_os_write_pci_configuration (
/* TODO: Change code to take advantage of driver model more */
void
acpi_os_derive_pci_id
(
acpi_os_derive_pci_id
_2
(
acpi_handle
rhandle
,
/* upper bound */
acpi_handle
chandle
,
/* current node */
struct
acpi_pci_id
**
id
)
struct
acpi_pci_id
**
id
,
int
*
is_bridge
,
u8
*
bus_number
)
{
acpi_handle
handle
;
struct
acpi_pci_id
*
pci_id
=
*
id
;
...
...
@@ -528,7 +530,7 @@ acpi_os_derive_pci_id (
acpi_get_parent
(
chandle
,
&
handle
);
if
(
handle
!=
rhandle
)
{
acpi_os_derive_pci_id
(
rhandle
,
handle
,
&
pci_id
);
acpi_os_derive_pci_id
_2
(
rhandle
,
handle
,
&
pci_id
,
is_bridge
,
bus_number
);
status
=
acpi_get_type
(
handle
,
&
type
);
if
(
(
ACPI_FAILURE
(
status
))
||
(
type
!=
ACPI_TYPE_DEVICE
)
)
...
...
@@ -539,17 +541,42 @@ acpi_os_derive_pci_id (
pci_id
->
device
=
ACPI_HIWORD
(
ACPI_LODWORD
(
temp
));
pci_id
->
function
=
ACPI_LOWORD
(
ACPI_LODWORD
(
temp
));
if
(
*
is_bridge
)
pci_id
->
bus
=
*
bus_number
;
/* any nicer way to get bus number of bridge ? */
status
=
acpi_os_read_pci_configuration
(
pci_id
,
0x0e
,
&
tu8
,
8
);
if
(
ACPI_SUCCESS
(
status
)
&&
(
tu8
&
0x7f
)
==
1
)
{
status
=
acpi_os_read_pci_configuration
(
pci_id
,
0x19
,
&
tu8
,
8
);
if
(
ACPI_SUCCESS
(
status
))
if
(
ACPI_SUCCESS
(
status
)
&&
((
tu8
&
0x7f
)
==
1
||
(
tu8
&
0x7f
)
==
2
))
{
status
=
acpi_os_read_pci_configuration
(
pci_id
,
0x18
,
&
tu8
,
8
);
if
(
!
ACPI_SUCCESS
(
status
))
{
/* Certainly broken... FIX ME */
return
;
}
*
is_bridge
=
1
;
pci_id
->
bus
=
tu8
;
status
=
acpi_os_read_pci_configuration
(
pci_id
,
0x19
,
&
tu8
,
8
);
if
(
ACPI_SUCCESS
(
status
))
{
*
bus_number
=
tu8
;
}
}
else
*
is_bridge
=
0
;
}
}
}
void
acpi_os_derive_pci_id
(
acpi_handle
rhandle
,
/* upper bound */
acpi_handle
chandle
,
/* current node */
struct
acpi_pci_id
**
id
)
{
int
is_bridge
=
1
;
u8
bus_number
=
(
*
id
)
->
bus
;
acpi_os_derive_pci_id_2
(
rhandle
,
chandle
,
id
,
&
is_bridge
,
&
bus_number
);
}
#else
/*!CONFIG_ACPI_PCI*/
acpi_status
...
...
drivers/acpi/processor.c
View file @
db72219b
...
...
@@ -1560,7 +1560,7 @@ acpi_processor_get_info (
acpi_status
status
=
0
;
union
acpi_object
object
=
{
0
};
struct
acpi_buffer
buffer
=
{
sizeof
(
union
acpi_object
),
&
object
};
static
int
cpu_
count
=
0
;
static
int
cpu_
index
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_processor_get_info"
);
...
...
@@ -1570,6 +1570,13 @@ acpi_processor_get_info (
if
(
num_online_cpus
()
>
1
)
errata
.
smp
=
TRUE
;
/*
* Extra Processor objects may be enumerated on MP systems with
* less than the max # of CPUs. They should be ignored.
*/
if
((
cpu_index
+
1
)
>
num_online_cpus
())
return_VALUE
(
-
ENODEV
);
acpi_processor_errata
(
pr
);
/*
...
...
@@ -1601,7 +1608,7 @@ acpi_processor_get_info (
* TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
* >>> 'acpi_get_processor_id(acpi_id, &id)' in arch/xxx/acpi.c
*/
pr
->
id
=
cpu_
count
++
;
pr
->
id
=
cpu_
index
++
;
pr
->
acpi_id
=
object
.
processor
.
proc_id
;
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Processor [%d:%d]
\n
"
,
pr
->
id
,
...
...
@@ -1609,19 +1616,15 @@ acpi_processor_get_info (
if
(
!
object
.
processor
.
pblk_address
)
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"No PBLK (NULL address)
\n
"
));
else
if
(
object
.
processor
.
pblk_length
<
4
)
else
if
(
object
.
processor
.
pblk_length
!=
6
)
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid PBLK length [%d]
\n
"
,
object
.
processor
.
pblk_length
));
else
{
pr
->
throttling
.
address
=
object
.
processor
.
pblk_address
;
pr
->
throttling
.
duty_offset
=
acpi_fadt
.
duty_offset
;
pr
->
throttling
.
duty_width
=
acpi_fadt
.
duty_width
;
if
(
object
.
processor
.
pblk_length
>=
5
)
pr
->
power
.
states
[
ACPI_STATE_C2
].
address
=
object
.
processor
.
pblk_address
+
4
;
if
(
object
.
processor
.
pblk_length
>=
6
)
pr
->
power
.
states
[
ACPI_STATE_C3
].
address
=
object
.
processor
.
pblk_address
+
5
;
}
...
...
drivers/acpi/tables.c
View file @
db72219b
...
...
@@ -379,6 +379,7 @@ acpi_table_get_sdt (
sdt
.
pa
=
((
struct
acpi20_table_rsdp
*
)
rsdp
)
->
xsdt_address
;
/* map in just the header */
header
=
(
struct
acpi_table_header
*
)
__acpi_map_table
(
sdt
.
pa
,
sizeof
(
struct
acpi_table_header
));
...
...
@@ -387,6 +388,15 @@ acpi_table_get_sdt (
return
-
ENODEV
;
}
/* remap in the entire table before processing */
mapped_xsdt
=
(
struct
acpi_table_xsdt
*
)
__acpi_map_table
(
sdt
.
pa
,
header
->
length
);
if
(
!
mapped_xsdt
)
{
printk
(
KERN_WARNING
PREFIX
"Unable to map XSDT
\n
"
);
return
-
ENODEV
;
}
header
=
&
mapped_xsdt
->
header
;
if
(
strncmp
(
header
->
signature
,
"XSDT"
,
4
))
{
printk
(
KERN_WARNING
PREFIX
"XSDT signature incorrect
\n
"
);
return
-
ENODEV
;
...
...
@@ -404,15 +414,6 @@ acpi_table_get_sdt (
sdt
.
count
=
ACPI_MAX_TABLES
;
}
mapped_xsdt
=
(
struct
acpi_table_xsdt
*
)
__acpi_map_table
(
sdt
.
pa
,
header
->
length
);
if
(
!
mapped_xsdt
)
{
printk
(
KERN_WARNING
PREFIX
"Unable to map XSDT
\n
"
);
return
-
ENODEV
;
}
header
=
&
mapped_xsdt
->
header
;
for
(
i
=
0
;
i
<
sdt
.
count
;
i
++
)
sdt
.
entry
[
i
].
pa
=
(
unsigned
long
)
mapped_xsdt
->
entry
[
i
];
}
...
...
@@ -425,6 +426,7 @@ acpi_table_get_sdt (
sdt
.
pa
=
rsdp
->
rsdt_address
;
/* map in just the header */
header
=
(
struct
acpi_table_header
*
)
__acpi_map_table
(
sdt
.
pa
,
sizeof
(
struct
acpi_table_header
));
if
(
!
header
)
{
...
...
@@ -432,6 +434,15 @@ acpi_table_get_sdt (
return
-
ENODEV
;
}
/* remap in the entire table before processing */
mapped_rsdt
=
(
struct
acpi_table_rsdt
*
)
__acpi_map_table
(
sdt
.
pa
,
header
->
length
);
if
(
!
mapped_rsdt
)
{
printk
(
KERN_WARNING
PREFIX
"Unable to map RSDT
\n
"
);
return
-
ENODEV
;
}
header
=
&
mapped_rsdt
->
header
;
if
(
strncmp
(
header
->
signature
,
"RSDT"
,
4
))
{
printk
(
KERN_WARNING
PREFIX
"RSDT signature incorrect
\n
"
);
return
-
ENODEV
;
...
...
@@ -449,15 +460,6 @@ acpi_table_get_sdt (
sdt
.
count
=
ACPI_MAX_TABLES
;
}
mapped_rsdt
=
(
struct
acpi_table_rsdt
*
)
__acpi_map_table
(
sdt
.
pa
,
header
->
length
);
if
(
!
mapped_rsdt
)
{
printk
(
KERN_WARNING
PREFIX
"Unable to map RSDT
\n
"
);
return
-
ENODEV
;
}
header
=
&
mapped_rsdt
->
header
;
for
(
i
=
0
;
i
<
sdt
.
count
;
i
++
)
sdt
.
entry
[
i
].
pa
=
(
unsigned
long
)
mapped_rsdt
->
entry
[
i
];
}
...
...
@@ -471,12 +473,20 @@ acpi_table_get_sdt (
for
(
i
=
0
;
i
<
sdt
.
count
;
i
++
)
{
/* map in just the header */
header
=
(
struct
acpi_table_header
*
)
__acpi_map_table
(
sdt
.
entry
[
i
].
pa
,
sizeof
(
struct
acpi_table_header
));
if
(
!
header
)
continue
;
/* remap in the entire table before processing */
header
=
(
struct
acpi_table_header
*
)
__acpi_map_table
(
sdt
.
entry
[
i
].
pa
,
header
->
length
);
if
(
!
header
)
continue
;
acpi_table_print
(
header
,
sdt
.
entry
[
i
].
pa
);
if
(
acpi_table_compute_checksum
(
header
,
header
->
length
))
{
...
...
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