+ //\r
+ // Check if RPMB WLUN is supported and set corresponding bit mask.\r
+ //\r
+ DeviceDescriptorSize = sizeof (UFS_DEV_DESC);\r
+ Status = UfsRwDeviceDesc (Private, TRUE, UfsDeviceDesc, 0, 0, &DeviceDescriptor, &DeviceDescriptorSize);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_ERROR, "Failed to read device descriptor, status = %r\n", Status));\r
+ } else {\r
+ if (DeviceDescriptor.SecurityLun == 0x1) {\r
+ DEBUG ((DEBUG_INFO, "UFS WLUN RPMB is supported\n"));\r
+ Private->Luns.BitMask |= BIT11;\r
+ }\r
+ }\r
+\r