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
This commit is contained in:
lgao4 2007-03-14 02:02:43 +00:00
parent 9db9711c41
commit 2c3b5ec562
16 changed files with 536 additions and 405 deletions

View File

@ -2081,249 +2081,6 @@
<FfsFormatKey>BS_DRIVER</FfsFormatKey> <FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions> </ModuleSaBuildOptions>
</ModuleSA> </ModuleSA>
<ModuleSA SupArchList="IA32" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="911D584C-35F7-4955-BEF9-B452769DDC3A">
<Libraries>
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="X64" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="911D584C-35F7-4955-BEF9-B452769DDC3A">
<Libraries>
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="IPF" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="911D584C-35F7-4955-BEF9-B452769DDC3A">
<Libraries>
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="IA32" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="9E863906-A40F-4875-977F-5B93FF237FC6"> <ModuleSA SupArchList="IA32" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" ModuleGuid="9E863906-A40F-4875-977F-5B93FF237FC6">
<Libraries> <Libraries>
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
@ -21147,6 +20904,383 @@
<FfsFormatKey>BS_DRIVER</FfsFormatKey> <FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions> </ModuleSaBuildOptions>
</ModuleSA> </ModuleSA>
<!--Mod: DebugSupport Type: DXE_DRIVER Path: EdkModulePkg\Universal\DebugSupport\Dxe\DebugSupport.msa-->
<ModuleSA ModuleGuid="911D584C-35F7-4955-BEF9-B452769DDC3A" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3" SupArchList="IA32">
<Libraries>
<!--Pkg: MdePkg Mod: BaseLib Path: MdePkg\Library\BaseLib\BaseLib.msa-->
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: UefiDriverEntryPoint Path: MdePkg\Library\UefiDriverEntryPoint\UefiDriverEntryPoint.msa-->
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryAllocationLib Path: MdePkg\Library\DxeMemoryAllocationLib\DxeMemoryAllocationLib.msa-->
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: UefiBootServicesTableLib Path: MdePkg\Library\UefiBootServicesTableLib\UefiBootServicesTableLib.msa-->
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: PeiDxeDebugLibReportStatusCode Path: MdePkg\Library\PeiDxeDebugLibReportStatusCode\PeiDxeDebugLibReportStatusCode.msa-->
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeReportStatusCodeLib Path: MdePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.msa-->
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryLib Path: MdePkg\Library\DxeMemoryLib\DxeMemoryLib.msa-->
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<!--Mod: DebugSupport Type: DXE_DRIVER Path: EdkModulePkg\Universal\DebugSupport\Dxe\DebugSupport.msa-->
<ModuleSA ModuleGuid="911D584C-35F7-4955-BEF9-B452769DDC3A" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3" SupArchList="X64">
<Libraries>
<!--Pkg: MdePkg Mod: UefiDriverEntryPoint Path: MdePkg\Library\UefiDriverEntryPoint\UefiDriverEntryPoint.msa-->
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryAllocationLib Path: MdePkg\Library\DxeMemoryAllocationLib\DxeMemoryAllocationLib.msa-->
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: BaseLib Path: MdePkg\Library\BaseLib\BaseLib.msa-->
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: UefiBootServicesTableLib Path: MdePkg\Library\UefiBootServicesTableLib\UefiBootServicesTableLib.msa-->
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryLib Path: MdePkg\Library\DxeMemoryLib\DxeMemoryLib.msa-->
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: PeiDxeDebugLibReportStatusCode Path: MdePkg\Library\PeiDxeDebugLibReportStatusCode\PeiDxeDebugLibReportStatusCode.msa-->
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeReportStatusCodeLib Path: MdePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.msa-->
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<!--Mod: DebugSupport Type: DXE_DRIVER Path: EdkModulePkg\Universal\DebugSupport\Dxe\DebugSupport.msa-->
<ModuleSA ModuleGuid="911D584C-35F7-4955-BEF9-B452769DDC3A" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3" SupArchList="IPF">
<Libraries>
<!--Pkg: MdePkg Mod: UefiDriverEntryPoint Path: MdePkg\Library\UefiDriverEntryPoint\UefiDriverEntryPoint.msa-->
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: UefiBootServicesTableLib Path: MdePkg\Library\UefiBootServicesTableLib\UefiBootServicesTableLib.msa-->
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: PeiDxeDebugLibReportStatusCode Path: MdePkg\Library\PeiDxeDebugLibReportStatusCode\PeiDxeDebugLibReportStatusCode.msa-->
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeReportStatusCodeLib Path: MdePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.msa-->
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: BaseLib Path: MdePkg\Library\BaseLib\BaseLib.msa-->
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryLib Path: MdePkg\Library\DxeMemoryLib\DxeMemoryLib.msa-->
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryAllocationLib Path: MdePkg\Library\DxeMemoryAllocationLib\DxeMemoryAllocationLib.msa-->
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<!--Mod: DevicePath Type: DXE_DRIVER Path: EdkModulePkg\Universal\DevicePath\Dxe\DevicePath.msa-->
<!--Mod: DevicePath Type: DXE_DRIVER Path: EdkModulePkg\Universal\DevicePath\Dxe\DevicePath.msa-->
<ModuleSA ModuleGuid="9B680FCE-AD6B-4F3A-B60B-F59899003443" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3" SupArchList="EBC">
<Libraries>
<!--Pkg: MdePkg Mod: UefiDriverEntryPoint Path: MdePkg\Library\UefiDriverEntryPoint\UefiDriverEntryPoint.msa-->
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryAllocationLib Path: MdePkg\Library\DxeMemoryAllocationLib\DxeMemoryAllocationLib.msa-->
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: UefiBootServicesTableLib Path: MdePkg\Library\UefiBootServicesTableLib\UefiBootServicesTableLib.msa-->
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: BaseLib Path: MdePkg\Library\BaseLib\BaseLib.msa-->
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: UefiDevicePathLib Path: MdePkg\Library\UefiDevicePathLib\UefiDevicePathLib.msa-->
<Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: PeiDxeDebugLibReportStatusCode Path: MdePkg\Library\PeiDxeDebugLibReportStatusCode\PeiDxeDebugLibReportStatusCode.msa-->
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeReportStatusCodeLib Path: MdePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.msa-->
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
<!--Pkg: MdePkg Mod: DxeMemoryLib Path: MdePkg\Library\DxeMemoryLib\DxeMemoryLib.msa-->
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FEATURE_FLAG">
<C_Name>PcdDevicePathSupportDevicePathToText</C_Name>
<Token>0x00010037</Token>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>BOOLEAN</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>FALSE</Value>
</PcdData>
<PcdData ItemType="FEATURE_FLAG">
<C_Name>PcdDevicePathSupportDevicePathFromText</C_Name>
<Token>0x00010038</Token>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>BOOLEAN</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>FALSE</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x06</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
</FrameworkModules> </FrameworkModules>
<DynamicPcdBuildDefinitions> <DynamicPcdBuildDefinitions>
<PcdBuildData ItemType="DYNAMIC"> <PcdBuildData ItemType="DYNAMIC">

