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
e625b4a9
Commit
e625b4a9
authored
Mar 07, 2014
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iommu/vt-d: Parse ANDD records
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
86a54dcc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
drivers/iommu/dmar.c
drivers/iommu/dmar.c
+27
-0
No files found.
drivers/iommu/dmar.c
View file @
e625b4a9
...
...
@@ -373,6 +373,26 @@ static void dmar_free_drhd(struct dmar_drhd_unit *dmaru)
kfree
(
dmaru
);
}
static
int
__init
dmar_parse_one_andd
(
struct
acpi_dmar_header
*
header
)
{
struct
acpi_dmar_andd
*
andd
=
(
void
*
)
header
;
/* Check for NUL termination within the designated length */
if
(
strnlen
(
andd
->
object_name
,
header
->
length
-
8
)
==
header
->
length
-
8
)
{
WARN_TAINT
(
1
,
TAINT_FIRMWARE_WORKAROUND
,
"Your BIOS is broken; ANDD object name is not NUL-terminated
\n
"
"BIOS vendor: %s; Ver: %s; Product Version: %s
\n
"
,
dmi_get_system_info
(
DMI_BIOS_VENDOR
),
dmi_get_system_info
(
DMI_BIOS_VERSION
),
dmi_get_system_info
(
DMI_PRODUCT_VERSION
));
return
-
EINVAL
;
}
pr_info
(
"ANDD device: %x name: %s
\n
"
,
andd
->
device_number
,
andd
->
object_name
);
return
0
;
}
#ifdef CONFIG_ACPI_NUMA
static
int
__init
dmar_parse_one_rhsa
(
struct
acpi_dmar_header
*
header
)
...
...
@@ -436,6 +456,10 @@ dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
(
unsigned
long
long
)
rhsa
->
base_address
,
rhsa
->
proximity_domain
);
break
;
case
ACPI_DMAR_TYPE_ANDD
:
/* We don't print this here because we need to sanity-check
it first. So print it in dmar_parse_one_andd() instead. */
break
;
}
}
...
...
@@ -521,6 +545,9 @@ parse_dmar_table(void)
ret
=
dmar_parse_one_rhsa
(
entry_header
);
#endif
break
;
case
ACPI_DMAR_TYPE_ANDD
:
ret
=
dmar_parse_one_andd
(
entry_header
);
break
;
default:
pr_warn
(
"Unknown DMAR structure type %d
\n
"
,
entry_header
->
type
);
...
...
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