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:
bbahnsen
2006-04-21 22:54:32 +00:00
commit 878ddf1fc3
2651 changed files with 624620 additions and 0 deletions

View File

@ -0,0 +1,130 @@
/*++
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:
RtPlatformStatusCode.c
Abstract:
Contains NT32 specific implementations required to use status codes.
--*/
//
// Globals only work at BootService Time. NOT at Runtime!
//
//
typedef
EFI_STATUS
(EFIAPI *REPORT_STATUS_CODE_FUNCTION) (
IN EFI_STATUS_CODE_TYPE Type,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId OPTIONAL,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
);
REPORT_STATUS_CODE_FUNCTION mPeiReportStatusCode;
//
// Function implementations
//
EFI_STATUS
RtPlatformReportStatusCode (
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID * CallerId,
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
)
/*++
Routine Description:
Call all status code listeners in the MonoStatusCode.
Arguments:
Same as ReportStatusCode service
Returns:
EFI_SUCCESS Always returns success.
--*/
{
RtMemoryReportStatusCode (CodeType, Value, Instance, CallerId, Data);
if (EfiAtRuntime ()) {
//
// For now all we do is post code at runtime
//
return EFI_SUCCESS;
}
BsDataHubReportStatusCode (CodeType, Value, Instance, CallerId, Data);
//
// Call back into PEI to get status codes. This is because SecMain contains
// status code that reports to Win32.
//
if (mPeiReportStatusCode != NULL) {
return mPeiReportStatusCode (CodeType, Value, Instance, CallerId, Data);
}
return EFI_SUCCESS;
}
VOID
RtPlatformStatusCodeInitialize (
VOID
)
/*++
Routine Description:
Initialize the status code listeners.
Arguments:
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
Returns:
None
--*/
{
EFI_HOB_GUID_TYPE *GuidHob;
void *Pointer;
RtMemoryStatusCodeInitialize ();
BsDataHubStatusCodeInitialize ();
//
// Play any prior status codes to the data hub.
//
PlaybackStatusCodes (BsDataHubReportStatusCode);
//
// If PEI has a ReportStatusCode callback find it and use it before StdErr
// is connected.
//
mPeiReportStatusCode = NULL;
GuidHob = GetFirstGuidHob (&gEfiStatusCodeRuntimeProtocolGuid);
if (NULL == GuidHob) {
return;
}
Pointer = GET_GUID_HOB_DATA (GuidHob);
mPeiReportStatusCode = (REPORT_STATUS_CODE_FUNCTION) (*(UINTN *) Pointer);
}

View 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>EdkRtPlatformStatusCodeLib</BaseName>
<Guid>68b157b5-9534-43ff-9cd3-6705e4e1d56c</Guid>
<Version>0</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-12 17:09</Created>
<Modified>2006-03-19 15:19</Modified>
</MbdLibHeader>
</LibraryModuleBuildDescription>

View File

@ -0,0 +1,54 @@
<?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>EdkRtPlatformStatusCodeLib</BaseName>
<ModuleType>DXE_DRIVER</ModuleType>
<ComponentType>LIBRARY</ComponentType>
<Guid>68b157b5-9534-43ff-9cd3-6705e4e1d56c</Guid>
<Version>0</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>0</Specification>
<Created>2006-03-12 17:09</Created>
<Updated>2006-03-19 15:19</Updated>
</MsaLibHeader>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_PRODUCED">EdkRtPlatformStatusCodeLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">UefiLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">DxeRuntimeDriverLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">ReportStatusCodeLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">PrintLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">HobLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">EdkBsDataHubStatusCodeLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">EdkRtMemoryStatusCodeLib</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>
</LibraryClassDefinitions>
<SourceFiles>
<Filename>RtPlatformStatusCode.c</Filename>
</SourceFiles>
<Includes>
<PackageName>MdePkg</PackageName>
<PackageName>EdkModulePkg</PackageName>
</Includes>
</LibraryModuleSurfaceArea>

View 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="EdkRtPlatformStatusCodeLib"><!--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\EdkRuntimeStatusCodeLib\RtPlatformStatusCode"/>
<property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
<property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
<target name="EdkRtPlatformStatusCodeLib">
<GenBuild baseName="EdkRtPlatformStatusCodeLib" mbdFilename="${MODULE_DIR}\RtPlatformStatusCode.mbd" msaFilename="${MODULE_DIR}\RtPlatformStatusCode.msa"/>
</target>
<target depends="EdkRtPlatformStatusCodeLib_clean" name="clean"/>
<target depends="EdkRtPlatformStatusCodeLib_cleanall" name="cleanall"/>
<target name="EdkRtPlatformStatusCodeLib_clean">
<OutputDirSetup baseName="EdkRtPlatformStatusCodeLib" mbdFilename="${MODULE_DIR}\RtPlatformStatusCode.mbd" msaFilename="${MODULE_DIR}\RtPlatformStatusCode.msa"/>
<if>
<available file="${DEST_DIR_OUTPUT}\EdkRtPlatformStatusCodeLib_build.xml"/>
<then>
<ant antfile="${DEST_DIR_OUTPUT}\EdkRtPlatformStatusCodeLib_build.xml" target="clean"/>
</then>
</if>
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
</target>
<target name="EdkRtPlatformStatusCodeLib_cleanall">
<OutputDirSetup baseName="EdkRtPlatformStatusCodeLib" mbdFilename="${MODULE_DIR}\RtPlatformStatusCode.mbd" msaFilename="${MODULE_DIR}\RtPlatformStatusCode.msa"/>
<if>
<available file="${DEST_DIR_OUTPUT}\EdkRtPlatformStatusCodeLib_build.xml"/>
<then>
<ant antfile="${DEST_DIR_OUTPUT}\EdkRtPlatformStatusCodeLib_build.xml" target="cleanall"/>
</then>
</if>
<delete dir="${DEST_DIR_OUTPUT}"/>
<delete dir="${DEST_DIR_DEBUG}"/>
<delete>
<fileset dir="${BIN_DIR}" includes="**EdkRtPlatformStatusCodeLib*"/>
</delete>
</target>
</project>