View File

@ -1333,7 +1333,7 @@ Returns:
CopyMem (Ptr, *Buffer, OldSize); CopyMem (Ptr, *Buffer, OldSize);
if (*Buffer != NULL) { if (*Buffer != NULL) {
gBS->FreePool (*Buffer); FreePool (*Buffer);
} }
*Buffer = Ptr; *Buffer = Ptr;
@ -1573,7 +1573,7 @@ Returns:
// //
// Free the old buffer // Free the old buffer
// //
gBS->FreePool (OldTextOutModeMap); FreePool (OldTextOutModeMap);
} }
return EFI_SUCCESS; return EFI_SUCCESS;
@ -1924,8 +1924,8 @@ Returns:
mStdErr.TextOut.SetMode (&(mStdErr.TextOut), 0); mStdErr.TextOut.SetMode (&(mStdErr.TextOut), 0);
} }
gBS->FreePool (ConOutMapTable); FreePool (ConOutMapTable);
gBS->FreePool (StdErrMapTable); FreePool (StdErrMapTable);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -1986,7 +1986,7 @@ Returns:
if (ModeBuffer == NULL) { if (ModeBuffer == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
gBS->FreePool (Private->GraphicsOutputModeBuffer); FreePool (Private->GraphicsOutputModeBuffer);
Private->GraphicsOutputModeBuffer = ModeBuffer; Private->GraphicsOutputModeBuffer = ModeBuffer;
// //
@ -2001,7 +2001,7 @@ Returns:
Mode->HorizontalResolution = Info->HorizontalResolution; Mode->HorizontalResolution = Info->HorizontalResolution;
Mode->VerticalResolution = Info->VerticalResolution; Mode->VerticalResolution = Info->VerticalResolution;
Mode++; Mode++;
gBS->FreePool (Info); FreePool (Info);
} }
} else { } else {
// //
@ -2025,10 +2025,10 @@ Returns:
if ((Info->HorizontalResolution == Mode->HorizontalResolution) && if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&
(Info->VerticalResolution == Mode->VerticalResolution)){ (Info->VerticalResolution == Mode->VerticalResolution)){
Match = TRUE; Match = TRUE;
gBS->FreePool (Info); FreePool (Info);
break; break;
} }
gBS->FreePool (Info); FreePool (Info);
} }
if (Match) { if (Match) {
@ -2042,7 +2042,7 @@ Returns:
// //
// Drop the old mode buffer, assign it to a new one // Drop the old mode buffer, assign it to a new one
// //
gBS->FreePool (Private->GraphicsOutputModeBuffer); FreePool (Private->GraphicsOutputModeBuffer);
Private->GraphicsOutputModeBuffer = ModeBuffer; Private->GraphicsOutputModeBuffer = ModeBuffer;
// //
@ -2305,7 +2305,7 @@ Returns:
Private->TextOutQueryDataCount * sizeof (TEXT_OUT_SPLITTER_QUERY_DATA) Private->TextOutQueryDataCount * sizeof (TEXT_OUT_SPLITTER_QUERY_DATA)
); );
gBS->FreePool (Private->TextOutModeMap); FreePool (Private->TextOutModeMap);
Private->TextOutModeMap = NULL; Private->TextOutModeMap = NULL;
TextOutList = Private->TextOutList; TextOutList = Private->TextOutList;
@ -3033,7 +3033,7 @@ ConSplitterTextOutOutputString (
} }
if (BackSpaceCount) { if (BackSpaceCount) {
gBS->FreePool (TargetString); FreePool (TargetString);
} }
return ReturnStatus; return ReturnStatus;

View File

