diff options
author | Feng Tian <feng.tian@intel.com> | 2016-03-22 23:15:53 +0800 |
---|---|---|
committer | Feng Tian <feng.tian@intel.com> | 2016-03-30 11:18:04 +0800 |
commit | 5c67fb2f4c61f8b42f9711b1660b29d91109636f (patch) | |
tree | f137042556bf122bb7e1eaf7503f168d7230eee3 /MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | |
parent | 03e17578402a7b0dad5def719170429ad570a21f (diff) | |
download | edk2-5c67fb2f4c61f8b42f9711b1660b29d91109636f.tar.gz edk2-5c67fb2f4c61f8b42f9711b1660b29d91109636f.tar.bz2 edk2-5c67fb2f4c61f8b42f9711b1660b29d91109636f.zip |
MdePkg/DevicePath: Add EMMC device path definition
This device path node is introduced in UEFI2.6 spec.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c')
-rw-r--r-- | MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c index 6a9b389ca5..961ccb5489 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c @@ -1903,6 +1903,34 @@ DevPathFromTextSd ( }
/**
+ Converts a text device path node to EMMC (Embedded MMC) device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to the newly-created EMMC device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextEmmc (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ CHAR16 *SlotNumberStr;
+ EMMC_DEVICE_PATH *Emmc;
+
+ SlotNumberStr = GetNextParamStr (&TextDeviceNode);
+ Emmc = (EMMC_DEVICE_PATH *) CreateDeviceNode (
+ MESSAGING_DEVICE_PATH,
+ MSG_EMMC_DP,
+ (UINT16) sizeof (EMMC_DEVICE_PATH)
+ );
+
+ Emmc->SlotNumber = (UINT8) Strtoi (SlotNumberStr);
+
+ return (EFI_DEVICE_PATH_PROTOCOL *) Emmc;
+}
+
+/**
Converts a text device path node to Debug Port device path structure.
@param TextDeviceNode The input Text device path node.
@@ -3501,6 +3529,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevP {L"NVMe", DevPathFromTextNVMe },
{L"UFS", DevPathFromTextUfs },
{L"SD", DevPathFromTextSd },
+ {L"Emmc", DevPathFromTextEmmc },
{L"DebugPort", DevPathFromTextDebugPort },
{L"MAC", DevPathFromTextMAC },
{L"IPv4", DevPathFromTextIPv4 },
|