mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
Add PCD Feature Flags to control which decompression method(s) are included in the DXE IPL. The choices are any combination of EFI, Tiano, and Custom decompression.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1569 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f47629a482
commit
e29d70965d
@ -1,13 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--Copyright (c) 2006, Intel Corporation
|
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
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
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
|
||||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
|
||||||
<MsaHeader>
|
<MsaHeader>
|
||||||
<ModuleName>DxeIplX64</ModuleName>
|
<ModuleName>DxeIplX64</ModuleName>
|
||||||
<ModuleType>PEIM</ModuleType>
|
<ModuleType>PEIM</ModuleType>
|
||||||
@ -72,6 +64,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
|||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
<Keyword>MemoryAllocationLib</Keyword>
|
<Keyword>MemoryAllocationLib</Keyword>
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>PcdLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
</LibraryClassDefinitions>
|
</LibraryClassDefinitions>
|
||||||
<SourceFiles>
|
<SourceFiles>
|
||||||
<Filename>DxeIpl.dxs</Filename>
|
<Filename>DxeIpl.dxs</Filename>
|
||||||
@ -136,4 +131,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
|||||||
<ModuleEntryPoint>PeimInitializeDxeIpl</ModuleEntryPoint>
|
<ModuleEntryPoint>PeimInitializeDxeIpl</ModuleEntryPoint>
|
||||||
</Extern>
|
</Extern>
|
||||||
</Externs>
|
</Externs>
|
||||||
</ModuleSurfaceArea>
|
<PcdCoded>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
|
||||||
|
<C_Name>PcdDxeIplSupportEfiDecompress</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DefaultValue>TRUE</DefaultValue>
|
||||||
|
<HelpText>If this feature is enabled, then the DXE IPL must support decompressing files compressed with the EFI Compression algorithm</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
|
||||||
|
<C_Name>PcdDxeIplSupportTianoDecompress</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DefaultValue>TRUE</DefaultValue>
|
||||||
|
<HelpText>If this feature is enabled, then the DXE IPL must support decompressing files compressed with the Tiano Compression algorithm</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
|
||||||
|
<C_Name>PcdDxeIplSupportCustomDecompress</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DefaultValue>TRUE</DefaultValue>
|
||||||
|
<HelpText>If this feature is enabled, then the DXE IPL must support decompressing files compressed with the Custom Compression algorithm</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
</PcdCoded>
|
||||||
|
</ModuleSurfaceArea>
|
||||||
|
@ -62,17 +62,17 @@ static EFI_PEI_PPI_DESCRIPTOR mPpiSignal = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
DECOMPRESS_LIBRARY gEfiDecompress = {
|
GLOBAL_REMOVE_IF_UNREFERENCED DECOMPRESS_LIBRARY gEfiDecompress = {
|
||||||
UefiDecompressGetInfo,
|
UefiDecompressGetInfo,
|
||||||
UefiDecompress
|
UefiDecompress
|
||||||
};
|
};
|
||||||
|
|
||||||
DECOMPRESS_LIBRARY gTianoDecompress = {
|
GLOBAL_REMOVE_IF_UNREFERENCED DECOMPRESS_LIBRARY gTianoDecompress = {
|
||||||
TianoDecompressGetInfo,
|
TianoDecompressGetInfo,
|
||||||
TianoDecompress
|
TianoDecompress
|
||||||
};
|
};
|
||||||
|
|
||||||
DECOMPRESS_LIBRARY gCustomDecompress = {
|
GLOBAL_REMOVE_IF_UNREFERENCED DECOMPRESS_LIBRARY gCustomDecompress = {
|
||||||
CustomDecompressGetInfo,
|
CustomDecompressGetInfo,
|
||||||
CustomDecompress
|
CustomDecompress
|
||||||
};
|
};
|
||||||
@ -842,14 +842,24 @@ Returns:
|
|||||||
|
|
||||||
switch (CompressionSection->CompressionType) {
|
switch (CompressionSection->CompressionType) {
|
||||||
case EFI_STANDARD_COMPRESSION:
|
case EFI_STANDARD_COMPRESSION:
|
||||||
DecompressLibrary = &gTianoDecompress;
|
if (FeaturePcdGet (PcdDxeIplSupportTianoDecompress)) {
|
||||||
|
DecompressLibrary = &gTianoDecompress;
|
||||||
|
} else {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFI_CUSTOMIZED_COMPRESSION:
|
case EFI_CUSTOMIZED_COMPRESSION:
|
||||||
//
|
//
|
||||||
// Load user customized compression protocol.
|
// Load user customized compression protocol.
|
||||||
//
|
//
|
||||||
DecompressLibrary = &gCustomDecompress;
|
if (FeaturePcdGet (PcdDxeIplSupportCustomDecompress)) {
|
||||||
|
DecompressLibrary = &gCustomDecompress;
|
||||||
|
} else {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFI_NOT_COMPRESSED:
|
case EFI_NOT_COMPRESSED:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user