From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: liming.gao@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 13 May 2019 08:09:00 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 08:09:00 -0700 X-ExtLoop1: 1 Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga007.jf.intel.com with ESMTP; 13 May 2019 08:08:59 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 13 May 2019 08:08:59 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.10]) with mapi id 14.03.0415.000; Mon, 13 May 2019 23:08:57 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "Bi, Dandan" CC: "Kinney, Michael D" Subject: Re: [edk2-devel] [patch 1/5] MdePkg: Merge TianoCustomDecompress algorithm into Thread-Topic: [edk2-devel] [patch 1/5] MdePkg: Merge TianoCustomDecompress algorithm into Thread-Index: AQHVCTISzMaIj39qmkW4R5YcmCselqZpKKbw Date: Mon, 13 May 2019 15:08:56 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E448B86@SHSMSX104.ccr.corp.intel.com> References: <20190513021552.7792-1-dandan.bi@intel.com> <20190513021552.7792-2-dandan.bi@intel.com> In-Reply-To: <20190513021552.7792-2-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjEyNmZmYjMtOTQzYS00YTlkLThhYmMtMGIzMmJhM2RkZDZiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9uZ0JoN05BaGhhVEN3SXZacFEzTUFsa3YxUTd2eGhpQ2lRb3VuWmlQNmozczRtT1IxVFNGK09wbGkrcFwvNTJHIn0= dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dandan: UefiTianoDecompress() API function header doesn't describe the parameter= Version and the assert condition when Version is not 1 or 2. Please update= the function comments in header file and C source file.=20 With this change, Reviewed-by: Liming Gao Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Da= ndan Bi > Sent: Monday, May 13, 2019 10:16 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > Subject: [edk2-devel] [patch 1/5] MdePkg: Merge TianoCustomDecompress al= gorithm into >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1722 >=20 > We plan to merge the BaseUefiTianoCustomDecompressLib > in MdeModulePkg into the BaseUefDecompressLib in MdePkg. > In order to reduce the duplicated codes and maintain > easily. > This patch adds a new fdf file in BaseUefDecompressLib > (BaseUefiTianoCustomDecompressLib.inf) to keep the same > functionality and usage model with the one in MdeModulePkg, > and then update consumer to use this new one one and > remove the one in MdeModulePkg finally. >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Signed-off-by: Dandan Bi > --- > .../BaseUefiDecompressLib.c | 69 ++++-- > .../BaseUefiDecompressLib.uni | 6 +- > .../BaseUefiDecompressLibInternals.h | 44 +++- > .../BaseUefiTianoCustomDecompressLib.c | 213 ++++++++++++++++++ > .../BaseUefiTianoCustomDecompressLib.inf | 42 ++++ > MdePkg/MdePkg.dec | 5 + > MdePkg/MdePkg.dsc | 1 + > 7 files changed, 363 insertions(+), 17 deletions(-) > create mode 100644 MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCu= stomDecompressLib.c > create mode 100644 MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCu= stomDecompressLib.inf >=20 > diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.= c > b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > index 8e502b0fdb..d2c40bf1ca 100644 > --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > @@ -1,21 +1,14 @@ > /** @file > UEFI Decompress Library implementation refer to UEFI specification. >=20 > - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved. > Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > - > -#include > -#include > -#include > -#include > -#include > - > #include "BaseUefiDecompressLibInternals.h" >=20 > /** > Read NumOfBit of bits from source into mBitBuf. >=20 > @@ -746,15 +739,15 @@ UefiDecompressGetInfo ( > @retval RETURN_INVALID_PARAMETER > The source buffer specified by Source is corr= upted > (not in a valid compressed format). > **/ > RETURN_STATUS > -EFIAPI > -UefiDecompress ( > +UefiTianoDecompress ( > IN CONST VOID *Source, > IN OUT VOID *Destination, > - IN OUT VOID *Scratch OPTIONAL > + IN OUT VOID *Scratch, > + IN UINT32 Version > ) > { > UINT32 CompSize; > UINT32 OrigSize; > SCRATCH_DATA *Sd; > @@ -784,12 +777,22 @@ UefiDecompress ( > SetMem (Sd, sizeof (SCRATCH_DATA), 0); >=20 > // > // The length of the field 'Position Set Code Length Array Size' in B= lock Header. > // For UEFI 2.0 de/compression algorithm(Version 1), mPBit =3D 4 > - // > - Sd->mPBit =3D 4; > + // For Tiano de/compression algorithm(Version 2), mPBit =3D 5 > + // > + switch (Version) { > + case 1 : > + Sd->mPBit =3D 4; > + break; > + case 2 : > + Sd->mPBit =3D 5; > + break; > + default: > + ASSERT (FALSE); > + } > Sd->mSrcBase =3D (UINT8 *)Src; > Sd->mDstBase =3D Dst; > // > // CompSize and OrigSize are calculated in bytes > // > @@ -813,5 +816,45 @@ UefiDecompress ( > return RETURN_INVALID_PARAMETER; > } >=20 > return RETURN_SUCCESS; > } > + > +/** > + Decompresses a UEFI compressed source buffer. > + > + Extracts decompressed data to its original form. > + This function is designed so that the decompression algorithm can be = implemented > + without using any memory services. As a result, this function is not= allowed to > + call any memory allocation services in its implementation. It is the= caller's > + responsibility to allocate and free the Destination and Scratch buffe= rs. > + If the compressed source data specified by Source is successfully dec= ompressed > + into Destination, then RETURN_SUCCESS is returned. If the compressed= source data > + specified by Source is not in a valid compressed data format, > + then RETURN_INVALID_PARAMETER is returned. > + > + If Source is NULL, then ASSERT(). > + If Destination is NULL, then ASSERT(). > + If the required scratch buffer size > 0 and Scratch is NULL, then ASS= ERT(). > + > + @param Source The source buffer containing the compressed data. > + @param Destination The destination buffer to store the decompressed = data > + @param Scratch A temporary scratch buffer that is used to perfor= m the decompression. > + This is an optional parameter that may be NULL if= the > + required scratch buffer size is 0. > + > + @retval RETURN_SUCCESS Decompression completed successfully, and > + the uncompressed buffer is returned in Destin= ation. > + @retval RETURN_INVALID_PARAMETER > + The source buffer specified by Source is corr= upted > + (not in a valid compressed format). > +**/ > +RETURN_STATUS > +EFIAPI > +UefiDecompress ( > + IN CONST VOID *Source, > + IN OUT VOID *Destination, > + IN OUT VOID *Scratch OPTIONAL > + ) > +{ > + return UefiTianoDecompress (Source, Destination, Scratch, 1); > +} > diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.= uni > b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.uni > index 1cec6bd965..25f379d047 100644 > --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.uni > +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.uni > @@ -1,16 +1,16 @@ > // /** @file > // UEFI Decompress Library implementation. > // > // UEFI Decompress Library implementation. > // > -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved. > +// Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved. > // > // SPDX-License-Identifier: BSD-2-Clause-Patent > // > // **/ >=20 >=20 > -#string STR_MODULE_ABSTRACT #language en-US "UEFI Decompres= s Library implementation" > +#string STR_MODULE_ABSTRACT #language en-US "UEFI Decompres= s Library and Tiano Custom Decompress Library > implementation." >=20 > -#string STR_MODULE_DESCRIPTION #language en-US "UEFI Decompres= s Library implementation." > +#string STR_MODULE_DESCRIPTION #language en-US "Tiano custom d= ecompression algorithm shares most of the code with > the UEFI Decompress algorithm." >=20 > diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibI= nternals.h > b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h > index 9821c19c7b..0bfb503337 100644 > --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternal= s.h > +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternal= s.h > @@ -1,16 +1,21 @@ > /** @file > Internal data structure defintions for Base UEFI Decompress Library. >=20 > - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. > + Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > #ifndef __BASE_UEFI_DECOMPRESS_LIB_INTERNALS_H__ > #define __BASE_UEFI_DECOMPRESS_LIB_INTERNALS_H__ >=20 > +#include > +#include > +#include > +#include > +#include > // > // Decompression algorithm begins here > // > #define BITBUFSIZ 32 > #define MAXMATCH 256 > @@ -56,10 +61,11 @@ typedef struct { > UINT16 mPTTable[256]; >=20 > /// > /// The length of the field 'Position Set Code Length Array Size' in = Block Header. > /// For UEFI 2.0 de/compression algorithm, mPBit =3D 4. > + /// For Tiano de/compression algorithm, mPBit =3D 5. > /// > UINT8 mPBit; > } SCRATCH_DATA; >=20 > /** > @@ -200,6 +206,42 @@ DecodeC ( > VOID > Decode ( > SCRATCH_DATA *Sd > ); >=20 > +/** > + Decompresses a compressed source buffer. > + > + Extracts decompressed data to its original form. > + This function is designed so that the decompression algorithm can be = implemented > + without using any memory services. As a result, this function is not= allowed to > + call any memory allocation services in its implementation. It is the= caller's > + responsibility to allocate and free the Destination and Scratch buffe= rs. > + If the compressed source data specified by Source is successfully dec= ompressed > + into Destination, then RETURN_SUCCESS is returned. If the compressed= source data > + specified by Source is not in a valid compressed data format, > + then RETURN_INVALID_PARAMETER is returned. > + > + If Source is NULL, then ASSERT(). > + If Destination is NULL, then ASSERT(). > + If the required scratch buffer size > 0 and Scratch is NULL, then ASS= ERT(). > + > + @param Source The source buffer containing the compressed data. > + @param Destination The destination buffer to store the decompressed = data. > + @param Scratch A temporary scratch buffer that is used to perfor= m the decompression. > + This is an optional parameter that may be NULL if= the > + required scratch buffer size is 0. > + > + @retval RETURN_SUCCESS Decompression completed successfully, and > + the uncompressed buffer is returned in Destin= ation. > + @retval RETURN_INVALID_PARAMETER > + The source buffer specified by Source is corr= upted > + (not in a valid compressed format). > +**/ > +RETURN_STATUS > +UefiTianoDecompress ( > + IN CONST VOID *Source, > + IN OUT VOID *Destination, > + IN OUT VOID *Scratch, > + IN UINT32 Version > + ); > #endif > diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDec= ompressLib.c > b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib.= c > new file mode 100644 > index 0000000000..5a73933d2a > --- /dev/null > +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompress= Lib.c > @@ -0,0 +1,213 @@ > +/** @file > + UEFI Decompress Library implementation refer to UEFI specification. > + > + Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved. > + Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > +#include > +#include "BaseUefiDecompressLibInternals.h" > + > +/** > + Examines a GUIDed section and returns the size of the decoded buffer = and the > + size of an optional scratch buffer required to actually decode the da= ta in a GUIDed section. > + > + Examines a GUIDed section specified by InputSection. > + If GUID for InputSection does not match the GUID that this handler su= pports, > + then RETURN_UNSUPPORTED is returned. > + If the required information can not be retrieved from InputSection, > + then RETURN_INVALID_PARAMETER is returned. > + If the GUID of InputSection does match the GUID that this handler sup= ports, > + then the size required to hold the decoded buffer is returned in Outu= tBufferSize, > + the size of an optional scratch buffer is returned in ScratchSize, an= d the Attributes field > + from EFI_GUID_DEFINED_SECTION header of InputSection is returned in S= ectionAttribute. > + > + If InputSection is NULL, then ASSERT(). > + If OutputBufferSize is NULL, then ASSERT(). > + If ScratchBufferSize is NULL, then ASSERT(). > + If SectionAttribute is NULL, then ASSERT(). > + > + > + @param[in] InputSection A pointer to a GUIDed section of an FF= S formatted file. > + @param[out] OutputBufferSize A pointer to the size, in bytes, of an= output buffer required > + if the buffer specified by InputSectio= n were decoded. > + @param[out] ScratchBufferSize A pointer to the size, in bytes, requi= red as scratch space > + if the buffer specified by InputSectio= n were decoded. > + @param[out] SectionAttribute A pointer to the attributes of the GUI= Ded section. See the Attributes > + field of EFI_GUID_DEFINED_SECTION in t= he PI Specification. > + > + @retval RETURN_SUCCESS The information about InputSection= was returned. > + @retval RETURN_UNSUPPORTED The section specified by InputSect= ion does not match the GUID this handler supports. > + @retval RETURN_INVALID_PARAMETER The information can not be retriev= ed from the section specified by InputSection. > + > +**/ > +RETURN_STATUS > +EFIAPI > +TianoDecompressGetInfo ( > + IN CONST VOID *InputSection, > + OUT UINT32 *OutputBufferSize, > + OUT UINT32 *ScratchBufferSize, > + OUT UINT16 *SectionAttribute > + ) > + > +{ > + ASSERT (SectionAttribute !=3D NULL); > + > + if (InputSection =3D=3D NULL) { > + return RETURN_INVALID_PARAMETER; > + } > + > + if (IS_SECTION2 (InputSection)) { > + if (!CompareGuid ( > + &gTianoCustomDecompressGuid, > + &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefiniti= onGuid))) { > + return RETURN_INVALID_PARAMETER; > + } > + // > + // Get guid attribute of guid section. > + // > + *SectionAttribute =3D ((EFI_GUID_DEFINED_SECTION2 *) InputSection)-= >Attributes; > + > + // > + // Call Tiano GetInfo to get the required size info. > + // > + return UefiDecompressGetInfo ( > + (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION2 *) In= putSection)->DataOffset, > + SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2= *) InputSection)->DataOffset, > + OutputBufferSize, > + ScratchBufferSize > + ); > + } else { > + if (!CompareGuid ( > + &gTianoCustomDecompressGuid, > + &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitio= nGuid))) { > + return RETURN_INVALID_PARAMETER; > + } > + // > + // Get guid attribute of guid section. > + // > + *SectionAttribute =3D ((EFI_GUID_DEFINED_SECTION *) InputSection)->= Attributes; > + > + // > + // Call Tiano GetInfo to get the required size info. > + // > + return UefiDecompressGetInfo ( > + (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) Inp= utSection)->DataOffset, > + SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *= ) InputSection)->DataOffset, > + OutputBufferSize, > + ScratchBufferSize > + ); > + } > +} > + > +/** > + Decompress a Tiano compressed GUIDed section into a caller allocated = output buffer. > + > + Decodes the GUIDed section specified by InputSection. > + If GUID for InputSection does not match the GUID that this handler su= pports, then RETURN_UNSUPPORTED is returned. > + If the data in InputSection can not be decoded, then RETURN_INVALID_P= ARAMETER is returned. > + If the GUID of InputSection does match the GUID that this handler sup= ports, then InputSection > + is decoded into the buffer specified by OutputBuffer and the authenti= cation status of this > + decode operation is returned in AuthenticationStatus. If the decoded= buffer is identical to the > + data in InputSection, then OutputBuffer is set to point at the data i= n InputSection. Otherwise, > + the decoded data will be placed in caller allocated buffer specified = by OutputBuffer. > + > + If InputSection is NULL, then ASSERT(). > + If OutputBuffer is NULL, then ASSERT(). > + If ScratchBuffer is NULL and this decode operation requires a scratch= buffer, then ASSERT(). > + If AuthenticationStatus is NULL, then ASSERT(). > + > + > + @param[in] InputSection A pointer to a GUIDed section of an FFS for= matted file. > + @param[out] OutputBuffer A pointer to a buffer that contains the res= ult of a decode operation. > + @param[in] ScratchBuffer A caller allocated buffer that may be requi= red by this function > + as a scratch buffer to perform the decode o= peration. > + @param[out] AuthenticationStatus > + A pointer to the authentication status of t= he decoded output buffer. > + See the definition of authentication status= in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI > + section of the PI Specification. EFI_AUTH_S= TATUS_PLATFORM_OVERRIDE must > + never be set by this handler. > + > + @retval RETURN_SUCCESS The buffer specified by InputSecti= on was decoded. > + @retval RETURN_UNSUPPORTED The section specified by InputSect= ion does not match the GUID this handler supports. > + @retval RETURN_INVALID_PARAMETER The section specified by InputSect= ion can not be decoded. > + > +**/ > +RETURN_STATUS > +EFIAPI > +TianoDecompress ( > + IN CONST VOID *InputSection, > + OUT VOID **OutputBuffer, > + IN VOID *ScratchBuffer, OPTIONAL > + OUT UINT32 *AuthenticationStatus > + ) > +{ > + ASSERT (OutputBuffer !=3D NULL); > + ASSERT (InputSection !=3D NULL); > + > + if (IS_SECTION2 (InputSection)) { > + if (!CompareGuid ( > + &gTianoCustomDecompressGuid, > + &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefiniti= onGuid))) { > + return RETURN_INVALID_PARAMETER; > + } > + > + // > + // Set Authentication to Zero. > + // > + *AuthenticationStatus =3D 0; > + > + // > + // Call Tiano Decompress to get the raw data > + // > + return UefiTianoDecompress ( > + (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION2 *) In= putSection)->DataOffset, > + *OutputBuffer, > + ScratchBuffer, > + 2 > + ); > + } else { > + if (!CompareGuid ( > + &gTianoCustomDecompressGuid, > + &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitio= nGuid))) { > + return RETURN_INVALID_PARAMETER; > + } > + > + // > + // Set Authentication to Zero. > + // > + *AuthenticationStatus =3D 0; > + > + // > + // Call Tiano Decompress to get the raw data > + // > + return UefiTianoDecompress ( > + (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) Inp= utSection)->DataOffset, > + *OutputBuffer, > + ScratchBuffer, > + 2 > + ); > + } > +} > + > +/** > + Registers TianoDecompress and TianoDecompressGetInfo handlers with Ti= anoCustomerDecompressGuid > + > + @retval RETURN_SUCCESS Register successfully. > + @retval RETURN_OUT_OF_RESOURCES No enough memory to store this han= dler. > +**/ > +RETURN_STATUS > +EFIAPI > +TianoDecompressLibConstructor ( > + VOID > +) > +{ > + return ExtractGuidedSectionRegisterHandlers ( > + &gTianoCustomDecompressGuid, > + TianoDecompressGetInfo, > + TianoDecompress > + ); > +} > diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDec= ompressLib.inf > b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib.= inf > new file mode 100644 > index 0000000000..280a5f307d > --- /dev/null > +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompress= Lib.inf > @@ -0,0 +1,42 @@ > +## @file > +# This library instance produces UefiDecompressLib and Tiano Custom de= compression algorithm. > +# Tiano custom decompression algorithm shares most of code with Uefi D= ecompress algorithm. > +# > +# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D BaseUefiTianoCustomDecompressLib > + MODULE_UNI_FILE =3D BaseUefiDecompressLib.uni > + FILE_GUID =3D d774c4d9-c121-4da3-a5e2-0f317e3c63= 0c > + MODULE_TYPE =3D BASE > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D UefiDecompressLib > + CONSTRUCTOR =3D TianoDecompressLibConstructor > + > +# > +# The following information is for reference only and not required by t= he build tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 EBC > +# > + > +[Sources] > + BaseUefiDecompressLibInternals.h > + BaseUefiDecompressLib.c > + BaseUefiTianoCustomDecompressLib.c > + > +[Packages] > + MdePkg/MdePkg.dec > + > +[LibraryClasses] > + BaseLib > + DebugLib > + BaseMemoryLib > + ExtractGuidedSectionLib > + > +[Guids] > + gTianoCustomDecompressGuid ## PRODUCES ## UNDEFINED # specifies= tiano custom decompress algorithm. > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > index 28d4a966c2..6c563375ee 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -759,10 +759,15 @@ [Guids] > # GUID defined in Windows UEFI Firmware Update Platform doc > # > ## Include/IndustryStandard/WindowsUxCapsule.h > gWindowsUxCapsuleGuid =3D { 0x3b8c8162, 0x188c, 0x46a4, { 0x= ae, 0xc9, 0xbe, 0x43, 0xf1, 0xd6, 0x56, 0x97}} >=20 > + # > + # GUID indicates the tiano custom compress/decompress algorithm. > + # > + gTianoCustomDecompressGuid =3D { 0xA31280AD, 0x481E, 0x41B6, { 0x= 95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 }} > + > [Guids.IA32, Guids.X64] > ## Include/Guid/Cper.h > gEfiIa32X64ErrorTypeCacheCheckGuid =3D { 0xA55701F5, 0xE3EF, 0x43de, = { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }} >=20 > ## Include/Guid/Cper.h > diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc > index 21743e384c..a2ff12fe75 100644 > --- a/MdePkg/MdePkg.dsc > +++ b/MdePkg/MdePkg.dsc > @@ -55,10 +55,11 @@ [Components] > MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNul= l.inf > MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf > MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf > MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf > MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf > + MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib= .inf > MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf > MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf >=20 > MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf > MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf > -- > 2.18.0.windows.1 >=20 >=20 >=20