1. removed BaseTimerLibLocalApic from MdePkg and Nt32TimerLib from EdkNt32Pkg.

2. added BaseTimerlibNullTemplate in MdePkg and SecPeiDxeTimerLibCpu in MdePkg. 
3. modified the related spd and fpd files

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2347 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-02-02 05:36:42 +00:00
parent 3401c092e4
commit 4faa50287e
11 changed files with 83 additions and 284 deletions

View File

@@ -0,0 +1,43 @@
<?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>BaseTimerLibNullTemplate</ModuleName>
<ModuleType>BASE</ModuleType>
<GuidValue>f4731d79-537e-4505-bd52-c03f9b1f6b89</GuidValue>
<Version>1.0</Version>
<Abstract>Timer library NULL template implementaton</Abstract>
<Description>This NULL Timer library provides one template API of TimerLib library,
this library do not impletement functionality completely.</Description>
<Copyright>Copyright (c) 2007, 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>BaseTimerLibNullTemplate</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_PRODUCED">
<Keyword>TimerLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>DebugLib</Keyword>
</LibraryClass>
</LibraryClassDefinitions>
<SourceFiles>
<Filename>TimerLibNull.c</Filename>
</SourceFiles>
<PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</PackageDependencies>
<Externs>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
</Externs>
</ModuleSurfaceArea>

View File

