\r
[Components.common]\r
IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
- IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Pei/LzmaCustomDecompressLib.inf\r
- IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Dxe/LzmaCustomDecompressLib.inf\r
+ IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.inf\r
IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf\r
+++ /dev/null
-#/** @file\r
-# LZMA GUIDed Section Extraction Protocol Library\r
-#\r
-# Uefi Decompression library instance\r
-# Copyright (c) 2006, 2009, Intel Corporation.\r
-#\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
-#**/\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = LzmaDxeDecompressLib\r
- FILE_GUID = 35194660-7421-44ad-9636-e44885f092d1\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = BASE\r
- EDK_RELEASE_VERSION = 0x00020000\r
- EFI_SPECIFICATION_VERSION = 0x00020000\r
-\r
- CONSTRUCTOR = LzmaDecompressLibConstructor\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
-#\r
-\r
-[Sources.common]\r
- LzmaDxeMemory.c\r
- ../LzmaDecompress.c\r
- ../Sdk/C/LzFind.c\r
- ../Sdk/C/LzmaDec.c\r
- ../GuidedSectionExtraction.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
-\r
-[Guids]\r
- gLzmaCustomDecompressGuid \r
-\r
-[LibraryClasses]\r
- BaseLib\r
- DebugLib\r
- BaseMemoryLib\r
- MemoryAllocationLib\r
- ExtractGuidedSectionLib\r
-\r
+++ /dev/null
-/** @file\r
- LZMA Memory Allocation for DXE\r
-\r
- Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <Uefi.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include "Sdk/C/Types.h"\r
-\r
-STATIC\r
-VOID *\r
-SzAlloc(\r
- void *p,\r
- size_t size\r
- )\r
-{\r
- void *np;\r
- p = p;\r
- np = AllocatePool(size);\r
- return np;\r
-}\r
-\r
-STATIC\r
-VOID\r
-SzFree(\r
- void *p,\r
- void *address\r
- )\r
-{\r
- p = p;\r
- if (address != NULL) {\r
- FreePool(address);\r
- }\r
-}\r
-\r
-ISzAlloc g_Alloc = { SzAlloc, SzFree };\r
-\r
--- /dev/null
+#/** @file\r
+# LZMA GUIDed Section Extraction Protocol Library\r
+#\r
+# Uefi Decompression library instance\r
+# Copyright (c) 2006, 2009, Intel Corporation.\r
+#\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = LzmaDecompressLib\r
+ FILE_GUID = 35194660-7421-44ad-9636-e44885f092d1\r
+ MODULE_TYPE = BASE\r
+ VERSION_STRING = 1.0\r
+ LIBRARY_CLASS = BASE\r
+ EDK_RELEASE_VERSION = 0x00020000\r
+ EFI_SPECIFICATION_VERSION = 0x00020000\r
+\r
+ CONSTRUCTOR = LzmaDecompressLibConstructor\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+ LzmaDecompress.c\r
+ Sdk/C/LzFind.c\r
+ Sdk/C/LzmaDec.c\r
+ GuidedSectionExtraction.c\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+ IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+\r
+[Guids]\r
+ gLzmaCustomDecompressGuid \r
+\r
+[LibraryClasses]\r
+ BaseLib\r
+ DebugLib\r
+ BaseMemoryLib\r
+ MemoryAllocationLib\r
+ ExtractGuidedSectionLib\r
+\r
#include "Sdk/C/7zVersion.h"\r
#include "Sdk/C/LzmaDec.h"\r
\r
-extern ISzAlloc g_Alloc;\r
+/**\r
+ Allocation routine used by LZMA decompression.\r
+\r
+ @param p Pointer to the ISzAlloc instance\r
+ @param size The size in bytes to be allocated\r
+\r
+ @return The allocated pointer address, or NULL on failure\r
+**/\r
+STATIC\r
+VOID *\r
+SzAlloc (\r
+ void *p,\r
+ size_t size\r
+ )\r
+{\r
+ return AllocatePool (size);\r
+}\r
+\r
+/**\r
+ Free routine used by LZMA decompression.\r
+\r
+ @param p Pointer to the ISzAlloc instance\r
+ @param address The address to be freed\r
+**/\r
+STATIC\r
+VOID\r
+SzFree (\r
+ void *p,\r
+ void *address\r
+ )\r
+{\r
+ if (address != NULL) {\r
+ FreePool (address);\r
+ }\r
+}\r
+\r
+STATIC ISzAlloc g_Alloc = { SzAlloc, SzFree };\r
\r
#define LZMA_HEADER_SIZE (LZMA_PROPS_SIZE + 8)\r
\r
+++ /dev/null
-#/** @file\r
-# LZMA GUIDed Section Extraction Protocol Library\r
-#\r
-# Uefi Decompression library instance\r
-# Copyright (c) 2006, 2009, Intel Corporation.\r
-#\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
-#**/\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = LzmaPeiDecompressLib\r
- FILE_GUID = 6725ae86-6ed1-43bd-aeec-0517c0749d70\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = BASE\r
- EDK_RELEASE_VERSION = 0x00020000\r
- EFI_SPECIFICATION_VERSION = 0x00020000\r
-\r
- CONSTRUCTOR = LzmaDecompressLibConstructor\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
-#\r
-\r
-[Sources.common]\r
- LzmaPeiMemory.c\r
- ../LzmaDecompress.c\r
- ../Sdk/C/LzFind.c\r
- ../Sdk/C/LzmaDec.c\r
- ../GuidedSectionExtraction.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
-\r
-[Guids]\r
- gLzmaCustomDecompressGuid \r
-\r
-[LibraryClasses]\r
- BaseLib\r
- DebugLib\r
- BaseMemoryLib\r
- MemoryAllocationLib\r
- ExtractGuidedSectionLib\r
-\r
+++ /dev/null
-/** @file\r
- LZMA Memory Allocation for PEI\r
-\r
- AllocatePool does not work for large blocks during PEI, so we must\r
- use AllocatePages.\r
-\r
- Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <Uefi.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include "Sdk/C/Types.h"\r
-\r
-STATIC\r
-VOID *\r
-SzAlloc(\r
- void *p,\r
- size_t size\r
- )\r
-{\r
- void *np;\r
- p = p;\r
- if (size > EFI_PAGE_SIZE) {\r
- np = AllocatePages(EFI_SIZE_TO_PAGES(size));\r
- } else {\r
- np = AllocatePool(size);\r
- }\r
- return np;\r
-}\r
-\r
-STATIC\r
-VOID\r
-SzFree(\r
- void *p,\r
- void *address\r
- )\r
-{\r
- p = p;\r
- if (address != NULL) {\r
- FreePool(address);\r
- }\r
-}\r
-\r
-ISzAlloc g_Alloc = { SzAlloc, SzFree };\r
-\r
#define memcpy CopyMem\r
#define memmove CopyMem\r
\r
+#define _LZMA_SIZE_OPT\r
+\r
#endif // __UEFILZMA_H__\r
\r