@ -192,7 +192,6 @@ ConSpliterGraphicsOutputQueryMode (
--*/ --*/
{ {
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private; TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status;
TEXT_OUT_GOP_MODE *Mode; TEXT_OUT_GOP_MODE *Mode;
if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) { if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {
@ -208,13 +207,10 @@ ConSpliterGraphicsOutputQueryMode (
return EFI_NOT_STARTED; return EFI_NOT_STARTED;
} }
Status = gBS->AllocatePool ( *Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
EfiBootServicesData,
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION), if (*Info == NULL) {
(VOID **) Info return EFI_OUT_OF_RESOURCES;
);
if (EFI_ERROR (Status)) {
return Status;
} }
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@ -282,7 +278,7 @@ Routine Description:
// Free the old version // Free the old version
// //
if (Private->GraphicsOutputBlt != NULL) { if (Private->GraphicsOutputBlt != NULL) {
gBS->FreePool (Private->GraphicsOutputBlt); FreePool (Private->GraphicsOutputBlt);
} }
// //
@ -316,10 +312,10 @@ Routine Description:
return Status; return Status;
} }
if ((Info->HorizontalResolution == Mode->HorizontalResolution) && (Info->VerticalResolution == Mode->VerticalResolution)) { if ((Info->HorizontalResolution == Mode->HorizontalResolution) && (Info->VerticalResolution == Mode->VerticalResolution)) {
gBS->FreePool (Info); FreePool (Info);
break; break;
} }
gBS->FreePool (Info); FreePool (Info);
} }
Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex); Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);
@ -754,7 +750,7 @@ ConSpliterUgaDrawSetMode (
// //
// Free the old version // Free the old version
// //
gBS->FreePool (Private->UgaBlt); FreePool (Private->UgaBlt);
// //
// Allocate the virtual Blt buffer // Allocate the virtual Blt buffer
@ -1319,7 +1315,7 @@ DevNullTextOutSetMode (
Private->DevNullColumns = Column; Private->DevNullColumns = Column;
Private->DevNullRows = Row; Private->DevNullRows = Row;
gBS->FreePool (Private->DevNullScreen); FreePool (Private->DevNullScreen);
Size = (Row * (Column + 1)) * sizeof (CHAR16); Size = (Row * (Column + 1)) * sizeof (CHAR16);
Private->DevNullScreen = AllocateZeroPool (Size); Private->DevNullScreen = AllocateZeroPool (Size);
@ -1327,7 +1323,7 @@ DevNullTextOutSetMode (
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
gBS->FreePool (Private->DevNullAttributes); FreePool (Private->DevNullAttributes);
Size = Row * Column * sizeof (INT32); Size = Row * Column * sizeof (INT32);
Private->DevNullAttributes = AllocateZeroPool (Size); Private->DevNullAttributes = AllocateZeroPool (Size);
@ -1604,7 +1600,7 @@ DevNullSyncGopStdOut (
} }
} }
gBS->FreePool (Buffer); FreePool (Buffer);
return ReturnStatus; return ReturnStatus;
} }

View File

@ -320,12 +320,12 @@ GraphicsConsoleControllerDriverStart (
// //
Package = PreparePackages (1, NULL, FontPack); Package = PreparePackages (1, NULL, FontPack);
mHii->NewPack (mHii, Package, &(Private->HiiHandle)); mHii->NewPack (mHii, Package, &(Private->HiiHandle));
gBS->FreePool (Package); FreePool (Package);
// //
// Free the font database // Free the font database
// //
gBS->FreePool (FontPack); FreePool (FontPack);
// //
// If the current mode information can not be retrieved, then attemp to set the default mode // If the current mode information can not be retrieved, then attemp to set the default mode
@ -350,11 +350,11 @@ GraphicsConsoleControllerDriverStart (
(Info->VerticalResolution == 600)) { (Info->VerticalResolution == 600)) {
Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber); Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
gBS->FreePool (Info); FreePool (Info);
break; break;
} }
} }
gBS->FreePool (Info); FreePool (Info);
} }
} }
@ -507,8 +507,8 @@ Error:
// Free private data // Free private data
// //
if (Private != NULL) { if (Private != NULL) {
gBS->FreePool (Private->LineBuffer); FreePool (Private->LineBuffer);
gBS->FreePool (Private); FreePool (Private);
} }
} }
@ -577,8 +577,8 @@ GraphicsConsoleControllerDriverStop (
// Free our instance data // Free our instance data
// //
if (Private != NULL) { if (Private != NULL) {
gBS->FreePool (Private->LineBuffer); FreePool (Private->LineBuffer);
gBS->FreePool (Private); FreePool (Private);
} }
} }
@ -1166,16 +1166,14 @@ GraphicsConsoleConOutSetMode (
// //
// Attempt to allocate a line buffer for the requested mode number // Attempt to allocate a line buffer for the requested mode number
// //
Status = gBS->AllocatePool ( NewLineBuffer = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ModeData->Columns * GLYPH_WIDTH * GLYPH_HEIGHT);
EfiBootServicesData,
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ModeData->Columns * GLYPH_WIDTH * GLYPH_HEIGHT, if (NewLineBuffer == NULL) {
(VOID **) &NewLineBuffer
);
if (EFI_ERROR (Status)) {
// //
// The new line buffer could not be allocated, so return an error. // The new line buffer could not be allocated, so return an error.
// No changes to the state of the current console have been made, so the current console is still valid // No changes to the state of the current console have been made, so the current console is still valid
// //
Status = EFI_OUT_OF_RESOURCES;
goto Done; goto Done;
} }
// //
@ -1191,7 +1189,7 @@ GraphicsConsoleConOutSetMode (
// If the new mode is the same as the old mode, then just return EFI_SUCCESS // If the new mode is the same as the old mode, then just return EFI_SUCCESS
// //
if ((INT32) ModeNumber == This->Mode->Mode) { if ((INT32) ModeNumber == This->Mode->Mode) {
gBS->FreePool (NewLineBuffer); FreePool (NewLineBuffer);
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
goto Done; goto Done;
} }
@ -1201,7 +1199,7 @@ GraphicsConsoleConOutSetMode (
// //
This->EnableCursor (This, FALSE); This->EnableCursor (This, FALSE);
gBS->FreePool (Private->LineBuffer); FreePool (Private->LineBuffer);
} }
// //
// Assign the current line buffer to the newly allocated line buffer // Assign the current line buffer to the newly allocated line buffer

