summaryrefslogtreecommitdiff
path: root/EDK/Foundation/Library/CustomizedDecompress
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /EDK/Foundation/Library/CustomizedDecompress
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'EDK/Foundation/Library/CustomizedDecompress')
-rw-r--r--EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.c122
-rw-r--r--EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.cif12
-rw-r--r--EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.h113
-rw-r--r--EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.inf39
-rw-r--r--EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.mak69
-rw-r--r--EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.sdl25
6 files changed, 380 insertions, 0 deletions
diff --git a/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.c b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.c
new file mode 100644
index 0000000..8a86501
--- /dev/null
+++ b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.c
@@ -0,0 +1,122 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ CustomizedDecompress.c
+
+Abstract:
+
+ Implementation file for Customized decompression routine
+
+--*/
+#include "TianoCommon.h"
+#include "CustomizedDecompress.h"
+
+EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL mCustomizedDecompress = {
+ CustomizedGetInfo,
+ CustomizedDecompress
+};
+
+EFI_STATUS
+InstallCustomizedDecompress (
+ EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL **This
+ )
+/*++
+
+Routine Description:
+
+ Install customeized decompress protocol.
+
+Arguments:
+
+ This - The protocol that needs to be installed.
+
+Returns:
+
+ EFI_SUCCESS - Always success
+
+--*/
+{
+ *This = &mCustomizedDecompress;
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+CustomizedGetInfo (
+ IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SrcSize,
+ OUT UINT32 *DstSize,
+ OUT UINT32 *ScratchSize
+ )
+/*++
+
+Routine Description:
+
+ The implementation of Customized GetInfo().
+
+Arguments:
+ This - The EFI customized decompress protocol
+ Source - The source buffer containing the compressed data.
+ SrcSize - The size of source buffer
+ DstSize - The size of destination buffer.
+ ScratchSize - The size of scratch buffer.
+
+Returns:
+
+ EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
+ EFI_INVALID_PARAMETER - The source data is corrupted
+ EFI_UNSUPPORTED - Not supported
+
+--*/
+{
+ return EFI_UNSUPPORTED;
+}
+
+EFI_STATUS
+EFIAPI
+CustomizedDecompress (
+ IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SrcSize,
+ IN OUT VOID *Destination,
+ IN UINT32 DstSize,
+ IN OUT VOID *Scratch,
+ IN UINT32 ScratchSize
+ )
+/*++
+
+Routine Description:
+
+ The implementation of Customized Decompress().
+
+Arguments:
+
+ This - The protocol instance pointer
+ Source - The source buffer containing the compressed data.
+ SrcSize - The size of source buffer
+ Destination - The destination buffer to store the decompressed data
+ DstSize - The size of destination buffer.
+ Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
+ ScratchSize - The size of scratch buffer.
+
+Returns:
+
+ EFI_SUCCESS - Decompression is successfull
+ EFI_INVALID_PARAMETER - The source data is corrupted
+ EFI_UNSUPPORTED - Not supported
+
+--*/
+{
+ return EFI_UNSUPPORTED;
+}
diff --git a/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.cif b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.cif
new file mode 100644
index 0000000..3e5da36
--- /dev/null
+++ b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "CustomizedDecompress"
+ category = ModulePart
+ LocalRoot = "EDK\Foundation\Library\CustomizedDecompress\"
+ RefName = "CustomizedDecompress"
+[files]
+"CustomizedDecompress.c"
+"CustomizedDecompress.h"
+"CustomizedDecompress.sdl"
+"CustomizedDecompress.mak"
+"CustomizedDecompress.inf"
+<endComponent>
diff --git a/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.h b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.h
new file mode 100644
index 0000000..9cd75f3
--- /dev/null
+++ b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.h
@@ -0,0 +1,113 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ CustomizedDecompress.h
+
+Abstract:
+
+ Header file for Customized decompression routine
+
+--*/
+#ifndef _CUSTOMIZED_DECOMPRESS_LIB_H_
+#define _CUSTOMIZED_DECOMPRESS_LIB_H_
+
+#include EFI_PROTOCOL_DEFINITION (CustomizedDecompress)
+
+EFI_STATUS
+EFIAPI
+CustomizedGetInfo (
+ IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SrcSize,
+ OUT UINT32 *DstSize,
+ OUT UINT32 *ScratchSize
+ )
+/*++
+
+Routine Description:
+
+ The implementation of Customized GetInfo().
+
+Arguments:
+ This - The EFI customized decompress protocol
+ Source - The source buffer containing the compressed data.
+ SrcSize - The size of source buffer
+ DstSize - The size of destination buffer.
+ ScratchSize - The size of scratch buffer.
+
+Returns:
+
+ EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
+ EFI_INVALID_PARAMETER - The source data is corrupted
+ EFI_UNSUPPORTED - Not supported
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+CustomizedDecompress (
+ IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SrcSize,
+ IN OUT VOID *Destination,
+ IN UINT32 DstSize,
+ IN OUT VOID *Scratch,
+ IN UINT32 ScratchSize
+ )
+/*++
+
+Routine Description:
+
+ The implementation of Customized Decompress().
+
+Arguments:
+
+ This - The protocol instance pointer
+ Source - The source buffer containing the compressed data.
+ SrcSize - The size of source buffer
+ Destination - The destination buffer to store the decompressed data
+ DstSize - The size of destination buffer.
+ Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
+ ScratchSize - The size of scratch buffer.
+
+Returns:
+
+ EFI_SUCCESS - Decompression is successfull
+ EFI_INVALID_PARAMETER - The source data is corrupted
+ EFI_UNSUPPORTED - Not supported
+
+--*/
+;
+
+EFI_STATUS
+InstallCustomizedDecompress (
+ EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL **This
+ )
+/*++
+
+Routine Description:
+
+ Install customeized decompress protocol.
+
+Arguments:
+
+ This - The protocol that needs to be installed.
+
+Returns:
+
+ EFI_SUCCESS - Always success
+
+--*/
+;
+#endif
diff --git a/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.inf b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.inf
new file mode 100644
index 0000000..3d96790
--- /dev/null
+++ b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.inf
@@ -0,0 +1,39 @@
+#/*++
+#
+# Copyright (c) 2004, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+# CustomizedDecompress.inf
+#
+# Abstract:
+#
+# Component description file for the Customized Decompress library.
+#
+#--*/
+
+[defines]
+BASE_NAME = CustomizedDecompress
+COMPONENT_TYPE = LIBRARY
+
+[sources.common]
+ CustomizedDecompress.c
+ CustomizedDecompress.h
+
+[includes.common]
+ .
+ $(EDK_SOURCE)\Foundation
+ $(EDK_SOURCE)\Foundation\Include
+ $(EDK_SOURCE)\Foundation\Efi
+ $(EDK_SOURCE)\Foundation\Efi\Include
+ $(EDK_SOURCE)\Foundation\Framework
+ $(EDK_SOURCE)\Foundation\Framework\Include
+[nmake.common]
+ C_STD_INCLUDE= \ No newline at end of file
diff --git a/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.mak b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.mak
new file mode 100644
index 0000000..b52e4cd
--- /dev/null
+++ b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.mak
@@ -0,0 +1,69 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2009, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#**********************************************************************
+
+#**********************************************************************
+# $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/IntelEDK/CustomizedDecompress/CustomizedDecompress.mak 1 1/20/12 3:59a Jeffch $
+#
+# $Revision: 1 $
+#
+# $Date: 1/20/12 3:59a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/IntelEDK/CustomizedDecompress/CustomizedDecompress.mak $
+#
+# 1 1/20/12 3:59a Jeffch
+# Create Intel EDK 1117 Patch 7.
+#
+# 1 9/27/11 6:22a Wesleychen
+# Intel EDK initially releases.
+#
+# 2 9/02/09 3:26a Iminglin
+# EIP24919
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: CustomizedDecompress.mak
+#
+# Description:
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+$(CUSTOMIZEDDECOMPRESS) : CustomizedDecompress
+
+$(BUILD_DIR)\CustomizedDecompress.lib : CustomizedDecompress
+
+CustomizedDecompress : $(BUILD_DIR)\CustomizedDecompress.mak CustomizedDecompressBin
+
+$(BUILD_DIR)\CustomizedDecompress.mak : $(CustomizedDecompress_DIR)\$(@B).cif $(CustomizedDecompress_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(CustomizedDecompress_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+CustomizedDecompressBin :
+ $(MAKE) /$(MAKEFLAGS) $(EDK_DEFAULTS)\
+ /f $(BUILD_DIR)\CustomizedDecompress.mak all\
+ TYPE=LIBRARY \
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2009, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#********************************************************************** \ No newline at end of file
diff --git a/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.sdl b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.sdl
new file mode 100644
index 0000000..0c76540
--- /dev/null
+++ b/EDK/Foundation/Library/CustomizedDecompress/CustomizedDecompress.sdl
@@ -0,0 +1,25 @@
+TOKEN
+ Name = "CustomizedDecompress_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable CustomizedDecompress support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+End
+
+TOKEN
+ Name = "CUSTOMIZEDDECOMPRESS"
+ Value = "$(BUILD_DIR)\CustomizedDecompress.lib"
+ TokenType = Expression
+ TargetMAK = Yes
+End
+
+PATH
+ Name = "CustomizedDecompress_DIR"
+End
+
+MODULE
+ Help = "Includes CustomizedDecompress.mak to Project"
+ File = "CustomizedDecompress.mak"
+End