summaryrefslogtreecommitdiffstats
path: root/platform-intel.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-08-01 02:11:41 +0200
committerDan Williams <dan.j.williams@intel.com>2009-08-01 02:11:41 +0200
commit969c255511a4bd12e6becc11b2a822f24c1fbb76 (patch)
tree537dab66d2bd7d45adfd6f5ab69ccb77c75a01da /platform-intel.c
parentimsm: fix family number handling (diff)
downloadmdadm-969c255511a4bd12e6becc11b2a822f24c1fbb76.tar.xz
mdadm-969c255511a4bd12e6becc11b2a822f24c1fbb76.zip
platform: relax rom scanning alignment for ahci platforms
The PCI-3.0 Firmware specification allows for option-roms to have 512-byte alignment rather than 2048-byte. As there does not appear to be a reliable method to detect a PCI-3.0 compliant BIOS from userspace we allow the imsm platform detection code to presume that a system modern enough to have an Intel AHCI controller does not have dangerous/legacy ISA regions in the option-ROM memory space. An environment variable to disable this behaviour, IMSM_SAFE_OROM_SCAN, is added in case this presumption is ever proven wrong. Reported-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'platform-intel.c')
-rw-r--r--platform-intel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform-intel.c b/platform-intel.c
index 5160227b..eaf4c483 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -157,6 +157,7 @@ static int scan(const void *start, const void *end)
const struct imsm_orom *find_imsm_orom(void)
{
static int populated = 0;
+ unsigned long align;
/* it's static data so we only need to read it once */
if (populated)
@@ -184,7 +185,11 @@ const struct imsm_orom *find_imsm_orom(void)
return NULL;
/* scan option-rom memory looking for an imsm signature */
- if (probe_roms_init() != 0)
+ if (check_env("IMSM_SAFE_OROM_SCAN"))
+ align = 2048;
+ else
+ align = 512;
+ if (probe_roms_init(align) != 0)
return NULL;
probe_roms();
populated = scan_adapter_roms(scan);