diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-02-23 22:26:10 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-02-23 22:26:10 +0100 |
commit | cceebc67f1377644b02da0ab50bc7d482eeb9cab (patch) | |
tree | 807038209430fc04b99c192f75d0cbb24e1fe228 /platform-intel.c | |
parent | imsm: block creation of devices with identical names (diff) | |
download | mdadm-cceebc67f1377644b02da0ab50bc7d482eeb9cab.tar.xz mdadm-cceebc67f1377644b02da0ab50bc7d482eeb9cab.zip |
imsm: provide a simulated option-rom for regression tests
IMSM_NO_PLATFORM turns off checks that should be tested, so provide a
IMSM_TEST_OROM variable to allow testing the orom constraints in the
mdadm regression suite.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'platform-intel.c')
-rw-r--r-- | platform-intel.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/platform-intel.c b/platform-intel.c index 03e4ba79..5160227b 100644 --- a/platform-intel.c +++ b/platform-intel.c @@ -162,6 +162,24 @@ const struct imsm_orom *find_imsm_orom(void) if (populated) return &imsm_orom; + if (check_env("IMSM_TEST_OROM")) { + memset(&imsm_orom, 0, sizeof(imsm_orom)); + imsm_orom.rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 | + IMSM_OROM_RLC_RAID10 | IMSM_OROM_RLC_RAID5; + imsm_orom.sss = IMSM_OROM_SSS_4kB | IMSM_OROM_SSS_8kB | + IMSM_OROM_SSS_16kB | IMSM_OROM_SSS_32kB | + IMSM_OROM_SSS_64kB | IMSM_OROM_SSS_128kB | + IMSM_OROM_SSS_256kB | IMSM_OROM_SSS_512kB | + IMSM_OROM_SSS_1MB | IMSM_OROM_SSS_2MB; + imsm_orom.dpa = 6; + imsm_orom.tds = 6; + imsm_orom.vpa = 2; + imsm_orom.vphba = 4; + imsm_orom.attr = imsm_orom.rlc | IMSM_OROM_ATTR_ChecksumVerify; + populated = 1; + return &imsm_orom; + } + if (!platform_has_intel_ahci()) return NULL; |