/** @file\r
DevicePathToText protocol as defined in the UEFI 2.0 specification.\r
\r
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2013 - 2015, 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
);\r
}\r
\r
+/**\r
+ Converts a BMC device path structure to its string representative.\r
+\r
+ @param Str The string representative of input device.\r
+ @param DevPath The input device path structure.\r
+ @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation\r
+ of the display node is used, where applicable. If DisplayOnly\r
+ is FALSE, then the longer text representation of the display node\r
+ is used.\r
+ @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text\r
+ representation for a device node can be used, where applicable.\r
+\r
+**/\r
+VOID\r
+DevPathToTextBmc (\r
+ IN OUT POOL_PRINT *Str,\r
+ IN VOID *DevPath,\r
+ IN BOOLEAN DisplayOnly,\r
+ IN BOOLEAN AllowShortcuts\r
+ )\r
+{\r
+ BMC_DEVICE_PATH *Bmc;\r
+\r
+ Bmc = DevPath;\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"Bmc(0x%x,0x%lx)",\r
+ Bmc->InterfaceType,\r
+ ReadUnaligned64 ((UINT64 *) (&Bmc->BaseAddress))\r
+ );\r
+}\r
+\r
/**\r
Converts a ACPI device path structure to its string representative.\r
\r
Bluetooth = DevPath;\r
UefiDevicePathLibCatPrint (\r
Str,\r
- L"Bluetooth(%02x:%02x:%02x:%02x:%02x:%02x)",\r
+ L"Bluetooth(%02x%02x%02x%02x%02x%02x)",\r
Bluetooth->BD_ADDR.Address[5],\r
Bluetooth->BD_ADDR.Address[4],\r
Bluetooth->BD_ADDR.Address[3],\r
);\r
}\r
\r
+/**\r
+ Converts a Wi-Fi device path structure to its string representative.\r
+\r
+ @param Str The string representative of input device.\r
+ @param DevPath The input device path structure.\r
+ @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation\r
+ of the display node is used, where applicable. If DisplayOnly\r
+ is FALSE, then the longer text representation of the display node\r
+ is used.\r
+ @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text\r
+ representation for a device node can be used, where applicable.\r
+\r
+**/\r
+VOID\r
+DevPathToTextWiFi (\r
+ IN OUT POOL_PRINT *Str,\r
+ IN VOID *DevPath,\r
+ IN BOOLEAN DisplayOnly,\r
+ IN BOOLEAN AllowShortcuts\r
+ )\r
+{\r
+ WIFI_DEVICE_PATH *WiFi;\r
+\r
+ WiFi = DevPath;\r
+ UefiDevicePathLibCatPrint (Str, L"WiFi(%a)", WiFi->SSId);\r
+}\r
+\r
/**\r
Converts a URI device path structure to its string representative.\r
\r
);\r
}\r
\r
+/**\r
+ Converts a Ram Disk device path structure to its string representative.\r
+\r
+ @param Str The string representative of input device.\r
+ @param DevPath The input device path structure.\r
+ @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation\r
+ of the display node is used, where applicable. If DisplayOnly\r
+ is FALSE, then the longer text representation of the display node\r
+ is used.\r
+ @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text\r
+ representation for a device node can be used, where applicable.\r
+\r
+**/\r
+VOID\r
+DevPathToTextRamDisk (\r
+ IN OUT POOL_PRINT *Str,\r
+ IN VOID *DevPath,\r
+ IN BOOLEAN DisplayOnly,\r
+ IN BOOLEAN AllowShortcuts\r
+ )\r
+{\r
+ MEDIA_RAM_DISK_DEVICE_PATH *RamDisk;\r
+\r
+ RamDisk = DevPath;\r
+\r
+ if (CompareGuid (&RamDisk->TypeGuid, &gEfiVirtualDiskGuid)) {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"VirtualDisk(0x%lx,0x%lx,%d)",\r
+ LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],\r
+ LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],\r
+ RamDisk->Instance\r
+ );\r
+ } else if (CompareGuid (&RamDisk->TypeGuid, &gEfiVirtualCdGuid)) {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"VirtualCD(0x%lx,0x%lx,%d)",\r
+ LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],\r
+ LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],\r
+ RamDisk->Instance\r
+ );\r
+ } else if (CompareGuid (&RamDisk->TypeGuid, &gEfiPersistentVirtualDiskGuid)) {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"PersistentVirtualDisk(0x%lx,0x%lx,%d)",\r
+ LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],\r
+ LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],\r
+ RamDisk->Instance\r
+ );\r
+ } else if (CompareGuid (&RamDisk->TypeGuid, &gEfiPersistentVirtualCdGuid)) {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"PersistentVirtualCD(0x%lx,0x%lx,%d)",\r
+ LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],\r
+ LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],\r
+ RamDisk->Instance\r
+ );\r
+ } else {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"RamDisk(0x%lx,0x%lx,%d,%g)",\r
+ LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],\r
+ LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],\r
+ RamDisk->Instance,\r
+ &RamDisk->TypeGuid\r
+ );\r
+ }\r
+}\r
+\r
/**\r
Converts a BIOS Boot Specification device path structure to its string representative.\r
\r
{HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, DevPathToTextMemMap },\r
{HARDWARE_DEVICE_PATH, HW_VENDOR_DP, DevPathToTextVendor },\r
{HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, DevPathToTextController },\r
+ {HARDWARE_DEVICE_PATH, HW_BMC_DP, DevPathToTextBmc },\r
{ACPI_DEVICE_PATH, ACPI_DP, DevPathToTextAcpi },\r
{ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, DevPathToTextAcpiEx },\r
{ACPI_DEVICE_PATH, ACPI_ADR_DP, DevPathToTextAcpiAdr },\r
{MESSAGING_DEVICE_PATH, MSG_VLAN_DP, DevPathToTextVlan },\r
{MESSAGING_DEVICE_PATH, MSG_URI_DP, DevPathToTextUri },\r
{MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_DP, DevPathToTextBluetooth },\r
+ {MESSAGING_DEVICE_PATH, MSG_WIFI_DP, DevPathToTextWiFi },\r
{MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, DevPathToTextHardDrive },\r
{MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, DevPathToTextCDROM },\r
{MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, DevPathToTextVendor },\r
{MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_VOL_DP, DevPathToTextFv },\r
{MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_FILE_DP, DevPathToTextFvFile },\r
{MEDIA_DEVICE_PATH, MEDIA_RELATIVE_OFFSET_RANGE_DP, DevPathRelativeOffsetRange },\r
+ {MEDIA_DEVICE_PATH, MEDIA_RAM_DISK_DP, DevPathToTextRamDisk },\r
{BBS_DEVICE_PATH, BBS_BBS_DP, DevPathToTextBBS },\r
{END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, DevPathToTextEndInstance },\r
{0, 0, NULL}\r