From nobody Mon Feb 9 11:30:49 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+46991+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+46991+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1567807941; cv=none; d=zoho.com; s=zohoarc; b=YuLmuD5ifLqeRuHsfNxBCA005x0pPbmRmj0o/F6UF0fFW3/4I4eRmLjXCjovRCeRJMXuwVZkQMzzBS97ILZc2QvClSIvd/QtErXFuAL2hLYsf7jHY2r2QpM7RTNsz7/eKN+/uENnbWUydn5JxBprQ3AlKfgeJnwG30rnZus+5nc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567807941; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=J2ju5hHDD1rqGAuvD11P4pV0sVAhTgUsKaVoh4fV7LE=; b=SLAyQv0ujHIRCaVEo07DxRD/HdSMr4V42oj0L7p9QnClvP/Doo4pyKEgUxNu/wFL4rNr2doAq+hpkJwl7rFFBZhjBoujBOw37tVkGIUnEjVoLHNkXrnOz0e7x15DL6Ke8N6WKQ+2B2bJQYIpHp9EOVYwX49xO/jd93hzC/UidUw= 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+46991+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 1567807941198433.56849115630234; Fri, 6 Sep 2019 15:12:21 -0700 (PDT) Return-Path: X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Fri, 06 Sep 2019 15:12:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2019 15:12:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,474,1559545200"; d="scan'208";a="195568581" X-Received: from cjzurch-desk.amr.corp.intel.com ([10.9.70.181]) by orsmga002.jf.intel.com with ESMTP; 06 Sep 2019 15:12:17 -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 v6 2/4] MdeModulePkg/UfsPassThruDxe: Check for RPMB W-LUN (SecurityLun) Date: Fri, 6 Sep 2019 15:12:14 -0700 Message-Id: <20190906221217.34180-3-christopher.j.zurcher@intel.com> In-Reply-To: <20190906221217.34180-1-christopher.j.zurcher@intel.com> References: <20190906221217.34180-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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1567807940; bh=I4uuZlP41h8WsXPFwvi0VRoSMw2fPd4zHDwnYSZAdSM=; h=Cc:Date:From:Reply-To:Subject:To; b=kPycmStHeGmU/kACfEVMr5eYZ7wPYxMum90O1yvGWT/AnOvTbgpbjeNlQOdiFAp/Uz2 PKcTkkDBsxTk/CiHwHvGzX76jv7ayy02WJ/ZJhtD5l429ZTJyrc6BtCNWFnQiCfPYmaCM MR/xSZ6X/qhwG5K9MNMb3zOhA5ToL4BARmk= 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 (#46991): https://edk2.groups.io/g/devel/message/46991 Mute This Topic: https://groups.io/mt/33202219/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-