summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-06 05:19:36 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-06 05:19:36 +0000
commitbe29ac91de937979879bc4478a058cb46f75975f (patch)
tree8c4e829ea7a9f918d21c44e75b8094a3286abfd7 /MdeModulePkg/Library
parent5391f20b5b6d06123c63e02514e252c74073417d (diff)
downloadedk2-be29ac91de937979879bc4478a058cb46f75975f.zip
edk2-be29ac91de937979879bc4478a058cb46f75975f.tar.gz
edk2-be29ac91de937979879bc4478a058cb46f75975f.tar.bz2
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
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r--MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf91
-rw-r--r--MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa48
-rw-r--r--MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c50
3 files changed, 189 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <MsaHeader>
+ <ModuleName>EdkDxePeCoffLoaderFromHobLib</ModuleName>
+ <ModuleType>DXE_DRIVER</ModuleType>
+ <GuidValue>ed3de5c8-c389-44f2-a35e-2ebdc9802a49</GuidValue>
+ <Version>1.0</Version>
+ <Abstract>EdkPeCoffLoaderLib library instance</Abstract>
+ <Description>This library gets PeCoffLoader Protocol from Hob List</Description>
+ <Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
+ <License>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.</License>
+ <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
+ </MsaHeader>
+ <ModuleDefinitions>
+ <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
+ <BinaryModule>false</BinaryModule>
+ <OutputFileBasename>EdkDxePeCoffLoaderFromHobLib</OutputFileBasename>
+ </ModuleDefinitions>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER">
+ <Keyword>EdkPeCoffLoaderLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>HobLib</Keyword>
+ </LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename>PeCoff.c</Filename>
+ </SourceFiles>
+ <PackageDependencies>
+ <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+ <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
+ </PackageDependencies>
+ <Guids>
+ <GuidCNames Usage="ALWAYS_CONSUMED">
+ <GuidCName>gEfiPeiPeCoffLoaderGuid</GuidCName>
+ </GuidCNames>
+ </Guids>
+ <Externs>
+ <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
+ <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
+ </Externs>
+</ModuleSurfaceArea> \ 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 <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Guid/PeiPeCoffLoader.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/PeCoffLoaderLib.h>
+#include <Library/HobLib.h>
+
+
+
+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)));
+ }
+}
+