diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-23 16:20:43 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-23 16:20:43 +0000 |
commit | 48557c6550adecf39e1e8e140b1736275d070dfb (patch) | |
tree | 115213a1ad58d23aac000e3fa0a4c10469770b6e /MdeModulePkg/Universal/DevicePathDxe | |
parent | a387653db209935677f95ef01608a533bc51633f (diff) | |
download | edk2-48557c6550adecf39e1e8e140b1736275d070dfb.tar.gz |
Code scrub DxeIpl, Runtime, DevicePath, FvbServicesLib, DiskIo, Partition, English, EBC.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7105 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DevicePathDxe')
5 files changed, 85 insertions, 91 deletions
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePath.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePath.c index 660b595de5..ca39b03658 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePath.c +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePath.c @@ -46,8 +46,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_GUID mEfiDevicePathMessagingSASGuid /**
The user Entry Point for DevicePath module.
- This is the entrhy point for DevicePath module. It installs the UEFI Device Path Utility Protocol and
- optionall the Device Path to Text and Device Path from Text protocols based on feature flags.
+ This is the entry point for DevicePath module. It installs the UEFI Device Path Utility Protocol and
+ optionally the Device Path to Text and Device Path from Text protocols based on feature flags.
@param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePath.h b/MdeModulePkg/Universal/DevicePathDxe/DevicePath.h index b1f398ddad..7baa48bca7 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePath.h +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePath.h @@ -31,14 +31,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/DevicePathLib.h>
#include <Library/PcdLib.h>
-extern const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid;
-extern const EFI_GUID mEfiDevicePathMessagingSASGuid;
#define MAX_CHAR 480
-#define MIN_ALIGNMENT_SIZE sizeof(UINTN)
-#define ALIGN_SIZE(a) ((a % MIN_ALIGNMENT_SIZE) ? MIN_ALIGNMENT_SIZE - (a % MIN_ALIGNMENT_SIZE) : 0)
-
#define IS_COMMA(a) ((a) == L',')
#define IS_HYPHEN(a) ((a) == L'-')
#define IS_DOT(a) ((a) == L'.')
@@ -47,11 +42,8 @@ extern const EFI_GUID mEfiDevicePathMessagingSASGuid; #define IS_SLASH(a) ((a) == L'/')
#define IS_NULL(a) ((a) == L'\0')
-#define DEVICE_NODE_END 1
-#define DEVICE_PATH_INSTANCE_END 2
-#define DEVICE_PATH_END 3
-#define SET_DEVICE_PATH_INSTANCE_END_NODE(a) { \
+#define SET_DEVICE_PATH_INSTANCE_END_NODE(a) { \
(a)->Type = END_DEVICE_PATH_TYPE; \
(a)->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; \
(a)->Length[0] = sizeof (EFI_DEVICE_PATH_PROTOCOL); \
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf index 42ca228a98..4ccbb7b82c 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf @@ -1,9 +1,10 @@ #/** @file
+# Device path driver that produces three UEFI device path protocols.
#
-# Component description file for Device Path Driver.
-#
-# This driver implement these three UEFI deveice path protocols (
-# DevicePathUtilities, DevicePahtToText and DevicePathFromText) and install them.
+# This driver produces Device Path Utilities protocol and optionally
+# DevicePahtToText and DevicePathFromText protocols based on feature flags
+# PcdDevicePathSupportDevicePathToText & PcdDevicePathSupportDevicePathFromText
+# respectively.
#
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials
@@ -57,7 +58,9 @@ gEfiVT100Guid # ALWAYS_CONSUMED
gEfiVT100PlusGuid # ALWAYS_CONSUMED
gEfiPcAnsiGuid # ALWAYS_CONSUMED
-
+ gEfiUartDevicePathGuid # ALWAYS_CONSUMED
+ gEfiSasDevicePathGuid # ALWAYS_CONSUMED
+
[Protocols]
gEfiDevicePathToTextProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiDevicePathFromTextProtocolGuid # PROTOCOL ALWAYS_PRODUCED
@@ -70,4 +73,3 @@ [Depex]
TRUE
-
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c index dbd371ce70..e0f1fcea48 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c @@ -1504,7 +1504,7 @@ DevPathFromTextUartFlowCtrl ( sizeof (UART_FLOW_CONTROL_DEVICE_PATH)
);
- CopyGuid (&UartFlowControl->Guid, &mEfiDevicePathMessagingUartFlowControlGuid);
+ CopyGuid (&UartFlowControl->Guid, &gEfiUartDevicePathGuid);
if (StrCmp (ValueStr, L"XonXoff") == 0) {
UartFlowControl->FlowControlMap = 2;
} else if (StrCmp (ValueStr, L"Hardware") == 0) {
@@ -1555,7 +1555,7 @@ DevPathFromTextSAS ( sizeof (SAS_DEVICE_PATH)
);
- CopyGuid (&Sas->Guid, &mEfiDevicePathMessagingSASGuid);
+ CopyGuid (&Sas->Guid, &gEfiSasDevicePathGuid);
Strtoi64 (AddressStr, &Sas->SasAddress);
Strtoi64 (LunStr, &Sas->Lun);
Sas->RelativeTargetPort = (UINT16) Strtoi (RTPStr);
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c index 5de21b1f9d..2e4a976adc 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c @@ -55,10 +55,10 @@ CatPrint ( Size = StrSize (AppendStr) - sizeof (UINT16);
Size = Size + StrSize (Str->Str);
Str->Str = ReallocatePool (
- StrSize (Str->Str),
- Size,
- Str->Str
- );
+ StrSize (Str->Str),
+ Size,
+ Str->Str
+ );
ASSERT (Str->Str != NULL);
}
@@ -73,9 +73,9 @@ CatPrint ( }
/**
- Converts a PCI device path structure to its string representive.
+ Converts a PCI device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -100,9 +100,9 @@ DevPathToTextPci ( }
/**
- Converts a PC Card device path structure to its string representive.
+ Converts a PC Card device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -127,9 +127,9 @@ DevPathToTextPccard ( }
/**
- Converts a Memory Map device path structure to its string representive.
+ Converts a Memory Map device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -160,9 +160,9 @@ DevPathToTextMemMap ( }
/**
- Converts a Vendor device path structure to its string representive.
+ Converts a Vendor device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -208,7 +208,7 @@ DevPathToTextVendor ( } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {
CatPrint (Str, L"VenUft8()");
return ;
- } else if (CompareGuid (&Vendor->Guid, &mEfiDevicePathMessagingUartFlowControlGuid)) {
+ } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {
FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);
switch (FlowControlMap & 0x00000003) {
case 0:
@@ -228,7 +228,7 @@ DevPathToTextVendor ( }
return ;
- } else if (CompareGuid (&Vendor->Guid, &mEfiDevicePathMessagingSASGuid)) {
+ } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) {
CatPrint (
Str,
L"SAS(0x%lx,0x%lx,0x%x,",
@@ -287,9 +287,9 @@ DevPathToTextVendor ( }
/**
- Converts a Controller device path structure to its string representive.
+ Converts a Controller device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -318,9 +318,9 @@ DevPathToTextController ( }
/**
- Converts a ACPI device path structure to its string representive.
+ Converts a ACPI device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -404,9 +404,9 @@ EisaIdToText ( }
/**
- Converts a ACPI extended HID device path structure to its string representive.
+ Converts a ACPI extended HID device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -488,9 +488,9 @@ DevPathToTextAcpiEx ( }
/**
- Converts a ACPI address device path structure to its string representive.
+ Converts a ACPI address device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -525,9 +525,9 @@ DevPathToTextAcpiAdr ( }
/**
- Converts a ATAPI device path structure to its string representive.
+ Converts a ATAPI device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -563,9 +563,9 @@ DevPathToTextAtapi ( }
/**
- Converts a SCSI device path structure to its string representive.
+ Converts a SCSI device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -590,9 +590,9 @@ DevPathToTextScsi ( }
/**
- Converts a Fibre device path structure to its string representive.
+ Converts a Fibre device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -617,9 +617,9 @@ DevPathToTextFibre ( }
/**
- Converts a 1394 device path structure to its string representive.
+ Converts a 1394 device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -647,9 +647,9 @@ DevPathToText1394 ( }
/**
- Converts a USB device path structure to its string representive.
+ Converts a USB device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -674,9 +674,9 @@ DevPathToTextUsb ( }
/**
- Converts a USB WWID device path structure to its string representive.
+ Converts a USB WWID device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -723,9 +723,9 @@ DevPathToTextUsbWWID ( }
/**
- Converts a Logic Unit device path structure to its string representive.
+ Converts a Logic Unit device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -750,9 +750,9 @@ DevPathToTextLogicalUnit ( }
/**
- Converts a USB class device path structure to its string representive.
+ Converts a USB class device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -886,9 +886,9 @@ DevPathToTextUsbClass ( }
/**
- Converts a SATA device path structure to its string representive.
+ Converts a SATA device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -919,9 +919,9 @@ DevPathToTextSata ( }
/**
- Converts a I20 device path structure to its string representive.
+ Converts a I20 device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -946,9 +946,9 @@ DevPathToTextI2O ( }
/**
- Converts a MAC address device path structure to its string representive.
+ Converts a MAC address device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -987,9 +987,9 @@ DevPathToTextMacAddr ( }
/**
- Converts a IPv4 device path structure to its string representive.
+ Converts a IPv4 device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1039,9 +1039,9 @@ DevPathToTextIPv4 ( }
/**
- Converts a IPv6 device path structure to its string representive.
+ Converts a IPv6 device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1127,9 +1127,9 @@ DevPathToTextIPv6 ( }
/**
- Converts an Infini Band device path structure to its string representive.
+ Converts an Infini Band device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1162,9 +1162,9 @@ DevPathToTextInfiniBand ( }
/**
- Converts a UART device path structure to its string representive.
+ Converts a UART device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1254,9 +1254,9 @@ DevPathToTextUart ( }
/**
- Converts an iSCSI device path structure to its string representive.
+ Converts an iSCSI device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1302,9 +1302,9 @@ DevPathToTextiSCSI ( }
/**
- Converts a Hard drive device path structure to its string representive.
+ Converts a Hard drive device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1360,9 +1360,9 @@ DevPathToTextHardDrive ( }
/**
- Converts a CDROM device path structure to its string representive.
+ Converts a CDROM device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1392,9 +1392,9 @@ DevPathToTextCDROM ( }
/**
- Converts a File device path structure to its string representive.
+ Converts a File device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1419,9 +1419,9 @@ DevPathToTextFilePath ( }
/**
- Converts a Media protocol device path structure to its string representive.
+ Converts a Media protocol device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1446,9 +1446,9 @@ DevPathToTextMediaProtocol ( }
/**
- Converts a Firmware Volume device path structure to its string representive.
+ Converts a Firmware Volume device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1473,9 +1473,9 @@ DevPathToTextFv ( }
/**
- Converts a Firmware Volume File device path structure to its string representive.
+ Converts a Firmware Volume File device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1500,9 +1500,9 @@ DevPathToTextFvFile ( }
/**
- Converts a BIOS Boot Specification device path structure to its string representive.
+ Converts a BIOS Boot Specification device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1569,9 +1569,9 @@ DevPathToTextBBS ( }
/**
- Converts an End-of-Device-Path structure to its string representive.
+ Converts an End-of-Device-Path structure to its string representative.
- @param Str The string representive of input device.
+ @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
@@ -1593,9 +1593,9 @@ DevPathToTextEndInstance ( }
/**
- Converts an unknown device path structure to its string representive.
+ Converts an unknown device path structure to its string representative.
- @param Str The string representive of input device.
+ @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
|