MdePkg: Add BMC device path definition and its node/text conversion

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17985 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Hao Wu
2015-07-15 03:16:42 +00:00
committed by hwu1225
parent c8c2815802
commit 624f017e17
3 changed files with 90 additions and 0 deletions

View File

@@ -306,6 +306,38 @@ DevPathToTextController (
);
}
/**
Converts a BMC device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
VOID
DevPathToTextBmc (
IN OUT POOL_PRINT *Str,
IN VOID *DevPath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
)
{
BMC_DEVICE_PATH *Bmc;
Bmc = DevPath;
UefiDevicePathLibCatPrint (
Str,
L"Bmc(0x%x,0x%lx)",
Bmc->InterfaceType,
ReadUnaligned64 ((UINT64 *) (&Bmc->BaseAddress))
);
}
/**
Converts a ACPI device path structure to its string representative.
@@ -2089,6 +2121,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLib
{HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, DevPathToTextMemMap },
{HARDWARE_DEVICE_PATH, HW_VENDOR_DP, DevPathToTextVendor },
{HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, DevPathToTextController },
{HARDWARE_DEVICE_PATH, HW_BMC_DP, DevPathToTextBmc },
{ACPI_DEVICE_PATH, ACPI_DP, DevPathToTextAcpi },
{ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, DevPathToTextAcpiEx },
{ACPI_DEVICE_PATH, ACPI_ADR_DP, DevPathToTextAcpiAdr },