@@ -1,7 +1,7 @@
/** @file
Timer Library functions for EBC.
Timer Library functions for runtime drivers.
Copyright (c) 2006, Intel Corporation<BR>
Copyright (c) 2007, 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
@@ -10,7 +10,7 @@
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: EbcTimerLib.c
Module Name: RuntimeTimerLib.c
**/
@@ -30,9 +30,6 @@ MicroSecondDelay (
IN UINTN MicroSeconds
)
{
//
// EBC architecture does not support local APIC timer.
//
ASSERT (FALSE);
return MicroSeconds;
}
@@ -53,11 +50,8 @@ NanoSecondDelay (
IN UINTN NanoSeconds
)
{
//
// EBC architecture does not support local APIC timer.
//
ASSERT (FALSE);
return NanoSeconds;
return 0;
}
/**
@@ -78,9 +72,6 @@ GetPerformanceCounter (
VOID
)
{
//
// EBC architecture does not support local APIC timer.
//
ASSERT (FALSE);
return 0;
}
@@ -115,9 +106,6 @@ GetPerformanceCounterProperties (
OUT UINT64 *EndValue OPTIONAL
)
{
//
// EBC architecture does not support local APIC timer.
//
ASSERT (FALSE);
return 0;
}

View File

@@ -1,11 +1,7 @@
/** @file
Timer Library functions built upon local APIC on IA32/x64.
Timer Library functions built upon ITC on IA32/x64.
@bug Should use PCD to retrieve all the constants including index of
the IA32_APIC_BASE MSR, the offsets of InitialCount, CorrentCount
and DivideConfiguration.
Copyright (c) 2006, Intel Corporation<BR>
Copyright (c) 2006 - 2007, 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

View File

@@ -1,16 +1,17 @@
<?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>BaseTimerLibLocalApic</ModuleName>
<ModuleName>SecPeiDxeTimerLibCpu</ModuleName>
<ModuleType>BASE</ModuleType>
<GuidValue>b5a05743-9b71-489b-a0ed-a0eb3950d23b</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for Baser Timer Library</Abstract>
<Description>Timer Library that only uses CPU resources to provide calibrated
delays on IA-32 and x64. Note: Because CpuLocalApci timer could be programmed
by OS, it cannot be used by SMM drivers and runtime drivers, ACPI timer is
recommended for SMM drivers and runtime drivers.</Description>
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
<Abstract>Timer Library implementation for boot time drivers.</Abstract>
<Description>Timer Library that uses CPU resources to provide calibrated
delays on IA-32 and x64, and uses ITC on IPF. Note: Because CpuLocalApci
and ITC could be programmed by OS, it cannot be used by SMM drivers
and runtime drivers, ACPI timer is recommended for SMM drivers and RUNTIME
drivers.</Description>
<Copyright>Copyright (c) 2006 - 2007, 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
@@ -20,12 +21,12 @@
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</MsaHeader>
<ModuleDefinitions>
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
<SupportedArchitectures>IA32 X64 IPF</SupportedArchitectures>
<BinaryModule>false</BinaryModule>
<OutputFileBasename>BaseTimerLibLocalApic</OutputFileBasename>
<OutputFileBasename>SecPeiDxeTimerLibCpu</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_PRODUCED">
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="BASE DXE_CORE DXE_DRIVER DXE_SAL_DRIVER PEIM PEI_CORE SEC UEFI_APPLICATION UEFI_DRIVER">
<Keyword>TimerLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
@@ -44,8 +45,7 @@
<SourceFiles>
<Filename SupArchList="IA32">x86TimerLib.c</Filename>
<Filename SupArchList="X64">x86TimerLib.c</Filename>
<Filename SupArchList="IPF">Ipf/IpfTimerLib.c</Filename>
<Filename SupArchList="EBC">Ebc/EbcTimerLib.c</Filename>
<Filename SupArchList="IPF">IpfTimerLib.c</Filename>
</SourceFiles>
<PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>

View File

@@ -5,7 +5,7 @@
the IA32_APIC_BASE MSR, the offsets of InitialCount, CorrentCount
and DivideConfiguration.
Copyright (c) 2006, Intel Corporation<BR>
Copyright (c) 2006 - 2007, 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

View File

@@ -1779,22 +1779,6 @@
<FfsFormatKey>LIBRARY</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="EBC" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" ModuleGuid="b5a05743-9b71-489b-a0ed-a0eb3950d23b">
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFSBClock</C_Name>
<Token>0x0000000c</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>200000000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>LIBRARY</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="EBC" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" ModuleGuid="556f5d10-7309-4af4-b80a-8196bd60946f">
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@@ -2284,6 +2268,14 @@
<ModuleSA ModuleGuid="DADE8301-CB29-4fd5-8148-56FD246C5B88" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3" SupArchList="IPF"/>
<!--Mod: UefiApplicationEntryPoint Type: UEFI_DRIVER Path: MdePkg\Library\UefiApplicationEntryPoint\UefiApplicationEntryPoint.msa-->
<ModuleSA ModuleGuid="DADE8301-CB29-4fd5-8148-56FD246C5B88" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3" SupArchList="EBC"/>
<!--Mod: BaseTimerLibNullTemplate Type: BASE Path: MdePkg\Library\BaseTimerLibNullTemplate\BaseTimerLibNullTemplate.msa-->
<ModuleSA ModuleGuid="f4731d79-537e-4505-bd52-c03f9b1f6b89" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3" SupArchList="IA32"/>
<!--Mod: BaseTimerLibNullTemplate Type: BASE Path: MdePkg\Library\BaseTimerLibNullTemplate\BaseTimerLibNullTemplate.msa-->
<ModuleSA ModuleGuid="f4731d79-537e-4505-bd52-c03f9b1f6b89" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3" SupArchList="X64"/>
<!--Mod: BaseTimerLibNullTemplate Type: BASE Path: MdePkg\Library\BaseTimerLibNullTemplate\BaseTimerLibNullTemplate.msa-->
<ModuleSA ModuleGuid="f4731d79-537e-4505-bd52-c03f9b1f6b89" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3" SupArchList="IPF"/>
<!--Mod: BaseTimerLibNullTemplate Type: BASE Path: MdePkg\Library\BaseTimerLibNullTemplate\BaseTimerLibNullTemplate.msa-->
<ModuleSA ModuleGuid="f4731d79-537e-4505-bd52-c03f9b1f6b89" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3" SupArchList="EBC"/>
</FrameworkModules>
<BuildOptions>
<Ffs FfsKey="APPLICATION">

View File

@@ -1150,7 +1150,6 @@
<Filename>Library/BasePciExpressLib/BasePciExpressLib.msa</Filename>
<Filename>Library/BasePciLibCf8/BasePciLibCf8.msa</Filename>
<Filename>Library/BasePciLibPciExpress/BasePciLibPciExpress.msa</Filename>
<Filename>Library/BaseTimerLibLocalApic/BaseTimerLibLocalApic.msa</Filename>
<Filename>Library/DxeCoreEntryPoint/DxeCoreEntryPoint.msa</Filename>
<Filename>Library/DxeCoreHobLib/DxeCoreHobLib.msa</Filename>
<Filename>Library/DxeHobLib/DxeHobLib.msa</Filename>
@@ -1185,6 +1184,8 @@
<Filename>Library/DxeMemoryLib/DxeMemoryLib.msa</Filename>
<Filename>Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.msa</Filename>
<Filename>Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.msa</Filename>
<Filename>Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.msa</Filename>
<Filename>Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.msa</Filename>
</MsaFiles>
<PackageHeaders>
<IncludePkgHeader ModuleType="BASE">Include/Base.h</IncludePkgHeader>