From be29ac91de937979879bc4478a058cb46f75975f Mon Sep 17 00:00:00 2001 From: klu2 Date: Fri, 6 Jul 2007 05:19:36 +0000 Subject: 1) PcdDxeIplSupportCustomDecompress, PcdDxeIplSupportTianoDecompress, PcdDxeIplSupportEfiDecompress, PcdDxeIplBuildShareCodeHobs should in gEfiMdeModulePkgTokenSpaceGuid token space 2) Add DxePeCoffLoaderFromHobLib library instance for DxeCore git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3098 6f19259b-4bc3-4df7-8a09-765794883524 --- .../DxePeCoffLoaderFromHobLib.inf | 91 ++++++++++++++++++++++ .../EdkDxePeCoffLoaderFromHobLib.msa | 48 ++++++++++++ .../Library/DxePeCoffLoaderFromHobLib/PeCoff.c | 50 ++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf create mode 100644 MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa create mode 100644 MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c (limited to 'MdeModulePkg/Library') diff --git a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf new file mode 100644 index 0000000..dba4401 --- /dev/null +++ b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf @@ -0,0 +1,91 @@ +#/** @file +# EdkPeCoffLoaderLib library instance +# +# This library gets PeCoffLoader Protocol from Hob List +# Copyright (c) 2006, 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. +# +# +#**/ + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = EdkDxePeCoffLoaderFromHobLib + FILE_GUID = ed3de5c8-c389-44f2-a35e-2ebdc9802a49 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = PeCoffLoaderLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER + EDK_RELEASE_VERSION = 0x00020000 + EFI_SPECIFICATION_VERSION = 0x00020000 + + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources.common] + PeCoff.c + CommonHeader.h + + +################################################################################ +# +# Includes Section - list of Include locations that are required for +# this module. +# +################################################################################ + +[Includes] + $(WORKSPACE)/MdePkg/Include/Library + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + + +################################################################################ +# +# Library Class Section - list of Library Classes that are required for +# this module. +# +################################################################################ + +[LibraryClasses] + HobLib + + +################################################################################ +# +# Guid C Name Section - list of Guids that this module uses or produces. +# +################################################################################ + +[Guids] + gEfiPeiPeCoffLoaderGuid # ALWAYS_CONSUMED + diff --git a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa new file mode 100644 index 0000000..7351c73 --- /dev/null +++ b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa @@ -0,0 +1,48 @@ + + + + EdkDxePeCoffLoaderFromHobLib + DXE_DRIVER + ed3de5c8-c389-44f2-a35e-2ebdc9802a49 + 1.0 + EdkPeCoffLoaderLib library instance + This library gets PeCoffLoader Protocol from Hob List + Copyright (c) 2006, 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. + FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 + + + IA32 X64 IPF EBC + false + EdkDxePeCoffLoaderFromHobLib + + + + EdkPeCoffLoaderLib + + + HobLib + + + + PeCoff.c + + + + + + + + gEfiPeiPeCoffLoaderGuid + + + + EFI_SPECIFICATION_VERSION 0x00020000 + EDK_RELEASE_VERSION 0x00020000 + + \ No newline at end of file diff --git a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c new file mode 100644 index 0000000..c1a4309 --- /dev/null +++ b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c @@ -0,0 +1,50 @@ +/*++ + +Copyright (c) 2006, 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: + + Decompress.c + +Abstract: + +--*/ + +// +// The package level header files this module uses +// +#include +// +// The protocols, PPI and GUID defintions for this module +// +#include +// +// The Library classes this module consumes +// +#include +#include + + + +EFI_PEI_PE_COFF_LOADER_PROTOCOL * +EFIAPI +GetPeCoffLoaderProtocol ( + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + + GuidHob = GetFirstGuidHob (&gEfiPeiPeCoffLoaderGuid); + if (GuidHob == NULL) { + return NULL; + } else { + return (EFI_PEI_PE_COFF_LOADER_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob))); + } +} + -- cgit v1.1