All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Oldřich Jedlička" <oldium.pro@gmail.com>
To: linux-raid@vger.kernel.org
Cc: "Oldřich Jedlička" <oldium.pro@gmail.com>
Subject: [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform
Date: Wed, 31 Aug 2022 19:57:29 +0200	[thread overview]
Message-ID: <20220831175729.1020-1-oldium.pro@gmail.com> (raw)

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

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
---
 platform-intel.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/platform-intel.c b/platform-intel.c
index 5a8729e7..757f0b1b 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -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;
 	}
-- 
2.37.2.windows.2


             reply	other threads:[~2022-08-31 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 17:57 Oldřich Jedlička [this message]
2022-09-14 12:54 ` [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform Kinga Tanska
2022-09-14 13:46   ` Jes Sorensen
2022-09-14 14:13     ` Oldřich Jedlička

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831175729.1020-1-oldium.pro@gmail.com \
    --to=oldium.pro@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.