MdeModulePkg/EmmcDxe: Implementation of Disk Information Protocol

Adds the implementation of Disk Information Protocol for EMMC devices per
PI 1.6 spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Hao Wu
2017-07-03 08:41:16 +08:00
parent af6a6bf41b
commit 19b2cb5c11
5 changed files with 281 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
This file defines common data structures, macro definitions and some module
internal function header files.
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -26,6 +26,7 @@
#include <Protocol/BlockIo2.h>
#include <Protocol/StorageSecurityCommand.h>
#include <Protocol/EraseBlock.h>
#include <Protocol/DiskInfo.h>
#include <Protocol/DevicePath.h>
@@ -40,6 +41,8 @@
#include <Library/UefiRuntimeServicesTableLib.h>
#include "EmmcBlockIo.h"
#include "EmmcDiskInfo.h"
//
// Global Variables
//
@@ -61,6 +64,9 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gEmmcDxeComponentName2;
#define EMMC_PARTITION_DATA_FROM_ERASEBLK(a) \
CR(a, EMMC_PARTITION, EraseBlock, EMMC_PARTITION_SIGNATURE)
#define EMMC_PARTITION_DATA_FROM_DISKINFO(a) \
CR(a, EMMC_PARTITION, DiskInfo, EMMC_PARTITION_SIGNATURE)
//
// Take 2.5 seconds as generic time out value, 1 microsecond as unit.
//
@@ -102,6 +108,7 @@ typedef struct {
EFI_BLOCK_IO_MEDIA BlockMedia;
EFI_STORAGE_SECURITY_COMMAND_PROTOCOL StorageSecurity;
EFI_ERASE_BLOCK_PROTOCOL EraseBlock;
EFI_DISK_INFO_PROTOCOL DiskInfo;
LIST_ENTRY Queue;