TianoCore EDK2 master
Loading...
Searching...
No Matches
NvdimmLabel.h File Reference

Go to the source code of this file.

Data Structures

struct  EFI_NVDIMM_LABEL_INDEX_BLOCK
 
struct  EFI_NVDIMM_LABEL
 
struct  EFI_NVDIMM_LABEL_SET_COOKIE_MAP
 
struct  EFI_NVDIMM_LABEL_SET_COOKIE_INFO
 
struct  _EFI_NVDIMM_LABEL_PROTOCOL
 

Macros

#define EFI_NVDIMM_LABEL_PROTOCOL_GUID
 
#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_RESERVED   0x00000004
 
#define EFI_NVDIMM_LABEL_FLAGS_UPDATING   0x00000008
 
#define EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND   0x00000010
 

Typedefs

typedef struct _EFI_NVDIMM_LABEL_PROTOCOL EFI_NVDIMM_LABEL_PROTOCOL
 
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)
 

Variables

EFI_GUID gEfiNvdimmLabelProtocolGuid
 

Detailed Description

EFI NVDIMM Label Protocol Definition

The EFI NVDIMM Label Protocol is used to Provides services that allow management of labels contained in a Label Storage Area that are associated with a specific NVDIMM Device Path.

Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol was introduced in UEFI Specification 2.7.

Definition in file NvdimmLabel.h.

Macro Definition Documentation

◆ EFI_NVDIMM_LABEL_FLAGS_LOCAL

#define EFI_NVDIMM_LABEL_FLAGS_LOCAL   0x00000002

When set, the complete label set is local to a single NVDIMM Label Storage Area. When clear, the complete label set is contained on multiple NVDIMM Label Storage Areas. If NLabel is 1 then setting this flag is optional and it is implied that the EFI_NVDIMM_LABEL_FLAGS_LOCAL flag is set as the complete label set is local to a single NVDIMM Label Storage Area.

Definition at line 114 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_FLAGS_RESERVED

#define EFI_NVDIMM_LABEL_FLAGS_RESERVED   0x00000004

This reserved flag is utilized on older implementations and has been deprecated. Do not use.

Definition at line 120 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_FLAGS_ROLABEL

#define EFI_NVDIMM_LABEL_FLAGS_ROLABEL   0x00000001

The label is read-only.

Definition at line 106 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND

#define EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND   0x00000010

When set, the SPALocationCookie in the namespace label is valid and should match the current value in the NFIT SPA Range Structure.

Definition at line 131 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_FLAGS_UPDATING

#define EFI_NVDIMM_LABEL_FLAGS_UPDATING   0x00000008

When set, the label set is being updated.

Definition at line 125 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_INDEX_ALIGN

#define EFI_NVDIMM_LABEL_INDEX_ALIGN   256

Definition at line 27 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_INDEX_SIG_LEN

#define EFI_NVDIMM_LABEL_INDEX_SIG_LEN   16

Definition at line 26 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_NAME_LEN

#define EFI_NVDIMM_LABEL_NAME_LEN   64

Definition at line 101 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_PROTOCOL_GUID

#define EFI_NVDIMM_LABEL_PROTOCOL_GUID
Value:
{ \
0xd40b6b80, 0x97d5, 0x4282, {0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 } \
}

Definition at line 19 of file NvdimmLabel.h.

Typedef Documentation

◆ EFI_NVDIMM_LABEL_PROTOCOL

Definition at line 24 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_STORAGE_INFORMATION

typedef EFI_STATUS(EFIAPI * EFI_NVDIMM_LABEL_STORAGE_INFORMATION) (IN EFI_NVDIMM_LABEL_PROTOCOL *This, OUT UINT32 *SizeOfLabelStorageArea, OUT UINT32 *MaxTransferLength)

Retrieves the Label Storage Area size and the maximum transfer size for the LabelStorageRead and LabelStorageWrite methods.

Parameters
ThisA pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.
SizeOfLabelStorageAreaThe size of the Label Storage Area for the NVDIMM in bytes.
MaxTransferLengthThe maximum number of bytes that can be transferred in a single call to LabelStorageRead or LabelStorageWrite.
Return values
EFI_SUCCESSThe size of theLabel Storage Area and maximum transfer size returned are valid.
EFI_ACCESS_DENIEDThe Label Storage Area for the NVDIMM device is not currently accessible.
EFI_DEVICE_ERRORA physical device error occurred and the data transfer failed to complete.

Definition at line 280 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_STORAGE_READ

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)

Retrieves the label data for the requested offset and length from within the Label Storage Area for the NVDIMM.

Parameters
ThisA pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.
OffsetThe byte offset within the Label Storage Area to read from.
TransferLengthNumber of bytes to read from the Label Storage Area beginning at the byte Offset specified. A TransferLength of 0 reads no data.
LabelDataThe return label data read at the requested offset and length from within the Label Storage Area.
Return values
EFI_SUCCESSThe label data from the Label Storage Area for the NVDIMM was read successfully at the specified Offset and TransferLength and LabelData contains valid data.
EFI_INVALID_PARAMETERAny of the following are true:
  • Offset > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • Offset + TransferLength is > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • TransferLength is > MaxTransferLength reported in the LabelStorageInformation return data.
EFI_ACCESS_DENIEDThe Label Storage Area for the NVDIMM device is not currently accessible and labels cannot be read at this time.
EFI_DEVICE_ERRORA physical device error occurred and the data transfer failed to complete.

Definition at line 311 of file NvdimmLabel.h.

◆ EFI_NVDIMM_LABEL_STORAGE_WRITE

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)

Writes the label data for the requested offset and length in to the Label Storage Area for the NVDIMM.

Parameters
ThisA pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.
OffsetThe byte offset within the Label Storage Area to write to.
TransferLengthNumber of bytes to write to the Label Storage Area beginning at the byte Offset specified. A TransferLength of 0 writes no data.
LabelDataThe return label data write at the requested offset and length from within the Label Storage Area.
Return values
EFI_SUCCESSThe label data from the Label Storage Area for the NVDIMM written read successfully at the specified Offset and TransferLength.
EFI_INVALID_PARAMETERAny of the following are true:
  • Offset > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • Offset + TransferLength is > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • TransferLength is > MaxTransferLength reported in the LabelStorageInformation return data.
EFI_ACCESS_DENIEDThe Label Storage Area for the NVDIMM device is not currently accessible and labels cannot be written at this time.
EFI_DEVICE_ERRORA physical device error occurred and the data transfer failed to complete.

Definition at line 342 of file NvdimmLabel.h.