TianoCore EDK2 master
Loading...
Searching...
No Matches
NvmExpressDiskInfo.c
Go to the documentation of this file.
1
9#include "NvmExpress.h"
10
11EFI_DISK_INFO_PROTOCOL gNvmExpressDiskInfoProtocolTemplate = {
17};
18
28VOID
31 )
32{
33 CopyMem (&Device->DiskInfo, &gNvmExpressDiskInfoProtocolTemplate, sizeof (EFI_DISK_INFO_PROTOCOL));
34}
35
53EFIAPI
56 IN OUT VOID *InquiryData,
57 IN OUT UINT32 *InquiryDataSize
58 )
59{
60 return EFI_NOT_FOUND;
61}
62
82EFIAPI
85 IN OUT VOID *IdentifyData,
86 IN OUT UINT32 *IdentifyDataSize
87 )
88{
89 EFI_STATUS Status;
91
92 Device = NVME_DEVICE_PRIVATE_DATA_FROM_DISK_INFO (This);
93
94 Status = EFI_BUFFER_TOO_SMALL;
95 if (*IdentifyDataSize >= sizeof (Device->NamespaceData)) {
96 Status = EFI_SUCCESS;
97 CopyMem (IdentifyData, &Device->NamespaceData, sizeof (Device->NamespaceData));
98 }
99
100 *IdentifyDataSize = sizeof (Device->NamespaceData);
101 return Status;
102}
103
122EFIAPI
125 IN OUT VOID *SenseData,
126 IN OUT UINT32 *SenseDataSize,
127 OUT UINT8 *SenseDataNumber
128 )
129{
130 return EFI_NOT_FOUND;
131}
132
145EFIAPI
148 OUT UINT32 *IdeChannel,
149 OUT UINT32 *IdeDevice
150 )
151{
152 return EFI_UNSUPPORTED;
153}
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define EFI_DISK_INFO_NVME_INTERFACE_GUID
Definition: DiskInfo.h:65
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS EFIAPI NvmExpressDiskInfoSenseData(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *SenseData, IN OUT UINT32 *SenseDataSize, OUT UINT8 *SenseDataNumber)
VOID InitializeDiskInfo(IN NVME_DEVICE_PRIVATE_DATA *Device)
EFI_STATUS EFIAPI NvmExpressDiskInfoWhichIde(IN EFI_DISK_INFO_PROTOCOL *This, OUT UINT32 *IdeChannel, OUT UINT32 *IdeDevice)
EFI_STATUS EFIAPI NvmExpressDiskInfoIdentify(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *IdentifyData, IN OUT UINT32 *IdentifyDataSize)
EFI_STATUS EFIAPI NvmExpressDiskInfoInquiry(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *InquiryData, IN OUT UINT32 *InquiryDataSize)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112