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
5fdd86ae
Commit
5fdd86ae
authored
Jul 13, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Fixes from FreeBSD and NetBSD. (Frank van der Linden, Thomas Klausner,
Nate Lawson)
parent
861976f2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
24 deletions
+21
-24
drivers/acpi/hardware/hwregs.c
drivers/acpi/hardware/hwregs.c
+11
-10
drivers/acpi/tables/tbconvrt.c
drivers/acpi/tables/tbconvrt.c
+1
-5
drivers/acpi/tables/tbget.c
drivers/acpi/tables/tbget.c
+2
-2
drivers/acpi/tables/tbrsdt.c
drivers/acpi/tables/tbrsdt.c
+1
-1
drivers/acpi/tables/tbxfroot.c
drivers/acpi/tables/tbxfroot.c
+3
-3
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utglobal.c
+3
-3
No files found.
drivers/acpi/hardware/hwregs.c
View file @
5fdd86ae
...
...
@@ -357,9 +357,9 @@ acpi_set_register (
/*
* Decode the Register ID
* Register
id = Register block id | bit id
* Register
ID = [Register block ID] | [bit ID]
*
* Check bit
id
to fine locate Register offset.
* Check bit
ID
to fine locate Register offset.
* Check Mask to determine Register offset, and then read-write.
*/
switch
(
bit_reg_info
->
parent_register
)
{
...
...
@@ -367,9 +367,9 @@ acpi_set_register (
/*
* Status Registers are different from the rest. Clear by
* writing 1, writing 0 has no effect. So, the only relevant
* writing 1,
and
writing 0 has no effect. So, the only relevant
* information is the single bit we're interested in, all others should
* be written as 0 so they will be left unchanged
* be written as 0 so they will be left unchanged
.
*/
value
=
ACPI_REGISTER_PREPARE_BITS
(
value
,
bit_reg_info
->
bit_position
,
bit_reg_info
->
access_bit_mask
);
...
...
@@ -394,17 +394,17 @@ acpi_set_register (
case
ACPI_REGISTER_PM1_CONTROL
:
/*
*
Read
the PM1 Control register.
*
Write
the PM1 Control register.
* Note that at this level, the fact that there are actually TWO
* registers (A and B - and
that
B may not exist) is abstracted.
* registers (A and B - and B may not exist) is abstracted.
*/
ACPI_DEBUG_PRINT
((
ACPI_DB_IO
,
"PM1 control: Read %X
\n
"
,
register_value
));
ACPI_REGISTER_INSERT_VALUE
(
register_value
,
bit_reg_info
->
bit_position
,
bit_reg_info
->
access_bit_mask
,
value
);
status
=
acpi_hw_register_write
(
ACPI_MTX_DO_NOT_LOCK
,
register_id
,
(
u16
)
register_value
);
status
=
acpi_hw_register_write
(
ACPI_MTX_DO_NOT_LOCK
,
ACPI_REGISTER_PM1_CONTROL
,
(
u16
)
register_value
);
break
;
...
...
@@ -724,7 +724,7 @@ acpi_hw_low_level_read (
/*
* Three address spaces supported:
* Memory, I
o, or PCI c
onfig.
* Memory, I
O, or PCI_C
onfig.
*/
switch
(
reg
->
address_space_id
)
{
case
ACPI_ADR_SPACE_SYSTEM_MEMORY
:
...
...
@@ -808,9 +808,10 @@ acpi_hw_low_level_write (
(
!
reg
->
address
))
{
return
(
AE_OK
);
}
/*
* Three address spaces supported:
* Memory, I
o, or PCI c
onfig.
* Memory, I
O, or PCI_C
onfig.
*/
switch
(
reg
->
address_space_id
)
{
case
ACPI_ADR_SPACE_SYSTEM_MEMORY
:
...
...
drivers/acpi/tables/tbconvrt.c
View file @
5fdd86ae
...
...
@@ -75,14 +75,10 @@ acpi_tb_get_table_count (
ACPI_FUNCTION_ENTRY
();
#if ACPI_MACHINE_WIDTH != 64
if
(
RSDP
->
revision
<
2
)
{
pointer_size
=
sizeof
(
u32
);
}
else
#endif
{
else
{
pointer_size
=
sizeof
(
u64
);
}
...
...
drivers/acpi/tables/tbget.c
View file @
5fdd86ae
...
...
@@ -145,7 +145,7 @@ acpi_tb_get_table_header (
/* Create a logical address for the physical pointer*/
status
=
acpi_os_map_memory
(
address
->
pointer
.
physical
,
sizeof
(
struct
acpi_table_header
),
(
void
*
*
)
&
header
);
(
void
*
)
&
header
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_REPORT_ERROR
((
"Could not map memory at %8.8X%8.8X for length %X
\n
"
,
ACPI_HIDWORD
(
address
->
pointer
.
physical
),
...
...
@@ -361,7 +361,7 @@ acpi_tb_get_this_table (
* into our address space.
*/
status
=
acpi_os_map_memory
(
address
->
pointer
.
physical
,
(
acpi_size
)
header
->
length
,
(
void
*
*
)
&
full_table
);
(
void
*
)
&
full_table
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_REPORT_ERROR
((
"Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X
\n
"
,
header
->
signature
,
...
...
drivers/acpi/tables/tbrsdt.c
View file @
5fdd86ae
...
...
@@ -85,7 +85,7 @@ acpi_tb_verify_rsdp (
* Obtain access to the RSDP structure
*/
status
=
acpi_os_map_memory
(
address
->
pointer
.
physical
,
sizeof
(
struct
rsdp_descriptor
),
(
void
*
*
)
&
rsdp
);
(
void
*
)
&
rsdp
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/tables/tbxfroot.c
View file @
5fdd86ae
...
...
@@ -179,7 +179,7 @@ acpi_get_firmware_table (
if
((
flags
&
ACPI_MEMORY_MODE
)
==
ACPI_LOGICAL_ADDRESSING
)
{
status
=
acpi_os_map_memory
(
rsdp_address
.
pointer
.
physical
,
sizeof
(
struct
rsdp_descriptor
),
(
void
*
*
)
&
acpi_gbl_RSDP
);
(
void
*
)
&
acpi_gbl_RSDP
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
...
...
@@ -423,7 +423,7 @@ acpi_tb_find_rsdp (
* 1) Search EBDA (low memory) paragraphs
*/
status
=
acpi_os_map_memory
((
u64
)
ACPI_LO_RSDP_WINDOW_BASE
,
ACPI_LO_RSDP_WINDOW_SIZE
,
(
void
*
*
)
&
table_ptr
);
(
void
*
)
&
table_ptr
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not map memory at %X for length %X
\n
"
,
ACPI_LO_RSDP_WINDOW_BASE
,
ACPI_LO_RSDP_WINDOW_SIZE
));
...
...
@@ -447,7 +447,7 @@ acpi_tb_find_rsdp (
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
*/
status
=
acpi_os_map_memory
((
u64
)
ACPI_HI_RSDP_WINDOW_BASE
,
ACPI_HI_RSDP_WINDOW_SIZE
,
(
void
*
*
)
&
table_ptr
);
(
void
*
)
&
table_ptr
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not map memory at %X for length %X
\n
"
,
ACPI_HI_RSDP_WINDOW_BASE
,
ACPI_HI_RSDP_WINDOW_SIZE
));
...
...
drivers/acpi/utilities/utglobal.c
View file @
5fdd86ae
...
...
@@ -307,9 +307,9 @@ struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES] =
/*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */
/* RSDP 0 */
{
RSDP_NAME
,
RSDP_SIG
,
NULL
,
sizeof
(
RSDP_SIG
)
-
1
,
ACPI_TABLE_ROOT
|
ACPI_TABLE_SINGLE
},
/* DSDT 1 */
{
DSDT_SIG
,
DSDT_SIG
,
(
void
*
*
)
&
acpi_gbl_DSDT
,
sizeof
(
DSDT_SIG
)
-
1
,
ACPI_TABLE_SECONDARY
|
ACPI_TABLE_SINGLE
|
ACPI_TABLE_EXECUTABLE
},
/* FADT 2 */
{
FADT_SIG
,
FADT_SIG
,
(
void
*
*
)
&
acpi_gbl_FADT
,
sizeof
(
FADT_SIG
)
-
1
,
ACPI_TABLE_PRIMARY
|
ACPI_TABLE_SINGLE
},
/* FACS 3 */
{
FACS_SIG
,
FACS_SIG
,
(
void
*
*
)
&
acpi_gbl_FACS
,
sizeof
(
FACS_SIG
)
-
1
,
ACPI_TABLE_SECONDARY
|
ACPI_TABLE_SINGLE
},
/* DSDT 1 */
{
DSDT_SIG
,
DSDT_SIG
,
(
void
*
)
&
acpi_gbl_DSDT
,
sizeof
(
DSDT_SIG
)
-
1
,
ACPI_TABLE_SECONDARY
|
ACPI_TABLE_SINGLE
|
ACPI_TABLE_EXECUTABLE
},
/* FADT 2 */
{
FADT_SIG
,
FADT_SIG
,
(
void
*
)
&
acpi_gbl_FADT
,
sizeof
(
FADT_SIG
)
-
1
,
ACPI_TABLE_PRIMARY
|
ACPI_TABLE_SINGLE
},
/* FACS 3 */
{
FACS_SIG
,
FACS_SIG
,
(
void
*
)
&
acpi_gbl_FACS
,
sizeof
(
FACS_SIG
)
-
1
,
ACPI_TABLE_SECONDARY
|
ACPI_TABLE_SINGLE
},
/* PSDT 4 */
{
PSDT_SIG
,
PSDT_SIG
,
NULL
,
sizeof
(
PSDT_SIG
)
-
1
,
ACPI_TABLE_PRIMARY
|
ACPI_TABLE_MULTIPLE
|
ACPI_TABLE_EXECUTABLE
},
/* SSDT 5 */
{
SSDT_SIG
,
SSDT_SIG
,
NULL
,
sizeof
(
SSDT_SIG
)
-
1
,
ACPI_TABLE_PRIMARY
|
ACPI_TABLE_MULTIPLE
|
ACPI_TABLE_EXECUTABLE
},
/* XSDT 6 */
{
XSDT_SIG
,
XSDT_SIG
,
NULL
,
sizeof
(
RSDT_SIG
)
-
1
,
ACPI_TABLE_ROOT
|
ACPI_TABLE_SINGLE
},
...
...
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