View File

@ -275,7 +275,7 @@ TerminalDriverBindingStart (
} }
} }
gBS->FreePool (OpenInfoBuffer); FreePool (OpenInfoBuffer);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
@ -566,7 +566,7 @@ TerminalDriverBindingStart (
} }
if (DefaultNode != NULL) { if (DefaultNode != NULL) {
gBS->FreePool (DefaultNode); FreePool (DefaultNode);
} }
return EFI_SUCCESS; return EFI_SUCCESS;
@ -604,15 +604,15 @@ Error:
} }
if (TerminalDevice->DevicePath != NULL) { if (TerminalDevice->DevicePath != NULL) {
gBS->FreePool (TerminalDevice->DevicePath); FreePool (TerminalDevice->DevicePath);
} }
gBS->FreePool (TerminalDevice); FreePool (TerminalDevice);
} }
} }
if (DefaultNode != NULL) { if (DefaultNode != NULL) {
gBS->FreePool (DefaultNode); FreePool (DefaultNode);
} }
This->Stop (This, Controller, 0, NULL); This->Stop (This, Controller, 0, NULL);
@ -713,7 +713,7 @@ TerminalDriverBindingStop (
// Free the ParentDevicePath that was duplicated in Start() // Free the ParentDevicePath that was duplicated in Start()
// //
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
gBS->FreePool (ParentDevicePath); FreePool (ParentDevicePath);
} }
} }
@ -803,8 +803,8 @@ TerminalDriverBindingStop (
gBS->CloseEvent (TerminalDevice->TwoSecondTimeOut); gBS->CloseEvent (TerminalDevice->TwoSecondTimeOut);
gBS->CloseEvent (TerminalDevice->SimpleInput.WaitForKey); gBS->CloseEvent (TerminalDevice->SimpleInput.WaitForKey);
gBS->FreePool (TerminalDevice->DevicePath); FreePool (TerminalDevice->DevicePath);
gBS->FreePool (TerminalDevice); FreePool (TerminalDevice);
} }
} }
@ -850,11 +850,11 @@ TerminalUpdateConsoleDevVariable (
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath); SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath); NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
if (Variable != NULL) { if (Variable != NULL) {
gBS->FreePool (Variable); FreePool (Variable);
} }
if (TempDevicePath != NULL) { if (TempDevicePath != NULL) {
gBS->FreePool (TempDevicePath); FreePool (TempDevicePath);
} }
Variable = NewVariable; Variable = NewVariable;
@ -870,7 +870,7 @@ TerminalUpdateConsoleDevVariable (
Variable Variable
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
gBS->FreePool (Variable); FreePool (Variable);
return ; return ;
} }
@ -932,7 +932,7 @@ TerminalRemoveConsoleDevVariable (
// //
Instance = GetNextDevicePathInstance (&Variable, &InstanceSize); Instance = GetNextDevicePathInstance (&Variable, &InstanceSize);
if (Instance == NULL) { if (Instance == NULL) {
gBS->FreePool (OriginalVariable); FreePool (OriginalVariable);
return ; return ;
} }
// //
@ -956,7 +956,7 @@ TerminalRemoveConsoleDevVariable (
FoundOne = TRUE; FoundOne = TRUE;
} }
gBS->FreePool (TempDevicePath); FreePool (TempDevicePath);
} }
} }
// //
@ -966,17 +966,17 @@ TerminalRemoveConsoleDevVariable (
SavedNewVariable = NewVariable; SavedNewVariable = NewVariable;
NewVariable = AppendDevicePathInstance (NewVariable, Instance); NewVariable = AppendDevicePathInstance (NewVariable, Instance);
if (SavedNewVariable != NULL) { if (SavedNewVariable != NULL) {
gBS->FreePool (SavedNewVariable); FreePool (SavedNewVariable);
} }
} }
// //
// Get next device path instance from Variable // Get next device path instance from Variable
// //
gBS->FreePool (Instance); FreePool (Instance);
Instance = GetNextDevicePathInstance (&Variable, &InstanceSize); Instance = GetNextDevicePathInstance (&Variable, &InstanceSize);
} while (Instance != NULL); } while (Instance != NULL);
gBS->FreePool (OriginalVariable); FreePool (OriginalVariable);
if (FoundOne) { if (FoundOne) {
VariableSize = GetDevicePathSize (NewVariable); VariableSize = GetDevicePathSize (NewVariable);
@ -992,7 +992,7 @@ TerminalRemoveConsoleDevVariable (
} }
if (NewVariable != NULL) { if (NewVariable != NULL) {
gBS->FreePool (NewVariable); FreePool (NewVariable);
} }
return ; return ;
@ -1051,7 +1051,7 @@ Returns:
// //
// Allocate the buffer to return // Allocate the buffer to return
// //
gBS->FreePool (Buffer); FreePool (Buffer);
Buffer = AllocatePool (BufferSize); Buffer = AllocatePool (BufferSize);
if (Buffer == NULL) { if (Buffer == NULL) {
*VariableSize = 0; *VariableSize = 0;
@ -1063,7 +1063,7 @@ Returns:
Status = gRT->GetVariable (Name, VendorGuid, NULL, &BufferSize, Buffer); Status = gRT->GetVariable (Name, VendorGuid, NULL, &BufferSize, Buffer);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
BufferSize = 0; BufferSize = 0;
gBS->FreePool (Buffer); FreePool (Buffer);
Buffer = NULL; Buffer = NULL;
} }
} else { } else {
@ -1071,7 +1071,7 @@ Returns:
// Variable not found or other errors met. // Variable not found or other errors met.
// //
BufferSize = 0; BufferSize = 0;
gBS->FreePool (Buffer); FreePool (Buffer);
Buffer = NULL; Buffer = NULL;
} }

