aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/actbl1.h27
-rw-r--r--include/linux/dmar.h52
2 files changed, 72 insertions, 7 deletions
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 4e5d3ca53a8e..a1b1b2ee3e51 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -257,7 +257,8 @@ struct acpi_table_dbgp {
257struct acpi_table_dmar { 257struct acpi_table_dmar {
258 struct acpi_table_header header; /* Common ACPI table header */ 258 struct acpi_table_header header; /* Common ACPI table header */
259 u8 width; /* Host Address Width */ 259 u8 width; /* Host Address Width */
260 u8 reserved[11]; 260 u8 flags;
261 u8 reserved[10];
261}; 262};
262 263
263/* DMAR subtable header */ 264/* DMAR subtable header */
@@ -265,8 +266,6 @@ struct acpi_table_dmar {
265struct acpi_dmar_header { 266struct acpi_dmar_header {
266 u16 type; 267 u16 type;
267 u16 length; 268 u16 length;
268 u8 flags;
269 u8 reserved[3];
270}; 269};
271 270
272/* Values for subtable type in struct acpi_dmar_header */ 271/* Values for subtable type in struct acpi_dmar_header */
@@ -274,13 +273,15 @@ struct acpi_dmar_header {
274enum acpi_dmar_type { 273enum acpi_dmar_type {
275 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, 274 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
276 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, 275 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
277 ACPI_DMAR_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 276 ACPI_DMAR_TYPE_ATSR = 2,
277 ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
278}; 278};
279 279
280struct acpi_dmar_device_scope { 280struct acpi_dmar_device_scope {
281 u8 entry_type; 281 u8 entry_type;
282 u8 length; 282 u8 length;
283 u8 segment; 283 u16 reserved;
284 u8 enumeration_id;
284 u8 bus; 285 u8 bus;
285}; 286};
286 287
@@ -290,7 +291,14 @@ enum acpi_dmar_scope_type {
290 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, 291 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
291 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, 292 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
292 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, 293 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
293 ACPI_DMAR_SCOPE_TYPE_RESERVED = 3 /* 3 and greater are reserved */ 294 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
295 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
296 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
297};
298
299struct acpi_dmar_pci_path {
300 u8 dev;
301 u8 fn;
294}; 302};
295 303
296/* 304/*
@@ -301,6 +309,9 @@ enum acpi_dmar_scope_type {
301 309
302struct acpi_dmar_hardware_unit { 310struct acpi_dmar_hardware_unit {
303 struct acpi_dmar_header header; 311 struct acpi_dmar_header header;
312 u8 flags;
313 u8 reserved;
314 u16 segment;
304 u64 address; /* Register Base Address */ 315 u64 address; /* Register Base Address */
305}; 316};
306 317
@@ -312,7 +323,9 @@ struct acpi_dmar_hardware_unit {
312 323
313struct acpi_dmar_reserved_memory { 324struct acpi_dmar_reserved_memory {
314 struct acpi_dmar_header header; 325 struct acpi_dmar_header header;
315 u64 address; /* 4_k aligned base address */ 326 u16 reserved;
327 u16 segment;
328 u64 base_address; /* 4_k aligned base address */
316 u64 end_address; /* 4_k aligned limit address */ 329 u64 end_address; /* 4_k aligned limit address */
317}; 330};
318 331
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
new file mode 100644
index 000000000000..8d3e0e38ca4d
--- /dev/null
+++ b/include/linux/dmar.h
@@ -0,0 +1,52 @@
1/*
2 * Copyright (c) 2006, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Copyright (C) Ashok Raj <ashok.raj@intel.com>
18 * Copyright (C) Shaohua Li <shaohua.li@intel.com>
19 */
20
21#ifndef __DMAR_H__
22#define __DMAR_H__
23
24#include <linux/acpi.h>
25#include <linux/types.h>
26
27
28extern int dmar_table_init(void);
29extern int early_dmar_detect(void);
30
31extern struct list_head dmar_drhd_units;
32extern struct list_head dmar_rmrr_units;
33
34struct dmar_drhd_unit {
35 struct list_head list; /* list of drhd units */
36 u64 reg_base_addr; /* register base address*/
37 struct pci_dev **devices; /* target device array */
38 int devices_cnt; /* target device count */
39 u8 ignored:1; /* ignore drhd */
40 u8 include_all:1;
41 struct intel_iommu *iommu;
42};
43
44struct dmar_rmrr_unit {
45 struct list_head list; /* list of rmrr units */
46 u64 base_address; /* reserved base address*/
47 u64 end_address; /* reserved end address */
48 struct pci_dev **devices; /* target devices */
49 int devices_cnt; /* target device count */
50};
51
52#endif /* __DMAR_H__ */