Media Access protocols fully implemented
This commit is contained in:
parent
2b8129b83b
commit
5ee2b6ee65
1 changed files with 134 additions and 0 deletions
|
@ -1060,12 +1060,146 @@ typedef struct _EFI_PARTITION_INFO_PROTOCOL {
|
||||||
// NVDIMM Label Protocol
|
// NVDIMM Label Protocol
|
||||||
///
|
///
|
||||||
|
|
||||||
|
#define EFI_NVDIMM_LABEL_PROTOCOL_GUID {0xd40b6b80,0x97d5,0x4282, {0xbb,0x1d,0x22,0x3a,0x16,0x91,0x80,0x58}}
|
||||||
|
|
||||||
|
#define EFI_NVDIMM_LABEL_INDEX_SIG_LEN 16
|
||||||
|
#define EFI_NVDIMM_LABEL_INDEX_ALIGN 256
|
||||||
|
|
||||||
|
#define EFI_NVDIMM_LABEL_NAME_LEN 64
|
||||||
|
|
||||||
|
#define EFI_NVDIMM_LABEL_FLAGS_ROLABEL 0x00000001
|
||||||
|
#define EFI_NVDIMM_LABEL_FLAGS_LOCAL 0x00000002
|
||||||
|
#define EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND 0x00000010
|
||||||
|
|
||||||
|
// Reserved flag is deprecated.
|
||||||
|
#define EFI_NVDIMM_LABEL_FLAGS_RESERVED 0x00000004
|
||||||
|
#define EFI_NVDIMM_LABEL_FLAGS_UPDATING 0x00000008
|
||||||
|
|
||||||
|
typedef struct _EFI_NVDIMM_LABEL_PROTOCOL EFI_NVDIMM_LABEL_PROTOCOL;
|
||||||
|
|
||||||
|
typedef struct EFI_NVDIMM_LABEL_INDEX_BLOCK {
|
||||||
|
CHAR8 Sig[EFI_NVDIMM_LABEL_INDEX_SIG_LEN];
|
||||||
|
UINT8 Flags[3];
|
||||||
|
UINT8 LabelSize;
|
||||||
|
UINT32 Seq;
|
||||||
|
UINT64 MyOff;
|
||||||
|
UINT64 MySize;
|
||||||
|
UINT64 OtherOff;
|
||||||
|
UINT64 LabelOff;
|
||||||
|
UINT32 NSlot;
|
||||||
|
UINT16 Major;
|
||||||
|
UINT16 Minor;
|
||||||
|
UINT64 Checksum;
|
||||||
|
UINT8 Free[];
|
||||||
|
} EFI_NVDIMM_LABEL_INDEX_BLOCK;
|
||||||
|
|
||||||
|
typedef struct EFI_NVDIMM_LABEL {
|
||||||
|
EFI_GUID Uuid;
|
||||||
|
CHAR8 Name[EFI_NVDIMM_LABEL_NAME_LEN];
|
||||||
|
UINT32 Flags;
|
||||||
|
UINT16 NLabel;
|
||||||
|
UINT16 Position;
|
||||||
|
UINT64 SetCookie;
|
||||||
|
UINT64 LbaSize;
|
||||||
|
UINT64 Dpa;
|
||||||
|
UINT64 RawSize;
|
||||||
|
UINT32 Slot;
|
||||||
|
UINT8 Alignment;
|
||||||
|
UINT8 Reserved[3];
|
||||||
|
EFI_GUID TypeGuid;
|
||||||
|
EFI_GUID AddressAbstractionGuid;
|
||||||
|
UINT64 SPALocationCookie;
|
||||||
|
UINT8 Reserved1[80];
|
||||||
|
UINT64 Checksum;
|
||||||
|
} EFI_NVDIMM_LABEL;
|
||||||
|
|
||||||
|
typedef struct EFI_NVDIMM_LABEL_SET_COOKIE_MAP {
|
||||||
|
UINT64 RegionOffset;
|
||||||
|
UINT32 SerialNumber;
|
||||||
|
UINT16 VendorId;
|
||||||
|
UINT16 ManufacturingDate;
|
||||||
|
UINT8 ManufacturingLocation;
|
||||||
|
UINT8 Reserved[31];
|
||||||
|
} EFI_NVDIMM_LABEL_SET_COOKIE_MAP;
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_INFORMATION)(
|
||||||
|
IN EFI_NVDIMM_LABEL_PROTOCOL *This,
|
||||||
|
OUT UINT32 *SizeOfLabelStorageArea,
|
||||||
|
OUT UINT32 *MaxTransferLength
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_READ)(
|
||||||
|
IN CONST EFI_NVDIMM_LABEL_PROTOCOL *This,
|
||||||
|
IN UINT32 Offset,
|
||||||
|
IN UINT32 TransferLength,
|
||||||
|
OUT UINT8 *LabelData
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_WRITE)(
|
||||||
|
IN CONST EFI_NVDIMM_LABEL_PROTOCOL *This,
|
||||||
|
IN UINT32 Offset,
|
||||||
|
IN UINT32 TransferLength,
|
||||||
|
IN UINT8 *LabelData
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _EFI_NVDIMM_LABEL_PROTOCOL {
|
||||||
|
EFI_NVDIMM_LABEL_STORAGE_INFORMATION LabelStorageInformation;
|
||||||
|
EFI_NVDIMM_LABEL_STORAGE_READ LabelStorageRead;
|
||||||
|
EFI_NVDIMM_LABEL_STORAGE_WRITE LabelStorageWrite;
|
||||||
|
} EFI_NVDIMM_LABEL_PROTOCOL;
|
||||||
|
|
||||||
////
|
////
|
||||||
// EFI UFS Device Config Protocol
|
// EFI UFS Device Config Protocol
|
||||||
///
|
///
|
||||||
|
|
||||||
|
#define EFI_UFS_DEVICE_CONFIG_GUID {0xb81bfab0,0xeb3,0x4cf9, {0x84,0x65,0x7f,0xa9,0x86,0x36,0x16,0x64}}
|
||||||
|
|
||||||
|
typedef struct _EFI_UFS_DEVICE_CONFIG_PROTOCOL EFI_UFS_DEVICE_CONFIG_PROTOCOL;
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_DESCRIPTOR)(
|
||||||
|
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||||
|
IN BOOLEAN Read,
|
||||||
|
IN UINT8 DescId,
|
||||||
|
IN UINT8 Index,
|
||||||
|
IN UINT8 Selector,
|
||||||
|
IN OUT UINT8 Descriptor,
|
||||||
|
IN OUT UINT32 *DescSize
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_FLAG)(
|
||||||
|
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||||
|
IN BOOLEAN Read,
|
||||||
|
IN UINT8 FlagId,
|
||||||
|
IN OUT UINT8 *Flag
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_ATTRIBUTE)(
|
||||||
|
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||||
|
IN BOOLEAN Read,
|
||||||
|
IN UINT8 AttrId,
|
||||||
|
IN UINT8 Index,
|
||||||
|
IN UINT8 Selector,
|
||||||
|
IN OUT UINT8 *Attribute,
|
||||||
|
IN OUT UINT32 *AttrSize
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct _EFI_UFS_DEVICE_CONFIG_PROTOCOL {
|
||||||
|
EFI_UFS_DEVICE_CONFIG_RW_DESCRIPTOR RwUfsDescriptor;
|
||||||
|
EFI_UFS_DEVICE_CONFIG_RW_FLAG RwUfsFlag;
|
||||||
|
EFI_UFS_DEVICE_CONFIG_RW_ATTRIBUTE RwUfsAttribute;
|
||||||
|
} EFI_UFS_DEVICE_CONFIG_PROTOCOL;
|
||||||
|
|
||||||
#endif /* EFI_PROTOCOLS_MEDIA_ACCESS_H */
|
#endif /* EFI_PROTOCOLS_MEDIA_ACCESS_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue