]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Library/EdkNullCustomizedDecompressLib/CustomizedDecompress.c
Rename PcdPlatformBusSpeed to PcdFSBClock and update help text.
[mirror_edk2.git] / EdkModulePkg / Library / EdkNullCustomizedDecompressLib / CustomizedDecompress.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 CustomizedDecompress.c
15
16 Abstract:
17
18 Implementation file for Customized decompression routine
19
20 --*/
21
22 #include <CustomizedDecompress.h>
23
24 EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL mCustomizedDecompress = {
25 CustomizedGetInfo,
26 CustomizedDecompress
27 };
28
29 EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *
30 EFIAPI
31 GetCustomizedDecompressProtocol (
32 VOID
33 )
34 {
35 return &mCustomizedDecompress;
36 }
37
38
39
40 EFI_STATUS
41 EFIAPI
42 CustomizedGetInfo (
43 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
44 IN VOID *Source,
45 IN UINT32 SrcSize,
46 OUT UINT32 *DstSize,
47 OUT UINT32 *ScratchSize
48 )
49 /*++
50
51 Routine Description:
52
53 The implementation of Customized GetInfo().
54
55 Arguments:
56 This - The EFI customized decompress protocol
57 Source - The source buffer containing the compressed data.
58 SrcSize - The size of source buffer
59 DstSize - The size of destination buffer.
60 ScratchSize - The size of scratch buffer.
61
62 Returns:
63
64 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
65 EFI_INVALID_PARAMETER - The source data is corrupted
66 EFI_UNSUPPORTED - Not supported
67
68 --*/
69 {
70 return EFI_UNSUPPORTED;
71 }
72
73 EFI_STATUS
74 EFIAPI
75 CustomizedDecompress (
76 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
77 IN VOID *Source,
78 IN UINT32 SrcSize,
79 IN OUT VOID *Destination,
80 IN UINT32 DstSize,
81 IN OUT VOID *Scratch,
82 IN UINT32 ScratchSize
83 )
84 /*++
85
86 Routine Description:
87
88 The implementation of Customized Decompress().
89
90 Arguments:
91
92 This - The protocol instance pointer
93 Source - The source buffer containing the compressed data.
94 SrcSize - The size of source buffer
95 Destination - The destination buffer to store the decompressed data
96 DstSize - The size of destination buffer.
97 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
98 ScratchSize - The size of scratch buffer.
99
100 Returns:
101
102 EFI_SUCCESS - Decompression is successfull
103 EFI_INVALID_PARAMETER - The source data is corrupted
104 EFI_UNSUPPORTED - Not supported
105
106 --*/
107 {
108 return EFI_UNSUPPORTED;
109 }