View File

@ -124,8 +124,9 @@ Returns:
return Status; return Status;
} }
Status = gBS->AllocatePool (EfiBootServicesData, TotalSize, (VOID **) &LogEntry); LogEntry = AllocatePool (TotalSize);
if (EFI_ERROR (Status)) {
if (LogEntry == NULL) {
EfiReleaseLock (&Private->DataLock); EfiReleaseLock (&Private->DataLock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -386,7 +387,7 @@ Returns:
// Search for duplicate entries // Search for duplicate entries
// //
if (FindFilterDriverByEvent (&Private->FilterDriverListHead, FilterEvent) != NULL) { if (FindFilterDriverByEvent (&Private->FilterDriverListHead, FilterEvent) != NULL) {
gBS->FreePool (FilterDriver); FreePool (FilterDriver);
return EFI_ALREADY_STARTED; return EFI_ALREADY_STARTED;
} }
// //

View File

@ -96,12 +96,12 @@ Returns:
EFI_OPEN_PROTOCOL_GET_PROTOCOL EFI_OPEN_PROTOCOL_GET_PROTOCOL
); );
if (Status == EFI_SUCCESS && DebugSupportProtocolPtr->Isa == EFI_ISA) { if (Status == EFI_SUCCESS && DebugSupportProtocolPtr->Isa == EFI_ISA) {
gBS->FreePool (HandlePtr); FreePool (HandlePtr);
Status = EFI_ALREADY_STARTED; Status = EFI_ALREADY_STARTED;
goto ErrExit; goto ErrExit;
} }
} while (NumHandles > 0); } while (NumHandles > 0);
gBS->FreePool (HandlePtr); FreePool (HandlePtr);
} }
// //

View File

@ -7,7 +7,7 @@
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for DebugSupport module.</Abstract> <Abstract>Component description file for DebugSupport module.</Abstract>
<Description>This driver installs DebugSupport protocol for the selected processor.</Description> <Description>This driver installs DebugSupport protocol for the selected processor.</Description>
<Copyright>Copyright (c) 2006, Intel Corporation</Copyright> <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -17,35 +17,38 @@
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification> <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</MsaHeader> </MsaHeader>
<ModuleDefinitions> <ModuleDefinitions>
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures> <SupportedArchitectures>IA32 X64 IPF</SupportedArchitectures>
<BinaryModule>false</BinaryModule> <BinaryModule>false</BinaryModule>
<OutputFileBasename>DebugSupport</OutputFileBasename> <OutputFileBasename>DebugSupport</OutputFileBasename>
</ModuleDefinitions> </ModuleDefinitions>
<LibraryClassDefinitions> <LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverEntryPoint</Keyword> <Keyword>UefiDriverEntryPoint</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a">
<Keyword>BaseMemoryLib</Keyword> <Keyword>BaseMemoryLib</Keyword>
<HelpText>Recommended libary Instance is DxeMemoryLib instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="4674739d-3195-4fb2-8094-ac1d22d00194">
<Keyword>MemoryAllocationLib</Keyword> <Keyword>MemoryAllocationLib</Keyword>
<HelpText>Recommended libary Instance is DxeMemoryAllocationLib instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiBootServicesTableLib</Keyword> <Keyword>UefiBootServicesTableLib</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED" SupArchList="IA32 X64 IPF EBC"> <LibraryClass Usage="ALWAYS_CONSUMED" SupArchList="IA32 X64">
<Keyword>BaseLib</Keyword> <Keyword>BaseLib</Keyword>
</LibraryClass> </LibraryClass>
</LibraryClassDefinitions> </LibraryClassDefinitions>
<SourceFiles> <SourceFiles>
<Filename>DebugSupport.c</Filename> <Filename>DebugSupport.c</Filename>
<Filename>DebugSupport.dxs</Filename> <Filename>DebugSupport.dxs</Filename>
<Filename SupArchList="IA32">Ia32/AsmFuncs.asm</Filename> <Filename ToolChainFamily="MSFT" SupArchList="IA32">Ia32/AsmFuncs.asm</Filename>
<Filename SupArchList="IA32">Ia32/AsmFuncs.S</Filename> <Filename ToolChainFamily="GCC" SupArchList="IA32">Ia32/AsmFuncs.S</Filename>
<Filename SupArchList="IA32">Ia32/plDebugSupport.h</Filename> <Filename SupArchList="IA32">Ia32/plDebugSupport.h</Filename>
<Filename SupArchList="IA32">Ia32/plDebugSupport.c</Filename> <Filename SupArchList="IA32">Ia32/plDebugSupport.c</Filename>
<Filename SupArchList="IPF">ipf/AsmFuncs.s</Filename> <Filename SupArchList="IPF">ipf/AsmFuncs.s</Filename>
@ -60,11 +63,14 @@
</SourceFiles> </SourceFiles>
<PackageDependencies> <PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
</PackageDependencies> </PackageDependencies>
<Protocols> <Protocols>
<Protocol Usage="SOMETIMES_PRODUCED"> <Protocol Usage="SOMETIMES_PRODUCED">
<ProtocolCName>gEfiDebugSupportProtocolGuid</ProtocolCName> <ProtocolCName>gEfiDebugSupportProtocolGuid</ProtocolCName>
<HelpText>If the debug support protocol for this processor type is not
already installed, this protocol will be installed. Otherwise, it will
be not installed again.
</HelpText>
</Protocol> </Protocol>
<Protocol Usage="ALWAYS_CONSUMED"> <Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiLoadedImageProtocolGuid</ProtocolCName> <ProtocolCName>gEfiLoadedImageProtocolGuid</ProtocolCName>

