lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] x86: acpi: Print warning for malformed host bridge resources
Date
An incorrectly specified host bridge window may prevent
other devices from claiming assigned resources. For example,
this flawed _CRS resource descriptor from a Dell T5400:
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Granularity
0xF0000000, // Range Minimum
0xFE000000, // Range Maximum
0x00000000, // Translation Offset
0x0E000000, // Length
,, , AddressRangeMemory, TypeStatic)
prevents the adjacent device from claiming [mem 0xfe0000000-0xfe01ffff]

Sanity check that the resource at least conforms to a valid
PCI BAR; if not, emit a diagnostic warning.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
arch/x86/pci/acpi.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 192397c..3468d16 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -298,6 +298,10 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
"host bridge window [%#llx-%#llx] "
"([%#llx-%#llx] ignored, not CPU addressable)\n",
start, orig_end, end + 1, orig_end);
+ } else if (flags & IORESOURCE_MEM && (start & 0x0f || ~end & 0x0f)) {
+ dev_warn(&info->bridge->dev,
+ "invalid host bridge window [%#llx-%#llx]\n",
+ start, end);
}

res = &info->res[info->res_num];
--
1.7.12.3


\
 
 \ /
  Last update: 2012-11-08 04:42    [W:0.104 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site