aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2015-10-26 11:51:25 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-11-04 16:14:06 +0100
commite561f35fa5126e89b568292864acd8b9b95377e0 (patch)
tree6cd616c752206eda292875d955fea473679e1e9b /src/arch
parent50a29f8170737acddbac11213e0bd017cf3c48dc (diff)
ACPI: Make DMAR flags settable
Add a parameter to acpi_create_dmar() for the flags field and define flags given by the spec [1]. [1] Intel Virtualization Technology for Directed I/O Architecture Specification Document-Number: D51397 Change-Id: I03ae32f13bb0061bd3b9bef607db175d9b0bc5e1 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/12191 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/acpi.c4
-rw-r--r--src/arch/x86/include/arch/acpi.h7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index 417a322796..1570dc8d07 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -389,7 +389,7 @@ void acpi_create_srat(acpi_srat_t *srat,
header->checksum = acpi_checksum((void *)srat, header->length);
}
-void acpi_create_dmar(acpi_dmar_t *dmar,
+void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags,
unsigned long (*acpi_fill_dmar) (unsigned long))
{
acpi_header_t *header = &(dmar->header);
@@ -407,7 +407,7 @@ void acpi_create_dmar(acpi_dmar_t *dmar,
header->revision = 1;
dmar->host_address_width = 40 - 1; /* FIXME: == MTRR size? */
- dmar->flags = 0;
+ dmar->flags = flags;
current = acpi_fill_dmar(current);
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index d4bacf5675..2a7ea79e01 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -220,6 +220,11 @@ enum {
DRHD_INCLUDE_PCI_ALL = 1
};
+enum dmar_flags {
+ DMAR_INTR_REMAP = 1,
+ DMAR_X2APIC_OPT_OUT = 2,
+};
+
typedef struct dmar_entry {
u16 type;
u16 length;
@@ -543,7 +548,7 @@ void acpi_create_mcfg(acpi_mcfg_t *mcfg);
void acpi_create_facs(acpi_facs_t *facs);
-void acpi_create_dmar(acpi_dmar_t *dmar,
+void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags,
unsigned long (*acpi_fill_dmar) (unsigned long));
unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
u16 segment, u32 bar);