View File

@ -45,16 +45,15 @@ Returns:
--*/ --*/
{ {
EFI_STATUS Status;
UINT8 *StubCopy; UINT8 *StubCopy;
// //
// First, allocate a new buffer and copy the stub code into it // First, allocate a new buffer and copy the stub code into it
// //
Status = gBS->AllocatePool (EfiBootServicesData, StubSize, Stub); *Stub = AllocatePool (StubSize);
if (Status == EFI_SUCCESS) { if (*Stub != NULL) {
StubCopy = *Stub; StubCopy = *Stub;
gBS->CopyMem (StubCopy, InterruptEntryStub, StubSize); CopyMem (StubCopy, InterruptEntryStub, StubSize);
// //
// Next fixup the stub code for this vector // Next fixup the stub code for this vector
@ -78,9 +77,11 @@ Returns:
// fixup the jump target to point to the common entry // fixup the jump target to point to the common entry
// //
*(UINT32 *) &StubCopy[0x0e] = (UINT32) CommonIdtEntry - (UINT32) &StubCopy[StubSize]; *(UINT32 *) &StubCopy[0x0e] = (UINT32) CommonIdtEntry - (UINT32) &StubCopy[StubSize];
return EFI_SUCCESS;
} }
return Status; return EFI_OUT_OF_RESOURCES;
} }
STATIC STATIC
@ -144,20 +145,18 @@ Arguments:
Returns: Returns:
EFI_SUCCESS EFI_SUCCESS
Other values are passed through from FreePool
--*/ --*/
{ {
BOOLEAN OldIntFlagState; BOOLEAN OldIntFlagState;
EFI_STATUS Status;
OldIntFlagState = WriteInterruptFlag (0); OldIntFlagState = WriteInterruptFlag (0);
WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc)); WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));
Status = gBS->FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry); FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry);
ZeroMem (&IdtEntryTable[ExceptionType], sizeof (IDT_ENTRY)); ZeroMem (&IdtEntryTable[ExceptionType], sizeof (IDT_ENTRY));
WriteInterruptFlag (OldIntFlagState); WriteInterruptFlag (OldIntFlagState);
return (Status); return EFI_SUCCESS;
} }
#endif #endif
@ -405,7 +404,7 @@ Returns:
ManageIdtEntryTable (NULL, ExceptionType); ManageIdtEntryTable (NULL, ExceptionType);
} }
gBS->FreePool (IdtEntryTable); FreePool (IdtEntryTable);
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@ -107,7 +107,7 @@ Returns:
--*/ --*/
{ {
gBS->SetMem (IvtEntryTable, sizeof (IvtEntryTable), 0); SetMem (IvtEntryTable, sizeof (IvtEntryTable), 0);
ExternalInterruptCount = 0; ExternalInterruptCount = 0;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -298,7 +298,7 @@ Returns:
// //
// re-init IvtEntryTable // re-init IvtEntryTable
// //
gBS->SetMem (&IvtEntryTable[ExceptionType], sizeof (IVT_ENTRY), 0); SetMem (&IvtEntryTable[ExceptionType], sizeof (IVT_ENTRY), 0);
} }
} else { } else {
// //
@ -356,7 +356,7 @@ Returns:
// //
// copy original bundles from IVT to IvtEntryTable so we can restore them later // copy original bundles from IVT to IvtEntryTable so we can restore them later
// //
gBS->CopyMem ( CopyMem (
IvtEntryTable[ExceptionType].OrigBundles, IvtEntryTable[ExceptionType].OrigBundles,
B0Ptr, B0Ptr,
sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB
@ -364,7 +364,7 @@ Returns:
// //
// insert new B0 // insert new B0
// //
gBS->CopyMem (B0Ptr, NewBundles, sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB); CopyMem (B0Ptr, NewBundles, sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB);
// //
// fixup IVT entry so it stores its index and whether or not to chain... // fixup IVT entry so it stores its index and whether or not to chain...
@ -406,7 +406,7 @@ Returns:
// //
// restore original bundles in IVT // restore original bundles in IVT
// //
gBS->CopyMem ( CopyMem (
B0Ptr, B0Ptr,
IvtEntryTable[ExceptionType].OrigBundles, IvtEntryTable[ExceptionType].OrigBundles,
sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB

View File

@ -44,16 +44,15 @@ Returns:
--*/ --*/
{ {
EFI_STATUS Status;
UINT8 *StubCopy; UINT8 *StubCopy;
// //
// First, allocate a new buffer and copy the stub code into it // First, allocate a new buffer and copy the stub code into it
// //
Status = gBS->AllocatePool (EfiBootServicesData, StubSize, Stub); *Stub = AllocatePool (StubSize);
if (Status == EFI_SUCCESS) { if (*Stub != NULL) {
StubCopy = *Stub; StubCopy = *Stub;
gBS->CopyMem (StubCopy, InterruptEntryStub, StubSize); CopyMem (StubCopy, InterruptEntryStub, StubSize);
// //
// Next fixup the stub code for this vector // Next fixup the stub code for this vector
@ -75,9 +74,11 @@ Returns:
// fixup the jump target to point to the common entry // fixup the jump target to point to the common entry
// //
*(UINT32 *) &StubCopy[0x3] = (UINT32)((UINTN) CommonIdtEntry - (UINTN) &StubCopy[StubSize]); *(UINT32 *) &StubCopy[0x3] = (UINT32)((UINTN) CommonIdtEntry - (UINTN) &StubCopy[StubSize]);
return EFI_SUCCESS;
} }
return Status; return EFI_OUT_OF_RESOURCES;
} }
STATIC STATIC
@ -142,20 +143,18 @@ Arguments:
Returns: Returns:
EFI_SUCCESS EFI_SUCCESS
Other values are passed through from FreePool
--*/ --*/
{ {
BOOLEAN OldIntFlagState; BOOLEAN OldIntFlagState;
EFI_STATUS Status;
OldIntFlagState = WriteInterruptFlag (0); OldIntFlagState = WriteInterruptFlag (0);
WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc)); WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));
Status = gBS->FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry); FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry);
ZeroMem (&IdtEntryTable[ExceptionType], sizeof (IDT_ENTRY)); ZeroMem (&IdtEntryTable[ExceptionType], sizeof (IDT_ENTRY));
WriteInterruptFlag (OldIntFlagState); WriteInterruptFlag (OldIntFlagState);
return (Status); return EFI_SUCCESS;
} }
EFI_STATUS EFI_STATUS
@ -401,7 +400,7 @@ Returns:
ManageIdtEntryTable (NULL, ExceptionType); ManageIdtEntryTable (NULL, ExceptionType);
} }
gBS->FreePool (IdtEntryTable); FreePool (IdtEntryTable);
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@ -67,7 +67,7 @@ Returns:
if (Status == EFI_BUFFER_TOO_SMALL) { if (Status == EFI_BUFFER_TOO_SMALL) {
if (gDebugPortDevice->DebugPortVariable != NULL) { if (gDebugPortDevice->DebugPortVariable != NULL) {
gBS->FreePool (gDebugPortDevice->DebugPortVariable); FreePool (gDebugPortDevice->DebugPortVariable);
} }
DebugPortDevice->DebugPortVariable = AllocatePool (DataSize); DebugPortDevice->DebugPortVariable = AllocatePool (DataSize);
@ -85,27 +85,27 @@ Returns:
} }
if (EfiIsDevicePathEnd (DevicePath)) { if (EfiIsDevicePathEnd (DevicePath)) {
gBS->FreePool (gDebugPortDevice->DebugPortVariable); FreePool (gDebugPortDevice->DebugPortVariable);
DebugPortDevice->DebugPortVariable = NULL; DebugPortDevice->DebugPortVariable = NULL;
} else { } else {
gBS->CopyMem ( CopyMem (
&DebugPortDevice->BaudRate, &DebugPortDevice->BaudRate,
&((UART_DEVICE_PATH *) DevicePath)->BaudRate, &((UART_DEVICE_PATH *) DevicePath)->BaudRate,
sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate) sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate)
); );
DebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH; DebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
DebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT; DebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
gBS->CopyMem ( CopyMem (
&DebugPortDevice->Parity, &DebugPortDevice->Parity,
&((UART_DEVICE_PATH *) DevicePath)->Parity, &((UART_DEVICE_PATH *) DevicePath)->Parity,
sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity) sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity)
); );
gBS->CopyMem ( CopyMem (
&DebugPortDevice->DataBits, &DebugPortDevice->DataBits,
&((UART_DEVICE_PATH *) DevicePath)->DataBits, &((UART_DEVICE_PATH *) DevicePath)->DataBits,
sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits) sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits)
); );
gBS->CopyMem ( CopyMem (
&DebugPortDevice->StopBits, &DebugPortDevice->StopBits,
&((UART_DEVICE_PATH *) DevicePath)->StopBits, &((UART_DEVICE_PATH *) DevicePath)->StopBits,
sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits) sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits)
@ -273,7 +273,7 @@ Returns:
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
} }
gBS->FreePool (Dp1); FreePool (Dp1);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
@ -389,7 +389,7 @@ Returns:
DebugPortDP.Header.Type = MESSAGING_DEVICE_PATH; DebugPortDP.Header.Type = MESSAGING_DEVICE_PATH;
DebugPortDP.Header.SubType = MSG_VENDOR_DP; DebugPortDP.Header.SubType = MSG_VENDOR_DP;
SetDevicePathNodeLength (&(DebugPortDP.Header), sizeof (DebugPortDP)); SetDevicePathNodeLength (&(DebugPortDP.Header), sizeof (DebugPortDP));
gBS->CopyMem (&DebugPortDP.Guid, &gEfiDebugPortDevicePathGuid, sizeof (EFI_GUID)); CopyMem (&DebugPortDP.Guid, &gEfiDebugPortDevicePathGuid, sizeof (EFI_GUID));
Dp1 = DevicePathFromHandle (ControllerHandle); Dp1 = DevicePathFromHandle (ControllerHandle);
if (Dp1 == NULL) { if (Dp1 == NULL) {
@ -516,7 +516,7 @@ Returns:
ControllerHandle ControllerHandle
); );
gBS->FreePool (gDebugPortDevice->DebugPortDevicePath); FreePool (gDebugPortDevice->DebugPortDevicePath);
return EFI_SUCCESS; return EFI_SUCCESS;
} else { } else {
@ -803,10 +803,10 @@ Returns:
// Clean up allocations // Clean up allocations
// //
if (gDebugPortDevice->DebugPortVariable != NULL) { if (gDebugPortDevice->DebugPortVariable != NULL) {
gBS->FreePool (gDebugPortDevice->DebugPortVariable); FreePool (gDebugPortDevice->DebugPortVariable);
} }
gBS->FreePool (gDebugPortDevice); FreePool (gDebugPortDevice);
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: Module Name:
DevicePathDriver.h DevicePath.h
Abstract: Abstract:
Definition for Device Path Utilities driver Definition for Device Path Utilities driver

View File

@ -6,8 +6,9 @@
<GuidValue>9B680FCE-AD6B-4F3A-B60B-F59899003443</GuidValue> <GuidValue>9B680FCE-AD6B-4F3A-B60B-F59899003443</GuidValue>
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for Device Path Driver.</Abstract> <Abstract>Component description file for Device Path Driver.</Abstract>
<Description>This driver is for DevicePathUtilities, DevicePahtToText and DevicePathFromText</Description> <Description>This driver implement these three UEFI deveice path protocols (
<Copyright>Copyright (c) 2006, Intel Corporation</Copyright> 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 <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -22,18 +23,17 @@
<OutputFileBasename>DevicePath</OutputFileBasename> <OutputFileBasename>DevicePath</OutputFileBasename>
</ModuleDefinitions> </ModuleDefinitions>
<LibraryClassDefinitions> <LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3">
<Keyword>PrintLib</Keyword> <Keyword>PrintLib</Keyword>
<HelpText>Recommended libary Instance is BasePrintLib instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverEntryPoint</Keyword> <Keyword>UefiDriverEntryPoint</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseLib</Keyword> <Keyword>BaseLib</Keyword>
</LibraryClass> </LibraryClass>
@ -46,8 +46,9 @@
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiBootServicesTableLib</Keyword> <Keyword>UefiBootServicesTableLib</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0">
<Keyword>DevicePathLib</Keyword> <Keyword>DevicePathLib</Keyword>
<HelpText>Recommended libary Instance is UefiDevicePathLib instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>PcdLib</Keyword> <Keyword>PcdLib</Keyword>
@ -68,9 +69,6 @@
<Protocol Usage="ALWAYS_CONSUMED"> <Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiDebugPortProtocolGuid</ProtocolCName> <ProtocolCName>gEfiDebugPortProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="ALWAYS_PRODUCED"> <Protocol Usage="ALWAYS_PRODUCED">
<ProtocolCName>gEfiDevicePathUtilitiesProtocolGuid</ProtocolCName> <ProtocolCName>gEfiDevicePathUtilitiesProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
@ -103,13 +101,13 @@
</Extern> </Extern>
</Externs> </Externs>
<PcdCoded> <PcdCoded>
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED"> <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_PRODUCED">
<C_Name>PcdDevicePathSupportDevicePathToText</C_Name> <C_Name>PcdDevicePathSupportDevicePathToText</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName> <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DefaultValue>FALSE</DefaultValue> <DefaultValue>FALSE</DefaultValue>
<HelpText>If TRUE, then the Device Path To Text Protocol should be produced by the platform</HelpText> <HelpText>If TRUE, then the Device Path To Text Protocol should be produced by the platform</HelpText>
</PcdEntry> </PcdEntry>
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED"> <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_PRODUCED">
<C_Name>PcdDevicePathSupportDevicePathFromText</C_Name> <C_Name>PcdDevicePathSupportDevicePathFromText</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName> <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DefaultValue>FALSE</DefaultValue> <DefaultValue>FALSE</DefaultValue>

View File

@ -2277,10 +2277,10 @@ ConvertTextToDeviceNode (
DeviceNode = DumpNode (DeviceNodeStr); DeviceNode = DumpNode (DeviceNodeStr);
} else { } else {
DeviceNode = DumpNode (ParamStr); DeviceNode = DumpNode (ParamStr);
gBS->FreePool (ParamStr); FreePool (ParamStr);
} }
gBS->FreePool (DeviceNodeStr); FreePool (DeviceNodeStr);
return DeviceNode; return DeviceNode;
} }
@ -2346,12 +2346,12 @@ ConvertTextToDevicePath (
DeviceNode = DumpNode (DeviceNodeStr); DeviceNode = DumpNode (DeviceNodeStr);
} else { } else {
DeviceNode = DumpNode (ParamStr); DeviceNode = DumpNode (ParamStr);
gBS->FreePool (ParamStr); FreePool (ParamStr);
} }
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode); NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
gBS->FreePool (DevicePath); FreePool (DevicePath);
gBS->FreePool (DeviceNode); FreePool (DeviceNode);
DevicePath = NewDevicePath; DevicePath = NewDevicePath;
if (IsInstanceEnd) { if (IsInstanceEnd) {
@ -2359,12 +2359,12 @@ ConvertTextToDevicePath (
SetDevicePathInstanceEndNode (DeviceNode); SetDevicePathInstanceEndNode (DeviceNode);
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode); NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
gBS->FreePool (DevicePath); FreePool (DevicePath);
gBS->FreePool (DeviceNode); FreePool (DeviceNode);
DevicePath = NewDevicePath; DevicePath = NewDevicePath;
} }
} }
gBS->FreePool (DevicePathStr); FreePool (DevicePathStr);
return DevicePath; return DevicePath;
} }

View File

@ -132,7 +132,7 @@ ReallocatePool (
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize); CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
} }
gBS->FreePool (OldPool); FreePool (OldPool);
} }
return NewPool; return NewPool;
@ -196,7 +196,7 @@ CatPrint (
Str->Len = Size - sizeof (UINT16); Str->Len = Size - sizeof (UINT16);
} }
gBS->FreePool (AppendStr); FreePool (AppendStr);
return Str->Str; return Str->Str;
} }
@ -1488,7 +1488,7 @@ ConvertDevicePathToText (
// //
// Shrink pool used for string allocation // Shrink pool used for string allocation
// //
gBS->FreePool (UnpackDevPath); FreePool (UnpackDevPath);
NewSize = (Str.Len + 1) * sizeof (CHAR16); NewSize = (Str.Len + 1) * sizeof (CHAR16);
Str.Str = ReallocatePool (Str.Str, NewSize, NewSize); Str.Str = ReallocatePool (Str.Str, NewSize, NewSize);