Home | History | Annotate | Download | only in EfiLdr
      1 /** @file
      2   Internal include file for Base UEFI Decompress Library.
      3 
      4   Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
      5   This program and the accompanying materials
      6   are licensed and made available under the terms and conditions of the BSD License
      7   which accompanies this distribution.  The full text of the license may be found at
      8   http://opensource.org/licenses/bsd-license.php
      9 
     10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13   Module Name:  BaseUefiCustomDecompressLibInternals.h
     14 
     15 **/
     16 
     17 #ifndef __BASE_UEFI_TIANO_CUSTOM_DECOMPRESS_LIB_INTERNALS_H__
     18 #define __BASE_UEFI_TIANO_CUSTOM_DECOMPRESS_LIB_INTERNALS_H__
     19 
     20 #include <PiPei.h>
     21 
     22 #include <Library/UefiDecompressLib.h>
     23 #include <Library/DebugLib.h>
     24 #include <Library/BaseMemoryLib.h>
     25 
     26 EFI_STATUS
     27 EFIAPI
     28 TianoGetInfo (
     29   IN      VOID                          *Source,
     30   IN      UINT32                        SrcSize,
     31   OUT     UINT32                        *DstSize,
     32   OUT     UINT32                        *ScratchSize
     33   )
     34 /*++
     35 
     36 Routine Description:
     37 
     38   The implementation is same as that of EFI_TIANO_DECOMPRESS_PROTOCOL.GetInfo().
     39 
     40 Arguments:
     41 
     42   This        - The protocol instance pointer
     43   Source      - The source buffer containing the compressed data.
     44   SrcSize     - The size of source buffer
     45   DstSize     - The size of destination buffer.
     46   ScratchSize - The size of scratch buffer.
     47 
     48 Returns:
     49 
     50   EFI_SUCCESS           - The size of destination buffer and the size of scratch buffer are successfully retrieved.
     51   EFI_INVALID_PARAMETER - The source data is corrupted
     52 
     53 --*/
     54 ;
     55 
     56 EFI_STATUS
     57 EFIAPI
     58 TianoDecompress (
     59   IN      VOID                          *Source,
     60   IN      UINT32                        SrcSize,
     61   IN OUT  VOID                          *Destination,
     62   IN      UINT32                        DstSize,
     63   IN OUT  VOID                          *Scratch,
     64   IN      UINT32                        ScratchSize
     65   )
     66 /*++
     67 
     68 Routine Description:
     69 
     70   The implementation is same as that  of EFI_TIANO_DECOMPRESS_PROTOCOL.Decompress().
     71 
     72 Arguments:
     73 
     74   This        - The protocol instance pointer
     75   Source      - The source buffer containing the compressed data.
     76   SrcSize     - The size of source buffer
     77   Destination - The destination buffer to store the decompressed data
     78   DstSize     - The size of destination buffer.
     79   Scratch     - The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.
     80   ScratchSize - The size of scratch buffer.
     81 
     82 Returns:
     83 
     84   EFI_SUCCESS           - Decompression is successfull
     85   EFI_INVALID_PARAMETER - The source data is corrupted
     86 
     87 --*/
     88 ;
     89 
     90 #endif
     91