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
fcc0694c
Commit
fcc0694c
authored
Feb 26, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Map in entire table before performing checksum (John Stultz)
parent
a32f4c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
18 deletions
+28
-18
drivers/acpi/tables.c
drivers/acpi/tables.c
+28
-18
No files found.
drivers/acpi/tables.c
View file @
fcc0694c
...
...
@@ -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