summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal/DevicePath
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-14 02:02:43 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-14 02:02:43 +0000
commit2c3b5ec562c7b43a73424e1be25e2053d1edfe4f (patch)
tree01495edfd3c8cdd9ae39054443a47b198bc48e10 /EdkModulePkg/Universal/DevicePath
parent9db9711c414fe3207ffae81b3c1627554c428308 (diff)
downloadedk2-platforms-2c3b5ec562c7b43a73424e1be25e2053d1edfe4f.tar.xz
Clean up the gBS sevice (CopyMem, SetMem, AllocatePool, FreePool) with the corresponding APIs defined in Mde library class for these modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2456 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/DevicePath')
-rw-r--r--EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.h2
-rw-r--r--EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.msa24
-rw-r--r--EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c16
-rw-r--r--EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c6
4 files changed, 23 insertions, 25 deletions
diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.h b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.h
index f74a65c48b..d7311aa00a 100644
--- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.h
+++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.h
@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
- DevicePathDriver.h
+ DevicePath.h
Abstract:
Definition for Device Path Utilities driver
diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.msa b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.msa
index 541c01482d..bd082809e3 100644
--- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.msa
+++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.msa
@@ -6,8 +6,9 @@
<GuidValue>9B680FCE-AD6B-4F3A-B60B-F59899003443</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for Device Path Driver.</Abstract>
- <Description>This driver is for DevicePathUtilities, DevicePahtToText and DevicePathFromText</Description>
- <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <Description>This driver implement these three UEFI deveice path protocols (
+ DevicePathUtilities, DevicePahtToText and DevicePathFromText) and install them.</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. 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
@@ -22,19 +23,18 @@
<OutputFileBasename>DevicePath</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword>
+ <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3">
<Keyword>PrintLib</Keyword>
+ <HelpText>Recommended libary Instance is BasePrintLib instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverEntryPoint</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
@@ -46,8 +46,9 @@
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiBootServicesTableLib</Keyword>
</LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0">
<Keyword>DevicePathLib</Keyword>
+ <HelpText>Recommended libary Instance is UefiDevicePathLib instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>PcdLib</Keyword>
@@ -68,9 +69,6 @@
<Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiDebugPortProtocolGuid</ProtocolCName>
</Protocol>
- <Protocol Usage="ALWAYS_CONSUMED">
- <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
- </Protocol>
<Protocol Usage="ALWAYS_PRODUCED">
<ProtocolCName>gEfiDevicePathUtilitiesProtocolGuid</ProtocolCName>
</Protocol>
@@ -103,13 +101,13 @@
</Extern>
</Externs>
<PcdCoded>
- <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_PRODUCED">
<C_Name>PcdDevicePathSupportDevicePathToText</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DefaultValue>FALSE</DefaultValue>
<HelpText>If TRUE, then the Device Path To Text Protocol should be produced by the platform</HelpText>
</PcdEntry>
- <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_PRODUCED">
<C_Name>PcdDevicePathSupportDevicePathFromText</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DefaultValue>FALSE</DefaultValue>
diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c
index 3014b200ac..94a4a2b5b7 100644
--- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c
+++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c
@@ -2277,10 +2277,10 @@ ConvertTextToDeviceNode (
DeviceNode = DumpNode (DeviceNodeStr);
} else {
DeviceNode = DumpNode (ParamStr);
- gBS->FreePool (ParamStr);
+ FreePool (ParamStr);
}
- gBS->FreePool (DeviceNodeStr);
+ FreePool (DeviceNodeStr);
return DeviceNode;
}
@@ -2346,12 +2346,12 @@ ConvertTextToDevicePath (
DeviceNode = DumpNode (DeviceNodeStr);
} else {
DeviceNode = DumpNode (ParamStr);
- gBS->FreePool (ParamStr);
+ FreePool (ParamStr);
}
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
- gBS->FreePool (DevicePath);
- gBS->FreePool (DeviceNode);
+ FreePool (DevicePath);
+ FreePool (DeviceNode);
DevicePath = NewDevicePath;
if (IsInstanceEnd) {
@@ -2359,12 +2359,12 @@ ConvertTextToDevicePath (
SetDevicePathInstanceEndNode (DeviceNode);
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
- gBS->FreePool (DevicePath);
- gBS->FreePool (DeviceNode);
+ FreePool (DevicePath);
+ FreePool (DeviceNode);
DevicePath = NewDevicePath;
}
}
- gBS->FreePool (DevicePathStr);
+ FreePool (DevicePathStr);
return DevicePath;
}
diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c
index 03150706c7..f1365baa26 100644
--- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c
+++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c
@@ -132,7 +132,7 @@ ReallocatePool (
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
}
- gBS->FreePool (OldPool);
+ FreePool (OldPool);
}
return NewPool;
@@ -196,7 +196,7 @@ CatPrint (
Str->Len = Size - sizeof (UINT16);
}
- gBS->FreePool (AppendStr);
+ FreePool (AppendStr);
return Str->Str;
}
@@ -1488,7 +1488,7 @@ ConvertDevicePathToText (
//
// Shrink pool used for string allocation
//
- gBS->FreePool (UnpackDevPath);
+ FreePool (UnpackDevPath);
NewSize = (Str.Len + 1) * sizeof (CHAR16);
Str.Str = ReallocatePool (Str.Str, NewSize, NewSize);