IntelFrameworkModulePkg LZMA: Support running LZMA from flash/rom
Previously the code relied upon global variables which could not be modified if the code was running from ROM (or similarly a flash memory which is not easily modified). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9667 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -73,7 +73,7 @@ LzmaGuidedSectionGetInfo (
|
||||
|
||||
return LzmaUefiDecompressGetInfo (
|
||||
(UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
|
||||
(*(UINT32 *) (((EFI_COMMON_SECTION_HEADER *) InputSection)->Size) & 0x00ffffff) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
|
||||
SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
|
||||
OutputBufferSize,
|
||||
ScratchBufferSize
|
||||
);
|
||||
@@ -137,6 +137,7 @@ LzmaGuidedSectionExtraction (
|
||||
|
||||
return LzmaUefiDecompress (
|
||||
(UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
|
||||
SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
|
||||
*OutputBuffer,
|
||||
ScratchBuffer
|
||||
);
|
||||
|
Reference in New Issue
Block a user