]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. UINTN & INTN issue for EBC architecture:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Jun 2006 06:09:37 +0000 (06:09 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Jun 2006 06:09:37 +0000 (06:09 +0000)
The MAX_BIT of EBC will no longer be fixed to bit 63. It is defined as (1ULL << (sizeof (INTN) * 8 - 1)).
Make EdkModulePkg & MdePkg EBC compiler clean: treat all EFI_STATUS error code as variable.
2. PrintLib
Complete all missing ASSERT()s.
Fix “\n” & “%\n” issue thanks to the clarification of MWG 0.56d.
Adjust StatusString array to support EBC build.
3. BaseMemoryLib
Adjust ASSERT () & function header of ComparaMem, SetMemXX, ScanMemXX to synchronize with MWG 0.56d.
4.SmbusLib
Change Pec bit to bit 22 SmBusAddress to synchronize MWG 0.56d.
Add ASSERT()s to check if length is illegal for SmBusBlockWrite() & SmBusProcessBlock() since it is 6 bit now.
5. PerformanceLib
Rename “EdkDxePerformanceLib” & “EdkPeiPerformanceLib” to “DxePerformanceLib” & “PeiPerformanceLib” respectively.
Synchronize the function header of GetPerformanceMeasurement() with MWG 0.56d.
6. BasePeCoffLoaderLib.
Make PeCoffLoaderLoadImage () Assert() if ImageContext is NULL>
Make PeCoffLoaderLoadImage () return RETURN_INVALID_PARAMETER if the ImageAddress in ImageContext is 0.
Adjust some coding style.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@594 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Library/EdkDxePerformanceLib/DxePerformanceLib.c [deleted file]
EdkModulePkg/Library/EdkDxePerformanceLib/EdkDxePerformanceLib.mbd [deleted file]
EdkModulePkg/Library/EdkDxePerformanceLib/EdkDxePerformanceLib.msa [deleted file]
EdkModulePkg/Library/EdkDxePerformanceLib/build.xml [deleted file]
EdkModulePkg/Library/EdkPeiPerformanceLib/EdkPeiPerformanceLib.mbd [deleted file]
EdkModulePkg/Library/EdkPeiPerformanceLib/EdkPeiPerformanceLib.msa [deleted file]
EdkModulePkg/Library/EdkPeiPerformanceLib/PeiPerformanceLib.c [deleted file]
EdkModulePkg/Library/EdkPeiPerformanceLib/build.xml [deleted file]

diff --git a/EdkModulePkg/Library/EdkDxePerformanceLib/DxePerformanceLib.c b/EdkModulePkg/Library/EdkDxePerformanceLib/DxePerformanceLib.c
deleted file mode 100644 (file)
index 5e448c6..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  DxePerformanceLib.c\r
-\r
-Abstract:\r
-\r
-  Performance Library\r
-\r
---*/\r
-\r
-STATIC PERFORMANCE_PROTOCOL    *mPerformance = NULL;\r
-\r
-/**\r
-  The constructor function caches the pointer to Performance protocol.\r
-  \r
-  The constructor function locates Performance protocol from protocol database.\r
-  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. \r
-\r
-  @param  ImageHandle   The firmware allocated handle for the EFI image.\r
-  @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
-  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-PerformanceLibConstructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-{\r
-  EFI_STATUS            Status;\r
-\r
-  Status = gBS->LocateProtocol (&gPerformanceProtocolGuid, NULL, (VOID **) &mPerformance);\r
-  ASSERT_EFI_ERROR (Status);\r
-  ASSERT (mPerformance != NULL);\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Creates a record for the beginning of a performance measurement. \r
-  \r
-  Creates a record that contains the Handle, Token, and Module.\r
-  If TimeStamp is not zero, then TimeStamp is added to the record as the start time.\r
-  If TimeStamp is zero, then this function reads the current time stamp\r
-  and adds that time stamp value to the record as the start time.\r
-\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  TimeStamp               64-bit time stamp.\r
-\r
-  @retval RETURN_SUCCESS          The start of the measurement was recorded.\r
-  @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record the measurement.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-StartPerformanceMeasurement (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
-  IN UINT64       TimeStamp\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-  \r
-  Status = mPerformance->StartGauge (Handle, Token, Module, TimeStamp);\r
-\r
-  return (RETURN_STATUS) Status;\r
-}\r
-\r
-/**\r
-  Fills in the end time of a performance measurement. \r
-  \r
-  Looks up the record that matches Handle, Token, and Module.\r
-  If the record can not be found then return RETURN_NOT_FOUND.\r
-  If the record is found and TimeStamp is not zero,\r
-  then TimeStamp is added to the record as the end time.\r
-  If the record is found and TimeStamp is zero, then this function reads\r
-  the current time stamp and adds that time stamp value to the record as the end time.\r
-  If this function is called multiple times for the same record, then the end time is overwritten.\r
-\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  TimeStamp               64-bit time stamp.\r
-\r
-  @retval RETURN_SUCCESS          The end of  the measurement was recorded.\r
-  @retval RETURN_NOT_FOUND        The specified measurement record could not be found.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-EndPerformanceMeasurement (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
-  IN UINT64       TimeStamp\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  Status = mPerformance->EndGauge (Handle, Token, Module, TimeStamp);\r
-\r
-  return (RETURN_STATUS) Status;\r
-}\r
-\r
-/**\r
-  Retrieves a previously logged performance measurement. \r
-  \r
-  Looks up the record that matches Handle, Token, and Module.\r
-  If the record can not be found then return RETURN_NOT_FOUND.\r
-  If the record is found then the start of the measurement is returned in StartTimeStamp,\r
-  and the end of the measurement is returned in EndTimeStamp.\r
-\r
-  @param  LogEntryKey             The key for the previous performance measurement log entry.\r
-                                  If 0, then the first performance measurement log entry is retrieved.\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  StartTimeStamp          The 64-bit time stamp that was recorded when the measurement was started.\r
-  @param  EndTimeStamp            The 64-bit time stamp that was recorded when the measurement was ended.\r
-\r
-  @return The key for the current performance log entry.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-GetPerformanceMeasurement (\r
-  UINTN           LogEntryKey, \r
-  OUT CONST VOID  **Handle,\r
-  OUT CONST CHAR8 **Token,\r
-  OUT CONST CHAR8 **Module,\r
-  OUT UINT64      *StartTimeStamp,\r
-  OUT UINT64      *EndTimeStamp\r
-  )\r
-{\r
-  EFI_STATUS        Status;\r
-  GAUGE_DATA_ENTRY  *GaugeData;\r
-\r
-  ASSERT (Handle != NULL);\r
-  ASSERT (Token != NULL);\r
-  ASSERT (Module != NULL);\r
-  ASSERT (StartTimeStamp != NULL);\r
-  ASSERT (EndTimeStamp != NULL);\r
-\r
-  Status = mPerformance->GetGauge (LogEntryKey++, &GaugeData);\r
-  \r
-  //\r
-  // Make sure that LogEntryKey is a valid log entry key,\r
-  //\r
-  ASSERT (Status != EFI_INVALID_PARAMETER);\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    //\r
-    // The LogEntryKey is the last entry (equals to the total entry number).\r
-    //\r
-    return 0;\r
-  }\r
-\r
-  ASSERT (GaugeData != NULL);\r
-\r
-  *Handle         = (VOID *) (UINTN) GaugeData->Handle;\r
-  *Token          = GaugeData->Token;\r
-  *Module         = GaugeData->Module;\r
-  *StartTimeStamp = GaugeData->StartTimeStamp;\r
-  *EndTimeStamp   = GaugeData->EndTimeStamp;\r
-\r
-  return LogEntryKey;  \r
-}\r
-\r
-/**\r
-  Returns TRUE if the performance measurement macros are enabled. \r
-  \r
-  This function returns TRUE if the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
-  PcdPerformanceLibraryPropertyMask is set.  Otherwise FALSE is returned.\r
-\r
-  @retval TRUE                    The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
-                                  PcdPerformanceLibraryPropertyMask is set.\r
-  @retval FALSE                   The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
-                                  PcdPerformanceLibraryPropertyMask is clear.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-PerformanceMeasurementEnabled (\r
-  VOID\r
-  )\r
-{\r
-  return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
-}\r
diff --git a/EdkModulePkg/Library/EdkDxePerformanceLib/EdkDxePerformanceLib.mbd b/EdkModulePkg/Library/EdkDxePerformanceLib/EdkDxePerformanceLib.mbd
deleted file mode 100644 (file)
index 7bd0e10..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
--->\r
-<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">\r
-  <MbdLibHeader>\r
-    <BaseName>EdkDxePerformanceLib</BaseName>\r
-    <Guid>8B8B4CCC-65FC-41a5-8067-308B8E42CCF2</Guid>\r
-    <Version>EDK_RELEASE_VERSION        0x00020000</Version>\r
-    <Description>FIX ME!</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
-    <License>\r
-      All rights reserved. This program and the accompanying materials\r
-      are licensed and made available under the terms and conditions of the BSD License\r
-      which accompanies this distribution.  The full text of the license may be found at\r
-      http://opensource.org/licenses/bsd-license.php\r
-      THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-      WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-    </License>\r
-    <Created>2006-04-04 11:11</Created>\r
-  </MbdLibHeader>\r
-</LibraryModuleBuildDescription>\r
diff --git a/EdkModulePkg/Library/EdkDxePerformanceLib/EdkDxePerformanceLib.msa b/EdkModulePkg/Library/EdkDxePerformanceLib/EdkDxePerformanceLib.msa
deleted file mode 100644 (file)
index a0dd07c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
--->\r
-<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">\r
-  <MsaLibHeader>\r
-    <BaseName>EdkDxePerformanceLib</BaseName>\r
-    <ModuleType>DXE_DRIVER</ModuleType>\r
-    <ComponentType>LIBRARY</ComponentType>\r
-    <Guid>8B8B4CCC-65FC-41a5-8067-308B8E42CCF2</Guid>\r
-    <Version>EDK_RELEASE_VERSION        0x00020000</Version>\r
-    <Abstract>Memory-only library functions with no library constructor/destructor</Abstract>\r
-    <Description>FIX ME!</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
-    <License>\r
-      All rights reserved. This program and the accompanying materials\r
-      are licensed and made available under the terms and conditions of the BSD License\r
-      which accompanies this distribution.  The full text of the license may be found at\r
-      http://opensource.org/licenses/bsd-license.php\r
-      THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-      WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-    </License>\r
-    <Created>2006-04-04 11:11</Created>\r
-    <Specification>EFI_SPECIFICATION_VERSION    0x00000000</Specification>\r
-  </MsaLibHeader>\r
-  <LibraryClassDefinitions>\r
-    <LibraryClass Usage="ALWAYS_PRODUCED">PerformanceLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">TimerLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">PcdLib</LibraryClass>\r
-  </LibraryClassDefinitions>\r
-  <SourceFiles>\r
-    <Filename>DxePerformanceLib.c</Filename>\r
-  </SourceFiles>\r
-  <Includes>\r
-    <PackageName>MdePkg</PackageName>\r
-    <PackageName>EdkModulePkg</PackageName>\r
-  </Includes>\r
-  <Protocols>\r
-    <Protocol Usage="ALWAYS_CONSUMED">Performance</Protocol>\r
-  </Protocols>\r
-  <Externs>\r
-    <Extern>\r
-      <Constructor>PerformanceLibConstructor</Constructor>\r
-    </Extern>\r
-  </Externs>\r
-  <PcdCoded>\r
-    <PcdEntry PcdItemType="FIXED_AT_BUILD">\r
-      <C_Name>PcdPerformanceLibraryPropertyMask</C_Name>\r
-    </PcdEntry>\r
-  </PcdCoded>\r
-</LibraryModuleSurfaceArea>\r
diff --git a/EdkModulePkg/Library/EdkDxePerformanceLib/build.xml b/EdkModulePkg/Library/EdkDxePerformanceLib/build.xml
deleted file mode 100644 (file)
index 3165132..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at  \r
-http://opensource.org/licenses/bsd-license.php \r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->\r
-<project basedir="." default="EdkDxePerformanceLib"><!--Apply external ANT tasks-->\r
-   <taskdef resource="GenBuild.tasks"/>\r
-   <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
-   <property environment="env"/>\r
-   <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>\r
-   <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->\r
-   <property name="MODULE_RELATIVE_PATH" value="Library/EdkDxePerformanceLib"/>\r
-   <property name="MODULE_DIR" value="${PACKAGE_DIR}/${MODULE_RELATIVE_PATH}"/>\r
-   <property name="COMMON_FILE" value="${WORKSPACE_DIR}/Tools/Conf/Common.xml"/>\r
-   <target name="EdkDxePerformanceLib">\r
-      <GenBuild baseName="EdkDxePerformanceLib" mbdFilename="${MODULE_DIR}/EdkDxePerformanceLib.mbd" msaFilename="${MODULE_DIR}/EdkDxePerformanceLib.msa"/>\r
-   </target>\r
-   <target depends="EdkDxePerformanceLib_clean" name="clean"/>\r
-   <target depends="EdkDxePerformanceLib_cleanall" name="cleanall"/>\r
-   <target name="EdkDxePerformanceLib_clean">\r
-      <OutputDirSetup baseName="EdkDxePerformanceLib" mbdFilename="${MODULE_DIR}/EdkDxePerformanceLib.mbd" msaFilename="${MODULE_DIR}/EdkDxePerformanceLib.msa"/>\r
-      <if>\r
-         <available file="${DEST_DIR_OUTPUT}/EdkDxePerformanceLib_build.xml"/>\r
-         <then>\r
-            <ant antfile="${DEST_DIR_OUTPUT}/EdkDxePerformanceLib_build.xml" target="clean"/>\r
-         </then>\r
-      </if>\r
-      <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>\r
-   </target>\r
-   <target name="EdkDxePerformanceLib_cleanall">\r
-      <OutputDirSetup baseName="EdkDxePerformanceLib" mbdFilename="${MODULE_DIR}/EdkDxePerformanceLib.mbd" msaFilename="${MODULE_DIR}/EdkDxePerformanceLib.msa"/>\r
-      <if>\r
-         <available file="${DEST_DIR_OUTPUT}/EdkDxePerformanceLib_build.xml"/>\r
-         <then>\r
-            <ant antfile="${DEST_DIR_OUTPUT}/EdkDxePerformanceLib_build.xml" target="cleanall"/>\r
-         </then>\r
-      </if>\r
-      <delete dir="${DEST_DIR_OUTPUT}"/>\r
-      <delete dir="${DEST_DIR_DEBUG}"/>\r
-      <delete>\r
-         <fileset dir="${BIN_DIR}" includes="**EdkDxePerformanceLib*"/>\r
-      </delete>\r
-   </target>\r
-</project>
\ No newline at end of file
diff --git a/EdkModulePkg/Library/EdkPeiPerformanceLib/EdkPeiPerformanceLib.mbd b/EdkModulePkg/Library/EdkPeiPerformanceLib/EdkPeiPerformanceLib.mbd
deleted file mode 100644 (file)
index 103f7c4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
--->\r
-<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">\r
-  <MbdLibHeader>\r
-    <BaseName>EdkPeiPerformanceLib</BaseName>\r
-    <Guid>F72DE735-B24F-4ef6-897F-70A85D01A047</Guid>\r
-    <Version>EDK_RELEASE_VERSION        0x00020000</Version>\r
-    <Description>FIX ME!</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
-    <License>\r
-      All rights reserved. This program and the accompanying materials\r
-      are licensed and made available under the terms and conditions of the BSD License\r
-      which accompanies this distribution.  The full text of the license may be found at\r
-      http://opensource.org/licenses/bsd-license.php\r
-      THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-      WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-    </License>\r
-    <Created>2006-04-04 11:12</Created>\r
-  </MbdLibHeader>\r
-</LibraryModuleBuildDescription>\r
diff --git a/EdkModulePkg/Library/EdkPeiPerformanceLib/EdkPeiPerformanceLib.msa b/EdkModulePkg/Library/EdkPeiPerformanceLib/EdkPeiPerformanceLib.msa
deleted file mode 100644 (file)
index 9bf43a3..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
--->\r
-<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">\r
-  <MsaLibHeader>\r
-    <BaseName>EdkPeiPerformanceLib</BaseName>\r
-    <ModuleType>PEIM</ModuleType>\r
-    <ComponentType>LIBRARY</ComponentType>\r
-    <Guid>F72DE735-B24F-4ef6-897F-70A85D01A047</Guid>\r
-    <Version>EDK_RELEASE_VERSION        0x00020000</Version>\r
-    <Abstract>Memory-only library functions with no library constructor/destructor</Abstract>\r
-    <Description>FIX ME!</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
-    <License>\r
-      All rights reserved. This program and the accompanying materials\r
-      are licensed and made available under the terms and conditions of the BSD License\r
-      which accompanies this distribution.  The full text of the license may be found at\r
-      http://opensource.org/licenses/bsd-license.php\r
-      THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-      WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-    </License>\r
-    <Created>2006-04-04 11:12</Created>\r
-    <Specification>EFI_SPECIFICATION_VERSION    0x00000000</Specification>\r
-  </MsaLibHeader>\r
-  <LibraryClassDefinitions>\r
-    <LibraryClass Usage="ALWAYS_PRODUCED">PerformanceLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">HobLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">TimerLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">PcdLib</LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>\r
-  </LibraryClassDefinitions>\r
-  <SourceFiles>\r
-    <Filename>PeiPerformanceLib.c</Filename>\r
-  </SourceFiles>\r
-  <Includes>\r
-    <PackageName>MdePkg</PackageName>\r
-    <PackageName>EdkModulePkg</PackageName>\r
-  </Includes>\r
-  <Guids>\r
-    <GuidEntry Usage="SOMETIMES_CONSUMED">\r
-      <C_Name>PeiPerformanceHob</C_Name>\r
-    </GuidEntry>\r
-  </Guids>\r
-  <PcdCoded>\r
-    <PcdEntry PcdItemType="FIXED_AT_BUILD">\r
-      <C_Name>PcdPerformanceLibraryPropertyMask</C_Name>\r
-    </PcdEntry>\r
-  </PcdCoded>\r
-</LibraryModuleSurfaceArea>\r
diff --git a/EdkModulePkg/Library/EdkPeiPerformanceLib/PeiPerformanceLib.c b/EdkModulePkg/Library/EdkPeiPerformanceLib/PeiPerformanceLib.c
deleted file mode 100644 (file)
index 89e2dd3..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  PeiPerformanceLib.c\r
-\r
-Abstract:\r
-\r
-  Performance Library\r
-\r
---*/\r
-\r
-/**\r
-  Gets PEI the GUID HOB for PEI performance.\r
-\r
-  This internal function searches for the GUID HOB for PEI performance.\r
-  If that GUID HOB is not found, it will build a new one.\r
-  It returns the data area of that GUID HOB to record performance log.    \r
-\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-\r
-  @retval The index of log entry in the array.\r
-\r
-**/\r
-PEI_PERFORMANCE_LOG_HEADER *\r
-InternalGetPerformanceHobLog (\r
-  VOID\r
-  )\r
-{\r
-  EFI_HOB_GUID_TYPE           *GuidHob;\r
-  PEI_PERFORMANCE_LOG_HEADER  *PeiPerformanceLog;\r
-  UINTN                       PeiPerformanceLogSize;\r
-\r
-  GuidHob = GetFirstGuidHob (&gPeiPerformanceHobGuid);\r
-  \r
-  if (GuidHob != NULL) {\r
-    //\r
-    // PEI Performance HOB was found, then return the existing one.\r
-    //\r
-    PeiPerformanceLog = GET_GUID_HOB_DATA (GuidHob);\r
-  } else {\r
-    //\r
-    // PEI Performance HOB was not found, then build one.\r
-    //\r
-    PeiPerformanceLogSize = sizeof (PEI_PERFORMANCE_LOG_HEADER) + \r
-                            sizeof (PEI_PERFORMANCE_LOG_ENTRY) * MAX_PEI_PERFORMANCE_LOG_ENTRIES;\r
-    PeiPerformanceLog     = BuildGuidHob (&gPeiPerformanceHobGuid, PeiPerformanceLogSize);\r
-    PeiPerformanceLog     = ZeroMem (PeiPerformanceLog, PeiPerformanceLogSize);\r
-  }\r
-\r
-  return PeiPerformanceLog;\r
-}\r
-\r
-/**\r
-  Searches in the log array with keyword Handle, Token and Module.\r
-\r
-  This internal function searches for the log entry in the log array.\r
-  If there is an entry that exactly matches the given key word triple\r
-  and its end time stamp is zero, then the index of that log entry is returned;\r
-  otherwise, the the number of log entries in the array is returned.  \r
-\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-\r
-  @retval The index of log entry in the array.\r
-\r
-**/\r
-UINT32\r
-InternalSearchForLogEntry (\r
-  IN PEI_PERFORMANCE_LOG_HEADER *PeiPerformanceLog,\r
-  IN CONST VOID                 *Handle,  OPTIONAL\r
-  IN CONST CHAR8                *Token,   OPTIONAL\r
-  IN CONST CHAR8                *Module   OPTIONAL\r
-  )\r
-{\r
-  UINT32                    Index;\r
-  UINT32                    NumberOfEntries;\r
-  PEI_PERFORMANCE_LOG_ENTRY *LogEntryArray;\r
-  \r
-\r
-  if (Token == NULL) {\r
-    Token = "";\r
-  }\r
-  if (Module == NULL) {\r
-    Module = "";\r
-  }\r
-  NumberOfEntries = PeiPerformanceLog->NumberOfEntries;\r
-  LogEntryArray   = (PEI_PERFORMANCE_LOG_ENTRY *) (PeiPerformanceLog + 1);\r
-  \r
-  for (Index = 0; Index < NumberOfEntries; Index++) {\r
-    if ((LogEntryArray[Index].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) Handle) &&\r
-         AsciiStrnCmp (LogEntryArray[Index].Token, Token, PEI_PERFORMANCE_STRING_LENGTH) == 0 &&\r
-         AsciiStrnCmp (LogEntryArray[Index].Module, Module, PEI_PERFORMANCE_STRING_LENGTH) == 0 &&\r
-         LogEntryArray[Index].EndTimeStamp == 0\r
-       ) {\r
-      break;\r
-    }\r
-  }\r
-  return Index;\r
-} \r
-\r
-/**\r
-  Creates a record for the beginning of a performance measurement. \r
-  \r
-  Creates a record that contains the Handle, Token, and Module.\r
-  If TimeStamp is not zero, then TimeStamp is added to the record as the start time.\r
-  If TimeStamp is zero, then this function reads the current time stamp\r
-  and adds that time stamp value to the record as the start time.\r
-\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  TimeStamp               64-bit time stamp.\r
-\r
-  @retval RETURN_SUCCESS          The start of the measurement was recorded.\r
-  @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record the measurement.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-StartPerformanceMeasurement (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
-  IN UINT64       TimeStamp\r
-  )\r
-{\r
-  PEI_PERFORMANCE_LOG_HEADER  *PeiPerformanceLog;\r
-  PEI_PERFORMANCE_LOG_ENTRY   *LogEntryArray;\r
-  UINT32                      Index;\r
-\r
-  PeiPerformanceLog = InternalGetPerformanceHobLog ();\r
-  \r
-  if (PeiPerformanceLog->NumberOfEntries >= MAX_PEI_PERFORMANCE_LOG_ENTRIES) {\r
-    return RETURN_OUT_OF_RESOURCES;\r
-  }\r
-  Index                       = PeiPerformanceLog->NumberOfEntries++;\r
-  LogEntryArray               = (PEI_PERFORMANCE_LOG_ENTRY *) (PeiPerformanceLog + 1);        \r
-  LogEntryArray[Index].Handle = (EFI_PHYSICAL_ADDRESS) (UINTN) Handle;\r
-\r
-  if (Token != NULL) {\r
-    AsciiStrnCpy (LogEntryArray[Index].Token, Token, PEI_PERFORMANCE_STRING_LENGTH);\r
-  }\r
-  if (Module != NULL) {\r
-    AsciiStrnCpy (LogEntryArray[Index].Module, Module, PEI_PERFORMANCE_STRING_LENGTH);\r
-  }\r
-\r
-  if (TimeStamp == 0) {\r
-    TimeStamp = GetPerformanceCounter ();\r
-  }\r
-  LogEntryArray[Index].StartTimeStamp = TimeStamp;\r
-\r
-  return RETURN_SUCCESS;\r
-}\r
-\r
-/**\r
-  Fills in the end time of a performance measurement. \r
-  \r
-  Looks up the record that matches Handle, Token, and Module.\r
-  If the record can not be found then return RETURN_NOT_FOUND.\r
-  If the record is found and TimeStamp is not zero,\r
-  then TimeStamp is added to the record as the end time.\r
-  If the record is found and TimeStamp is zero, then this function reads\r
-  the current time stamp and adds that time stamp value to the record as the end time.\r
-  If this function is called multiple times for the same record, then the end time is overwritten.\r
-\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  TimeStamp               64-bit time stamp.\r
-\r
-  @retval RETURN_SUCCESS          The end of  the measurement was recorded.\r
-  @retval RETURN_NOT_FOUND        The specified measurement record could not be found.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-EndPerformanceMeasurement (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
-  IN UINT64       TimeStamp\r
-  )\r
-{\r
-  PEI_PERFORMANCE_LOG_HEADER  *PeiPerformanceLog;\r
-  PEI_PERFORMANCE_LOG_ENTRY   *LogEntryArray;\r
-  UINT32                      Index;\r
-\r
-  if (TimeStamp == 0) {\r
-    TimeStamp = GetPerformanceCounter ();\r
-  }\r
-  \r
-  PeiPerformanceLog = InternalGetPerformanceHobLog ();\r
-  Index             = InternalSearchForLogEntry (PeiPerformanceLog, Handle, Token, Module);\r
-  if (Index >= PeiPerformanceLog->NumberOfEntries) {\r
-    return RETURN_NOT_FOUND;\r
-  }\r
-  LogEntryArray     = (PEI_PERFORMANCE_LOG_ENTRY *) (PeiPerformanceLog + 1);\r
-  LogEntryArray[Index].EndTimeStamp = TimeStamp;\r
-\r
-  return RETURN_SUCCESS;\r
-}\r
-\r
-/**\r
-  Retrieves a previously logged performance measurement. \r
-  \r
-  Looks up the record that matches Handle, Token, and Module.\r
-  If the record can not be found then return RETURN_NOT_FOUND.\r
-  If the record is found then the start of the measurement is returned in StartTimeStamp,\r
-  and the end of the measurement is returned in EndTimeStamp.\r
-\r
-  @param  LogEntryKey             The key for the previous performance measurement log entry.\r
-                                  If 0, then the first performance measurement log entry is retrieved.\r
-  @param  Handle                  Pointer to environment specific context used\r
-                                  to identify the component being measured.\r
-  @param  Token                   Pointer to a Null-terminated ASCII string\r
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  StartTimeStamp          The 64-bit time stamp that was recorded when the measurement was started.\r
-  @param  EndTimeStamp            The 64-bit time stamp that was recorded when the measurement was ended.\r
-\r
-  @return The key for the current performance log entry.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-GetPerformanceMeasurement (\r
-  UINTN           LogEntryKey, \r
-  OUT CONST VOID  **Handle,\r
-  OUT CONST CHAR8 **Token,\r
-  OUT CONST CHAR8 **Module,\r
-  OUT UINT64      *StartTimeStamp,\r
-  OUT UINT64      *EndTimeStamp\r
-  )\r
-{\r
-  PEI_PERFORMANCE_LOG_HEADER  *PeiPerformanceLog;\r
-  PEI_PERFORMANCE_LOG_ENTRY   *CurrentLogEntry;\r
-  PEI_PERFORMANCE_LOG_ENTRY   *LogEntryArray;\r
-  UINTN                       NumberOfEntries;\r
-\r
-  ASSERT (Handle != NULL);\r
-  ASSERT (Token != NULL);\r
-  ASSERT (Module != NULL);\r
-  ASSERT (StartTimeStamp != NULL);\r
-  ASSERT (EndTimeStamp != NULL);\r
-  \r
-  PeiPerformanceLog = InternalGetPerformanceHobLog ();\r
\r
-  NumberOfEntries   = (UINTN) (PeiPerformanceLog->NumberOfEntries);\r
-  LogEntryArray     = (PEI_PERFORMANCE_LOG_ENTRY *) (PeiPerformanceLog + 1);\r
-  //\r
-  // Make sure that LogEntryKey is a valid log entry key.\r
-  //\r
-  ASSERT (LogEntryKey <= NumberOfEntries);\r
-  \r
-  if (LogEntryKey == NumberOfEntries) {\r
-    return 0;\r
-  }\r
-\r
-  CurrentLogEntry = &(LogEntryArray[LogEntryKey++]);\r
-\r
-  *Handle         = (VOID *) (UINTN) (CurrentLogEntry->Handle);\r
-  *Token          = CurrentLogEntry->Token;\r
-  *Module         = CurrentLogEntry->Module;\r
-  *StartTimeStamp = CurrentLogEntry->StartTimeStamp;\r
-  *EndTimeStamp   = CurrentLogEntry->EndTimeStamp;\r
-\r
-  return LogEntryKey;  \r
-}\r
-\r
-/**\r
-  Returns TRUE if the performance measurement macros are enabled. \r
-  \r
-  This function returns TRUE if the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
-  PcdPerformanceLibraryPropertyMask is set.  Otherwise FALSE is returned.\r
-\r
-  @retval TRUE                    The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
-                                  PcdPerformanceLibraryPropertyMask is set.\r
-  @retval FALSE                   The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
-                                  PcdPerformanceLibraryPropertyMask is clear.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-PerformanceMeasurementEnabled (\r
-  VOID\r
-  )\r
-{\r
-  return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
-}\r
diff --git a/EdkModulePkg/Library/EdkPeiPerformanceLib/build.xml b/EdkModulePkg/Library/EdkPeiPerformanceLib/build.xml
deleted file mode 100644 (file)
index e269b31..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at  \r
-http://opensource.org/licenses/bsd-license.php \r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->\r
-<project basedir="." default="EdkPeiPerformanceLib"><!--Apply external ANT tasks-->\r
-   <taskdef resource="GenBuild.tasks"/>\r
-   <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
-   <property environment="env"/>\r
-   <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>\r
-   <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->\r
-   <property name="MODULE_RELATIVE_PATH" value="Library/EdkPeiPerformanceLib"/>\r
-   <property name="MODULE_DIR" value="${PACKAGE_DIR}/${MODULE_RELATIVE_PATH}"/>\r
-   <property name="COMMON_FILE" value="${WORKSPACE_DIR}/Tools/Conf/Common.xml"/>\r
-   <target name="EdkPeiPerformanceLib">\r
-      <GenBuild baseName="EdkPeiPerformanceLib" mbdFilename="${MODULE_DIR}/EdkPeiPerformanceLib.mbd" msaFilename="${MODULE_DIR}/EdkPeiPerformanceLib.msa"/>\r
-   </target>\r
-   <target depends="EdkPeiPerformanceLib_clean" name="clean"/>\r
-   <target depends="EdkPeiPerformanceLib_cleanall" name="cleanall"/>\r
-   <target name="EdkPeiPerformanceLib_clean">\r
-      <OutputDirSetup baseName="EdkPeiPerformanceLib" mbdFilename="${MODULE_DIR}/EdkPeiPerformanceLib.mbd" msaFilename="${MODULE_DIR}/EdkPeiPerformanceLib.msa"/>\r
-      <if>\r
-         <available file="${DEST_DIR_OUTPUT}/EdkPeiPerformanceLib_build.xml"/>\r
-         <then>\r
-            <ant antfile="${DEST_DIR_OUTPUT}/EdkPeiPerformanceLib_build.xml" target="clean"/>\r
-         </then>\r
-      </if>\r
-      <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>\r
-   </target>\r
-   <target name="EdkPeiPerformanceLib_cleanall">\r
-      <OutputDirSetup baseName="EdkPeiPerformanceLib" mbdFilename="${MODULE_DIR}/EdkPeiPerformanceLib.mbd" msaFilename="${MODULE_DIR}/EdkPeiPerformanceLib.msa"/>\r
-      <if>\r
-         <available file="${DEST_DIR_OUTPUT}/EdkPeiPerformanceLib_build.xml"/>\r
-         <then>\r
-            <ant antfile="${DEST_DIR_OUTPUT}/EdkPeiPerformanceLib_build.xml" target="cleanall"/>\r
-         </then>\r
-      </if>\r
-      <delete dir="${DEST_DIR_OUTPUT}"/>\r
-      <delete dir="${DEST_DIR_DEBUG}"/>\r
-      <delete>\r
-         <fileset dir="${BIN_DIR}" includes="**EdkPeiPerformanceLib*"/>\r
-      </delete>\r
-   </target>\r
-</project>
\ No newline at end of file