Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
51
EdkNt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c
Normal file
51
EdkNt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
TianoPeCoffLoader.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Wrap the Base PE/COFF loader with the PE COFF Protocol
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
|
||||
EFI_PEI_PE_COFF_LOADER_PROTOCOL *mPeiEfiPeiPeCoffLoader;
|
||||
|
||||
EFI_STATUS
|
||||
PeCoffLoaderConstructor (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = (*PeiServices)->LocatePpi (
|
||||
PeiServices,
|
||||
&gEfiPeiPeCoffLoaderGuid,
|
||||
0,
|
||||
NULL,
|
||||
&mPeiEfiPeiPeCoffLoader
|
||||
);
|
||||
return Status;
|
||||
}
|
||||
|
||||
EFI_PEI_PE_COFF_LOADER_PROTOCOL *
|
||||
EFIAPI
|
||||
GetPeCoffLoaderProtocol (
|
||||
)
|
||||
{
|
||||
return mPeiEfiPeiPeCoffLoader;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<LibraryModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MbdLibHeader>
|
||||
<BaseName>Nt32PeCoffLoaderLib</BaseName>
|
||||
<Guid>3c5702f2-9b17-4273-b60c-b96e6cd13066</Guid>
|
||||
<Version>EDK_RELEASE_VERSION 0x00020000</Version>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004 - 2005, 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>
|
||||
<Created>2006-03-14 17:04</Created>
|
||||
<Modified>2006-03-31 13:20</Modified>
|
||||
</MbdLibHeader>
|
||||
</LibraryModuleBuildDescription>
|
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<LibraryModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MsaLibHeader>
|
||||
<BaseName>Nt32PeCoffLoaderLib</BaseName>
|
||||
<ModuleType>PEIM</ModuleType>
|
||||
<ComponentType>LIBRARY</ComponentType>
|
||||
<Guid>3c5702f2-9b17-4273-b60c-b96e6cd13066</Guid>
|
||||
<Version>EDK_RELEASE_VERSION 0x00020000</Version>
|
||||
<Abstract>Component description file for the PEI library.</Abstract>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004 - 2005, 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>EFI_SPECIFICATION_VERSION 0x00000000</Specification>
|
||||
<Created>2006-03-14 17:04</Created>
|
||||
<Updated>2006-03-31 13:20</Updated>
|
||||
</MsaLibHeader>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED">EdkPeCoffLoaderLib</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>Nt32PeCoffLoader.c</Filename>
|
||||
</SourceFiles>
|
||||
<Includes>
|
||||
<PackageName>MdePkg</PackageName>
|
||||
<PackageName>EdkModulePkg</PackageName>
|
||||
<PackageName>EdkNt32Pkg</PackageName>
|
||||
</Includes>
|
||||
<PPIs>
|
||||
<Ppi Usage="ALWAYS_CONSUMED">PeCoffLoader</Ppi>
|
||||
</PPIs>
|
||||
<Externs>
|
||||
<Extern>
|
||||
<Constructor>PeCoffLoaderConstructor</Constructor>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</LibraryModuleSurfaceArea>
|
47
EdkNt32Pkg/Library/Nt32PeCoffLoaderLib/build.xml
Normal file
47
EdkNt32Pkg/Library/Nt32PeCoffLoaderLib/build.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!-- 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.-->
|
||||
<project basedir="." default="Nt32PeCoffLoaderLib"><!--Apply external ANT tasks-->
|
||||
<taskdef resource="GenBuild.tasks"/>
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
||||
<property environment="env"/>
|
||||
<property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>
|
||||
<import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->
|
||||
<property name="MODULE_RELATIVE_PATH" value="Library\Nt32PeCoffLoaderLib"/>
|
||||
<property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
|
||||
<property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
|
||||
<target name="Nt32PeCoffLoaderLib">
|
||||
<GenBuild baseName="Nt32PeCoffLoaderLib" mbdFilename="${MODULE_DIR}\Nt32PeCoffLoaderLib.mbd" msaFilename="${MODULE_DIR}\Nt32PeCoffLoaderLib.msa"/>
|
||||
</target>
|
||||
<target depends="Nt32PeCoffLoaderLib_clean" name="clean"/>
|
||||
<target depends="Nt32PeCoffLoaderLib_cleanall" name="cleanall"/>
|
||||
<target name="Nt32PeCoffLoaderLib_clean">
|
||||
<OutputDirSetup baseName="Nt32PeCoffLoaderLib" mbdFilename="${MODULE_DIR}\Nt32PeCoffLoaderLib.mbd" msaFilename="${MODULE_DIR}\Nt32PeCoffLoaderLib.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\Nt32PeCoffLoaderLib_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\Nt32PeCoffLoaderLib_build.xml" target="clean"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
|
||||
</target>
|
||||
<target name="Nt32PeCoffLoaderLib_cleanall">
|
||||
<OutputDirSetup baseName="Nt32PeCoffLoaderLib" mbdFilename="${MODULE_DIR}\Nt32PeCoffLoaderLib.mbd" msaFilename="${MODULE_DIR}\Nt32PeCoffLoaderLib.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\Nt32PeCoffLoaderLib_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\Nt32PeCoffLoaderLib_build.xml" target="cleanall"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}"/>
|
||||
<delete dir="${DEST_DIR_DEBUG}"/>
|
||||
<delete>
|
||||
<fileset dir="${BIN_DIR}" includes="**Nt32PeCoffLoaderLib*"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
Reference in New Issue
Block a user