summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-02-02 05:36:42 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-02-02 05:36:42 +0000
commit4faa50287ee70f2140ab81efbacfb0bb0ac891b8 (patch)
tree479fec57d75eab76ff727a8517287a17cc82e236 /MdePkg
parent3401c092e4e98b97bcf86d9aa2500d5ee7b3b8cf (diff)
downloadedk2-platforms-4faa50287ee70f2140ab81efbacfb0bb0ac891b8.tar.xz
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
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.msa43
-rw-r--r--MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c (renamed from MdePkg/Library/BaseTimerLibLocalApic/Ebc/EbcTimerLib.c)20
-rw-r--r--MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c (renamed from MdePkg/Library/BaseTimerLibLocalApic/Ipf/IpfTimerLib.c)8
-rw-r--r--MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.msa (renamed from MdePkg/Library/BaseTimerLibLocalApic/BaseTimerLibLocalApic.msa)24
-rw-r--r--MdePkg/Library/SecPeiDxeTimerLibCpu/x86TimerLib.c (renamed from MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c)2
-rw-r--r--MdePkg/MdePkg.fpd24
-rw-r--r--MdePkg/MdePkg.spd3
7 files changed, 72 insertions, 52 deletions
diff --git a/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.msa b/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.msa
new file mode 100644
index 0000000000..65ea51dfcf
--- /dev/null
+++ b/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.msa
@@ -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> \ No newline at end of file
diff --git a/MdePkg/Library/BaseTimerLibLocalApic/Ebc/EbcTimerLib.c b/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
index 416a44f4ea..33a9736a24 100644
--- a/MdePkg/Library/BaseTimerLibLocalApic/Ebc/EbcTimerLib.c
+++ b/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
@@ -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;
}
diff --git a/MdePkg/Library/BaseTimerLibLocalApic/Ipf/IpfTimerLib.c b/MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c
index 65b58bc549..9049fef997 100644
--- a/MdePkg/Library/BaseTimerLibLocalApic/Ipf/IpfTimerLib.c
+++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c
@@ -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
diff --git a/MdePkg/Library/BaseTimerLibLocalApic/BaseTimerLibLocalApic.msa b/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.msa
index 539021dd93..4c152caae6 100644
--- a/MdePkg/Library/BaseTimerLibLocalApic/BaseTimerLibLocalApic.msa
+++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.msa
@@ -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"/>
diff --git a/MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c b/MdePkg/Library/SecPeiDxeTimerLibCpu/x86TimerLib.c
index 235fe7be6d..7467bc5e4d 100644
--- a/MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c
+++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/x86TimerLib.c
@@ -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
diff --git a/MdePkg/MdePkg.fpd b/MdePkg/MdePkg.fpd
index 76c6630c1c..cf1083955b 100644
--- a/MdePkg/MdePkg.fpd
+++ b/MdePkg/MdePkg.fpd
@@ -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">
diff --git a/MdePkg/MdePkg.spd b/MdePkg/MdePkg.spd
index 6bfbdb3b2d..a70622b1b4 100644
--- a/MdePkg/MdePkg.spd
+++ b/MdePkg/MdePkg.spd
@@ -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>