Skip to contentSkip to conversation

mdadm: added support for Intel Alderlake RST on VMD platform

PATCH Applied Oldřich Jedlička 3 participants 4 messages Aug 31, 2022 – Sep 14, 2022 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mdadm: added support for Intel Alderlake RST on VMD platform

Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.

---
 platform-intel.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
platform-intel.c +13 -5
index 5a8729e7..757f0b1b 100644
@@ -512,7 +512,8 @@ static const struct imsm_orom *find_imsm_hba_orom(struct sys_dev *hba)
 #define AHCI_PROP "RstSataV"
 #define AHCI_SSATA_PROP "RstsSatV"
 #define AHCI_TSATA_PROP "RsttSatV"
-#define VMD_PROP "RstUefiV"
+#define VROC_VMD_PROP "RstUefiV"
+#define RST_VMD_PROP "RstVmdV"
 
 #define VENDOR_GUID \
 	EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, 0x1a, 0x04, 0xc6)
@@ -605,6 +606,7 @@ const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
 	struct orom_entry *ret;
 	static const char * const sata_efivars[] = {AHCI_PROP, AHCI_SSATA_PROP,
 						    AHCI_TSATA_PROP};
+	static const char * const vmd_efivars[] = {VROC_VMD_PROP, RST_VMD_PROP};
 	unsigned long i;
 
 	if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI"))
@@ -636,10 +638,16 @@ const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
 
 		break;
 	case SYS_DEV_VMD:
-		if (!read_efi_variable(&orom, sizeof(orom), VMD_PROP,
-				       VENDOR_GUID))
-			break;
-		return NULL;
+		for (i = 0; i < ARRAY_SIZE(vmd_efivars); i++) {
+			if (!read_efi_variable(&orom, sizeof(orom),
+						vmd_efivars[i], VENDOR_GUID))
+				break;
+		}
+
+		if (i == ARRAY_SIZE(vmd_efivars))
+			return NULL;
+
+		break;
 	default:
 		return NULL;
 	}
Signature · 1 line
2.37.2.windows.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · On Wed, 31 Aug 2022 19:57:29 +0200 Oldřich Jedlička <[email protected]>…

Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.

---
 platform-intel.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

Looks good to me. I've checked this patch with basic VMD test scope and I didn't find any defect.

Kinga Tanska

Applied
#2 lore raw
Quoted 11 lines · Kinga Tanska
Quoted 7 lines · On Wed, 31 Aug 2022 19:57:29 +0200 Oldřich Jedlička <[email protected]>…

Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.

---
 platform-intel.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
Quoted 6 lines

Looks good to me. I've checked this patch with basic VMD test scope and I didn't find any defect.

Applied!

Kinga, thanks for testing.

Jes

#3 lore raw

st 14. 9. 2022 v 15:46 odesílatel Jes Sorensen <[email protected]> napsal:

Quoted 17 lines · Kinga Tanska
Quoted 15 lines
Quoted 7 lines · On Wed, 31 Aug 2022 19:57:29 +0200 Oldřich Jedlička <[email protected]>…

Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.

---
 platform-intel.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
Quoted 6 lines
Quoted 2 lines

Looks good to me. I've checked this patch with basic VMD test scope and I didn't find any defect.

Applied!

Kinga, thanks for testing.

Thanks Jes and Kinga! Great to see it merged :-)

Oldrich.