]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix Duet broken caused by LzmaUefiDecompress's interface is changed in IntelFramework...
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 15 Jan 2010 12:39:20 +0000 (12:39 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 15 Jan 2010 12:39:20 +0000 (12:39 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9776 6f19259b-4bc3-4df7-8a09-765794883524

DuetPkg/EfiLdr/EfiLoader.c
DuetPkg/EfiLdr/LzmaDecompress.h

index c37fba89ec8e329cf5903c65a26db5debc99751e..c69a97f01f1196f262bc5b92383c2177fef67a73 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2010, Intel Corporation                                                         \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
@@ -113,6 +113,7 @@ EfiLoader (
   PrintString (PrintBuffer);\r
   Status =  LzmaUefiDecompress (\r
     (VOID *)(UINTN)(EFILDR_HEADER_ADDRESS + EFILDRImage->Offset),\r
+    EFILDRImage->Length,\r
     (VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS, \r
     (VOID *)(UINTN)((EFI_DECOMPRESSED_BUFFER_ADDRESS + DestinationSize + 0x1000) & 0xfffff000)\r
     );\r
@@ -162,6 +163,7 @@ EfiLoader (
 \r
   Status = LzmaUefiDecompress (\r
              (VOID *)(UINTN)(EFILDR_HEADER_ADDRESS + EFILDRImage->Offset),\r
+             EFILDRImage->Length,\r
              (VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS,\r
              (VOID *)(UINTN)((EFI_DECOMPRESSED_BUFFER_ADDRESS + DestinationSize + 0x1000) & 0xfffff000)\r
              );\r
@@ -226,6 +228,7 @@ PrintHeader ('C');
 \r
   Status = LzmaUefiDecompress (\r
              (VOID *)(UINTN)(EFILDR_HEADER_ADDRESS + EFILDRImage->Offset),\r
+              EFILDRImage->Length,\r
              (VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS,\r
              (VOID *)(UINTN)((EFI_DECOMPRESSED_BUFFER_ADDRESS + DestinationSize + 0x1000) & 0xfffff000)\r
              );\r
index fbf645e9874ef4a63fa1a340dc9919ab793fca6b..de16bed21b952ede7487b0384c76df72eee5d97f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   LZMA Decompress Library header file\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2010, 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
@@ -36,22 +36,35 @@ LzmaUefiDecompressGetInfo (
   );\r
 \r
 /**\r
-  The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().\r
-  \r
-  @param Source          - The source buffer containing the compressed data.\r
-  @param Destination     - The destination buffer to store the decompressed data\r
-  @param Scratch         - The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.\r
+  Decompresses a Lzma compressed source buffer.\r
+\r
+  Extracts decompressed data to its original form.\r
+  If the compressed source data specified by Source is successfully decompressed \r
+  into Destination, then RETURN_SUCCESS is returned.  If the compressed source data \r
+  specified by Source is not in a valid compressed data format,\r
+  then RETURN_INVALID_PARAMETER is returned.\r
 \r
-  @retval RETURN_SUCCESS           - Decompression is successfull\r
-  @retval RETURN_INVALID_PARAMETER - The source data is corrupted  \r
+  @param  Source      The source buffer containing the compressed data.\r
+  @param  SourceSize  The size of source buffer.\r
+  @param  Destination The destination buffer to store the decompressed data\r
+  @param  Scratch     A temporary scratch buffer that is used to perform the decompression.\r
+                      This is an optional parameter that may be NULL if the \r
+                      required scratch buffer size is 0.\r
+                     \r
+  @retval  RETURN_SUCCESS Decompression completed successfully, and \r
+                          the uncompressed buffer is returned in Destination.\r
+  @retval  RETURN_INVALID_PARAMETER \r
+                          The source buffer specified by Source is corrupted \r
+                          (not in a valid compressed format).\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 LzmaUefiDecompress (\r
   IN CONST VOID  *Source,\r
+  IN UINTN       SourceSize,\r
   IN OUT VOID    *Destination,\r
   IN OUT VOID    *Scratch\r
   );\r
-\r
+  \r
 #endif // __LZMADECOMPRESS_H__\r
 \r