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:
68
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
Normal file
68
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
Normal file
@@ -0,0 +1,68 @@
|
||||
|
||||
/** @file
|
||||
Entry point to a PEIM.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
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.
|
||||
|
||||
**/
|
||||
|
||||
/**
|
||||
Image entry point of Peim.
|
||||
|
||||
@param FfsHeader Pointer to FFS header the loaded driver.
|
||||
@param PeiServices Pointer to the PEI services.
|
||||
|
||||
@return Status returned by entry points of Peims.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
_ModuleEntryPoint (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
{
|
||||
if (_gPeimRevision != 0) {
|
||||
//
|
||||
// Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
|
||||
//
|
||||
ASSERT ((*PeiServices)->Hdr.Revision >= _gPeimRevision);
|
||||
}
|
||||
|
||||
//
|
||||
// Call constructor for all libraries
|
||||
//
|
||||
ProcessLibraryConstructorList (FfsHeader, PeiServices);
|
||||
|
||||
//
|
||||
// Call the driver entry point
|
||||
//
|
||||
return ProcessModuleEntryPointList (FfsHeader, PeiServices);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Wrapper of Peim image entry point.
|
||||
|
||||
@param FfsHeader Pointer to FFS header the loaded driver.
|
||||
@param PeiServices Pointer to the PEI services.
|
||||
|
||||
@return Status returned by entry points of Peims.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EfiMain (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
{
|
||||
return _ModuleEntryPoint (FfsHeader, PeiServices);
|
||||
}
|
30
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.mbd
Normal file
30
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.mbd
Normal file
@@ -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>PeimEntryPoint</BaseName>
|
||||
<Guid>fa177ff7-1fc7-458d-a358-d9d62ae61cec</Guid>
|
||||
<Version>0</Version>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-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>
|
||||
<Created>2006-03-09 23:12</Created>
|
||||
<Modified>2006-03-19 15:17</Modified>
|
||||
</MbdLibHeader>
|
||||
</LibraryModuleBuildDescription>
|
44
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.msa
Normal file
44
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.msa
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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>PeimEntryPoint</BaseName>
|
||||
<ModuleType>PEIM</ModuleType>
|
||||
<ComponentType>LIBRARY</ComponentType>
|
||||
<Guid>fa177ff7-1fc7-458d-a358-d9d62ae61cec</Guid>
|
||||
<Version>0</Version>
|
||||
<Abstract>Component description file for the entry point to the PEI Core</Abstract>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-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>0</Specification>
|
||||
<Created>2006-03-09 23:12</Created>
|
||||
<Updated>2006-03-19 15:17</Updated>
|
||||
</MsaLibHeader>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED">PeimEntryPoint</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>PeimEntryPoint.c</Filename>
|
||||
</SourceFiles>
|
||||
<Includes>
|
||||
<PackageName>MdePkg</PackageName>
|
||||
</Includes>
|
||||
</LibraryModuleSurfaceArea>
|
47
MdePkg/Library/PeimEntryPoint/build.xml
Normal file
47
MdePkg/Library/PeimEntryPoint/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="PeimEntryPoint"><!--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\PeimEntryPoint"/>
|
||||
<property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
|
||||
<property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
|
||||
<target name="PeimEntryPoint">
|
||||
<GenBuild baseName="PeimEntryPoint" mbdFilename="${MODULE_DIR}\PeimEntryPoint.mbd" msaFilename="${MODULE_DIR}\PeimEntryPoint.msa"/>
|
||||
</target>
|
||||
<target depends="PeimEntryPoint_clean" name="clean"/>
|
||||
<target depends="PeimEntryPoint_cleanall" name="cleanall"/>
|
||||
<target name="PeimEntryPoint_clean">
|
||||
<OutputDirSetup baseName="PeimEntryPoint" mbdFilename="${MODULE_DIR}\PeimEntryPoint.mbd" msaFilename="${MODULE_DIR}\PeimEntryPoint.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\PeimEntryPoint_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\PeimEntryPoint_build.xml" target="clean"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
|
||||
</target>
|
||||
<target name="PeimEntryPoint_cleanall">
|
||||
<OutputDirSetup baseName="PeimEntryPoint" mbdFilename="${MODULE_DIR}\PeimEntryPoint.mbd" msaFilename="${MODULE_DIR}\PeimEntryPoint.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\PeimEntryPoint_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\PeimEntryPoint_build.xml" target="cleanall"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}"/>
|
||||
<delete dir="${DEST_DIR_DEBUG}"/>
|
||||
<delete>
|
||||
<fileset dir="${BIN_DIR}" includes="**PeimEntryPoint*"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
Reference in New Issue
Block a user