]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Sd/SdDxe/SdDxe.c
MdeModulePkg/SdDxe: Implementation of Disk Information Protocol
[mirror_edk2.git] / MdeModulePkg / Bus / Sd / SdDxe / SdDxe.c
index 0cf9067701da03a4cc94c136481f8caf94ce89e3..fc060fdb3465ad7a0f8c1f0aee69e055f56c77e1 100644 (file)
@@ -4,7 +4,7 @@
   It produces BlockIo and BlockIo2 protocols to allow upper layer\r
   access the SD memory card device.\r
 \r
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -69,6 +69,13 @@ SD_DEVICE mSdDeviceTemplate = {
     1,\r
     SdEraseBlocks\r
   },\r
+  {                            // DiskInfo\r
+    EFI_DISK_INFO_SD_MMC_INTERFACE_GUID,\r
+    SdDiskInfoInquiry,\r
+    SdDiskInfoIdentify,\r
+    SdDiskInfoSenseData,\r
+    SdDiskInfoWhichIde\r
+  },\r
   {                            // Queue\r
     NULL,\r
     NULL\r
@@ -382,6 +389,8 @@ DiscoverSdDevice (
                   &Device->BlockIo2,\r
                   &gEfiEraseBlockProtocolGuid,\r
                   &Device->EraseBlock,\r
+                  &gEfiDiskInfoProtocolGuid,\r
+                  &Device->DiskInfo,\r
                   NULL\r
                   );\r
 \r
@@ -840,6 +849,8 @@ SdDxeDriverBindingStop (
                     &Device->BlockIo2,\r
                     &gEfiEraseBlockProtocolGuid,\r
                     &Device->EraseBlock,\r
+                    &gEfiDiskInfoProtocolGuid,\r
+                    &Device->DiskInfo,\r
                     NULL\r
                     );\r
     if (EFI_ERROR (Status)) {\r