TianoDecompress.h revision 3da85e633e2589a312fb3646660ef68e6a0bf18b
18c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu/** @file
28c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  Internal include file for Base UEFI Decompress Libary.
38c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
48c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  Copyright (c) 2006, Intel Corporation
58c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  All rights reserved. This program and the accompanying materials
68c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  are licensed and made available under the terms and conditions of the BSD License
78c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  which accompanies this distribution.  The full text of the license may be found at
88c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  http://opensource.org/licenses/bsd-license.php
98c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
108c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
118c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
128c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
138c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu  Module Name:  BaseUefiCustomDecompressLibInternals.h
148c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
158c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu**/
168c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
178c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#ifndef __BASE_UEFI_TIANO_CUSTOM_DECOMPRESS_LIB_INTERNALS_H__
188c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#define __BASE_UEFI_TIANO_CUSTOM_DECOMPRESS_LIB_INTERNALS_H__
198c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
208c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#include <PiPei.h>
218c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
228c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#include <Library/UefiDecompressLib.h>
238c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#include <Library/DebugLib.h>
248c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#include <Library/BaseMemoryLib.h>
258c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
263da85e633e2589a312fb3646660ef68e6a0bf18bkluEFI_STATUS
273da85e633e2589a312fb3646660ef68e6a0bf18bkluEFIAPI
283da85e633e2589a312fb3646660ef68e6a0bf18bkluTianoGetInfo (
293da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN      VOID                          *Source,
303da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN      UINT32                        SrcSize,
313da85e633e2589a312fb3646660ef68e6a0bf18bklu  OUT     UINT32                        *DstSize,
323da85e633e2589a312fb3646660ef68e6a0bf18bklu  OUT     UINT32                        *ScratchSize
333da85e633e2589a312fb3646660ef68e6a0bf18bklu  )
343da85e633e2589a312fb3646660ef68e6a0bf18bklu/*++
358c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
363da85e633e2589a312fb3646660ef68e6a0bf18bkluRoutine Description:
378c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
383da85e633e2589a312fb3646660ef68e6a0bf18bklu  The implementation is same as that of EFI_TIANO_DECOMPRESS_PROTOCOL.GetInfo().
398c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
403da85e633e2589a312fb3646660ef68e6a0bf18bkluArguments:
418c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
423da85e633e2589a312fb3646660ef68e6a0bf18bklu  This        - The protocol instance pointer
433da85e633e2589a312fb3646660ef68e6a0bf18bklu  Source      - The source buffer containing the compressed data.
443da85e633e2589a312fb3646660ef68e6a0bf18bklu  SrcSize     - The size of source buffer
453da85e633e2589a312fb3646660ef68e6a0bf18bklu  DstSize     - The size of destination buffer.
463da85e633e2589a312fb3646660ef68e6a0bf18bklu  ScratchSize - The size of scratch buffer.
478c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
483da85e633e2589a312fb3646660ef68e6a0bf18bkluReturns:
498c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
503da85e633e2589a312fb3646660ef68e6a0bf18bklu  EFI_SUCCESS           - The size of destination buffer and the size of scratch buffer are successull retrieved.
513da85e633e2589a312fb3646660ef68e6a0bf18bklu  EFI_INVALID_PARAMETER - The source data is corrupted
528c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
533da85e633e2589a312fb3646660ef68e6a0bf18bklu--*/
543da85e633e2589a312fb3646660ef68e6a0bf18bklu;
558c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
563da85e633e2589a312fb3646660ef68e6a0bf18bkluEFI_STATUS
573da85e633e2589a312fb3646660ef68e6a0bf18bkluEFIAPI
583da85e633e2589a312fb3646660ef68e6a0bf18bkluTianoDecompress (
593da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN      VOID                          *Source,
603da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN      UINT32                        SrcSize,
613da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN OUT  VOID                          *Destination,
623da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN      UINT32                        DstSize,
633da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN OUT  VOID                          *Scratch,
643da85e633e2589a312fb3646660ef68e6a0bf18bklu  IN      UINT32                        ScratchSize
653da85e633e2589a312fb3646660ef68e6a0bf18bklu  )
663da85e633e2589a312fb3646660ef68e6a0bf18bklu/*++
678c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
683da85e633e2589a312fb3646660ef68e6a0bf18bkluRoutine Description:
698c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
703da85e633e2589a312fb3646660ef68e6a0bf18bklu  The implementation is same as that  of EFI_TIANO_DECOMPRESS_PROTOCOL.Decompress().
718c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
723da85e633e2589a312fb3646660ef68e6a0bf18bkluArguments:
738c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
743da85e633e2589a312fb3646660ef68e6a0bf18bklu  This        - The protocol instance pointer
753da85e633e2589a312fb3646660ef68e6a0bf18bklu  Source      - The source buffer containing the compressed data.
763da85e633e2589a312fb3646660ef68e6a0bf18bklu  SrcSize     - The size of source buffer
773da85e633e2589a312fb3646660ef68e6a0bf18bklu  Destination - The destination buffer to store the decompressed data
783da85e633e2589a312fb3646660ef68e6a0bf18bklu  DstSize     - The size of destination buffer.
793da85e633e2589a312fb3646660ef68e6a0bf18bklu  Scratch     - The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.
803da85e633e2589a312fb3646660ef68e6a0bf18bklu  ScratchSize - The size of scratch buffer.
818c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
823da85e633e2589a312fb3646660ef68e6a0bf18bkluReturns:
838c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
843da85e633e2589a312fb3646660ef68e6a0bf18bklu  EFI_SUCCESS           - Decompression is successfull
853da85e633e2589a312fb3646660ef68e6a0bf18bklu  EFI_INVALID_PARAMETER - The source data is corrupted
868c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
873da85e633e2589a312fb3646660ef68e6a0bf18bklu--*/
883da85e633e2589a312fb3646660ef68e6a0bf18bklu;
898c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu
908c1ba7f5e5aef9ff8f4627e8af52932fb4f7b805klu#endif
91