diff options
author | Blazej Kucman <blazej.kucman@intel.com> | 2024-07-25 17:40:12 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-11-08 15:44:00 +0100 |
commit | f70e08be84adc50906e6cf02cfdc98b4a695d0b9 (patch) | |
tree | f184315b3ad68109e86aa4bd5bba3de919bfa3e3 | |
parent | tests: remove --auto (diff) | |
download | mdadm-f70e08be84adc50906e6cf02cfdc98b4a695d0b9.tar.xz mdadm-f70e08be84adc50906e6cf02cfdc98b4a695d0b9.zip |
imsm: add print license for VMD
Add print IMSM license for VMD controllers in --detail-platform.
The license specifies the scope of RAID support in the platform for
the VMD controller.
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
-rw-r--r-- | platform-intel.h | 5 | ||||
-rw-r--r-- | super-intel.c | 47 |
2 files changed, 52 insertions, 0 deletions
diff --git a/platform-intel.h b/platform-intel.h index 344624d7..63d41682 100644 --- a/platform-intel.h +++ b/platform-intel.h @@ -106,7 +106,12 @@ struct imsm_orom { #define IMSM_OROM_CAPABILITIES_ReadPatrol (1 << 6) #define IMSM_OROM_CAPABILITIES_XorHw (1 << 7) #define IMSM_OROM_CAPABILITIES_SKUMode ((1 << 8)|(1 << 9)) + #define IMSM_OROM_CAPABILITIES_SKUMode_LOW ((1 << 8) | (1 << 9)) + #define IMSM_OROM_CAPABILITIES_SKUMode_LOW_SHIFT 8 #define IMSM_OROM_CAPABILITIES_TPV (1 << 10) + #define IMSM_OROM_CAPABILITIES_SKUMode_HIGH ((1 << 11) | (1 << 12)) + #define IMSM_OROM_CAPABILITIES_SKUMode_HIGH_SHIFT 9 + #define IMSM_OROM_CAPABILITIES_SKUMode_NON_PRODUCTION (1 << 13) } __attribute__((packed)); /* IMSM metadata requirements for each level */ diff --git a/super-intel.c b/super-intel.c index 3b856ad0..55c71e26 100644 --- a/super-intel.c +++ b/super-intel.c @@ -645,6 +645,14 @@ struct imsm_update_rwh_policy { int dev_idx; }; +enum imsm_sku { + SKU_NO_KEY = 0, + SKU_STANDARD_KEY = 1, + SKU_PREMIUM_KEY = 2, + SKU_INTEL_SSD_ONLY_KEY = 3, + SKU_RAID1_ONLY_KEY = 4 +}; + static const char *_sys_dev_type[] = { [SYS_DEV_UNKNOWN] = "Unknown", [SYS_DEV_SAS] = "SAS", @@ -2658,6 +2666,39 @@ static void print_imsm_level_capability(const struct imsm_orom *orom) printf("%s ", imsm_level_ops[idx].name); } +static void print_imsm_sku_capability(const struct imsm_orom *orom) +{ + int key_val; + + key_val = (orom->driver_features & IMSM_OROM_CAPABILITIES_SKUMode_LOW) >> + IMSM_OROM_CAPABILITIES_SKUMode_LOW_SHIFT; + key_val |= (orom->driver_features & IMSM_OROM_CAPABILITIES_SKUMode_HIGH) >> + IMSM_OROM_CAPABILITIES_SKUMode_HIGH_SHIFT; + + switch (key_val) { + case SKU_NO_KEY: + printf("Pass-through"); + break; + case SKU_STANDARD_KEY: + printf("Standard"); + break; + case SKU_PREMIUM_KEY: + printf("Premium"); + break; + case SKU_INTEL_SSD_ONLY_KEY: + printf("Intel-SSD-only"); + break; + case SKU_RAID1_ONLY_KEY: + printf("RAID1 Only"); + break; + default: + printf("Unknown"); + } + + if (orom->driver_features & IMSM_OROM_CAPABILITIES_SKUMode_NON_PRODUCTION) + printf(" - for evaluation only"); +} + static void print_imsm_chunk_size_capability(const struct imsm_orom *orom) { int idx; @@ -2690,6 +2731,12 @@ static void print_imsm_capability(const struct orom_entry *entry) orom->hotfix_ver, orom->build); } + if (entry->type == SYS_DEV_VMD) { + printf(" License : "); + print_imsm_sku_capability(orom); + printf("\n"); + } + printf(" RAID Levels : "); print_imsm_level_capability(orom); printf("\n"); |