// ntddstor.h
typedef struct _STORAGE_RPMB_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG SizeInBytes;
ULONG MaxReliableWriteSizeInBytes;
STORAGE_RPMB_FRAME_TYPE FrameFormat;
} STORAGE_RPMB_DESCRIPTOR, *PSTORAGE_RPMB_DESCRIPTOR;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _STORAGE_RPMB_DESCRIPTOR {
DWORD Version;
DWORD Size;
DWORD SizeInBytes;
DWORD MaxReliableWriteSizeInBytes;
STORAGE_RPMB_FRAME_TYPE FrameFormat;
} STORAGE_RPMB_DESCRIPTOR, *PSTORAGE_RPMB_DESCRIPTOR;
View the official Win32 API referenceNo description available.
The STORAGE_RPMB_DESCRIPTOR structure contains information about a device's Replay Protected Memory Block (RPMB) support.
VersionVersion of this structure. Set to STORAGE_RPMB_DESCRIPTOR_VERSION_1.
SizeSize of this structure, in bytes. Set to sizeof(STORAGE_RPMB_DESCRIPTOR).
SizeInBytesSize of the RPMB, in bytes. SizeInBytes cannot be zero.
MaxReliableWriteSizeInBytesMaximum amount of data supported in one transaction, in bytes. MaxReliableWriteSizeInBytes cannot be zero.
FrameFormatA **STORAGE_RPMB_FRAME_TYPE structure identifying the frame format that the payload will be in.
An application will issue IOCTL_STORAGE_QUERY_PROPERTY with the STORAGE_PROPERTY_ID enumeration set to StorageAdapterRpmbProperty to determine whether the device contains an RPMB, and the maximum payload size the RPMB supports.
Storport responds with the payload information in this structure when the STORAGE_QUERY_TYPE enumeration is set to PropertyStandardQuery.
To interface with the Replay Protected Memory Block (RPMB), applications first need to query whether the device contains an RPMB and the max payload size the RPMB supports. To do this, the application sends IOCTL_STORAGE_QUERY_PROPERTY IOCTL with STORAGE_PROPERTY_ID enumeration set to StorageAdapterRpmbProperty (defined in STORAGE_PROPERTY_QUERY in ntddstor.h). Storport then responds with the following payload (defined in ntddstor.h) when STORAGE_QUERY_TYPE enumeration is set to PropertyStandardQuery.
VersionShall be set to STORAGE_RPMB_DESCRIPTOR_VERSION_1
SizeShall be set to sizeof(STORAGE_RPMB_DESCRIPTOR)
SizeInBytesThe size of the RPMB, in bytes. 0 if not supported, RPMB size in bytes otherwise.
MaxReliableWriteSizeInBytesThe maximum amount of data supported in one transaction in bytes. 0 if not supported, minimum 512 bytes.
FrameFormatTo support different RPMB frame formats, specifies which frame format the payload will be in so the port driver can take the appropriate action.