From nobody Mon Feb 9 10:58:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+48177+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+48177+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1569550807; cv=none; d=zoho.com; s=zohoarc; b=Rqc17kVlkpYDhJRKKB8ZVUhSyUUB3Z6RLTRCzZ9rRagMEiDq9HYTfqlNngiduEi+WdyaD5EIO3NF8lwFmU+GVKhfqE0uLwnEpsfTSW/SOMWBF7swz2W+DMYspbkhZAfEGgiIN0fuZV2R8Vo6NtNz3thRkAylfiFwFFtaPH/0nnM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569550807; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=RvSoIWU3RWxVPUH9NLccbbCq6D9w6ujg6722UoD5uhE=; b=mGz4d0vzCHadgsbOVrJOocU9zAn30GwPZ34u20FCjo7hrOSpCrG2gBedn4cdWmwWOlNKBSVPFlOnrMfmhHjrDpBQKCPhmAnd9z+WzH8L5lSR+MMqcENA8YhA6LNK85t+4f6HEfeRnVJdt8tQMddsZaiiNsVwizqPflMvhspkiuE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+48177+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1569550807686665.5773920060618; Thu, 26 Sep 2019 19:20:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fZNjYY1788612x8wU1TjEEN6; Thu, 26 Sep 2019 19:20:04 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by groups.io with SMTP; Thu, 26 Sep 2019 19:20:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 19:20:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,553,1559545200"; d="scan'208";a="193021228" X-Received: from cjzurch-desk.amr.corp.intel.com ([10.9.70.181]) by orsmga003.jf.intel.com with ESMTP; 26 Sep 2019 19:20:00 -0700 From: "Zurcher, Christopher J" To: devel@edk2.groups.io Cc: Michael D Kinney , Jiewen Yao , Jian J Wang , Liming Gao Subject: [edk2-devel] [PATCH v8 2/4] MdeModulePkg/UfsPassThruDxe: Check for RPMB W-LUN (SecurityLun) Date: Thu, 26 Sep 2019 19:19:58 -0700 Message-Id: <20190927022000.36920-3-christopher.j.zurcher@intel.com> In-Reply-To: <20190927022000.36920-1-christopher.j.zurcher@intel.com> References: <20190927022000.36920-1-christopher.j.zurcher@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,christopher.j.zurcher@intel.com X-Gm-Message-State: 9FpCX5sq6tfhyXhg7fl3nmEpx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1569550804; bh=149T2GTlkx48iLgu89QLH4mKaoKM88y8bJKlcilWVm4=; h=Cc:Date:From:Reply-To:Subject:To; b=FqhVrQOgzIfgMszHPFaMsDgZKfPYzjAvhZA2acjBG6vKm4bptF8fFFic5ru+d1+URee gXq0uF9jQ1Lv/SqtpJFqFlJVWjiF1T39fKWFvxU0i0hog+S1ujBFMJW+anMsdfZ67EW6a tP9aAmc6ccNMz77DwqdtkkKplAJcPlagASs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1546 Currently UfsPassThru only checks for 8 common LUNs. This adds a check for the RPMB Well-known LUN and sets the corresponding bit-mask. Further handling of the WLUN is already present in the driver. Cc: Michael D Kinney Cc: Jiewen Yao Cc: Jian J Wang Cc: Liming Gao Signed-off-by: Christopher J Zurcher --- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModuleP= kg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index b12404aacb..26c5a8b855 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -822,7 +822,9 @@ UfsPassThruDriverBindingStart ( UINTN UfsHcBase; UINT32 Index; UFS_UNIT_DESC UnitDescriptor; + UFS_DEV_DESC DeviceDescriptor; UINT32 UnitDescriptorSize; + UINT32 DeviceDescriptorSize; =20 Status =3D EFI_SUCCESS; UfsHc =3D NULL; @@ -916,7 +918,6 @@ UfsPassThruDriverBindingStart ( =20 // // Check if 8 common luns are active and set corresponding bit mask. - // TODO: Parse device descriptor to decide if exposing RPMB LUN to upper= layer for authentication access. // UnitDescriptorSize =3D sizeof (UFS_UNIT_DESC); for (Index =3D 0; Index < 8; Index++) { @@ -931,6 +932,20 @@ UfsPassThruDriverBindingStart ( } } =20 + // + // Check if RPMB WLUN is supported and set corresponding bit mask. + // + DeviceDescriptorSize =3D sizeof (UFS_DEV_DESC); + Status =3D UfsRwDeviceDesc (Private, TRUE, UfsDeviceDesc, 0, 0, &DeviceD= escriptor, &DeviceDescriptorSize); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed to read device descriptor, status =3D %r\= n", Status)); + } else { + if (DeviceDescriptor.SecurityLun =3D=3D 0x1) { + DEBUG ((DEBUG_INFO, "UFS WLUN RPMB is supported\n")); + Private->Luns.BitMask |=3D BIT11; + } + } + // // Start the asynchronous interrupt monitor // --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48177): https://edk2.groups.io/g/devel/message/48177 Mute This Topic: https://groups.io/mt/34306980/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-