From 373fbc64167e080fbe334776877cfba116d62a2d Mon Sep 17 00:00:00 2001 From: Harry Liebel Date: Thu, 8 Aug 2013 08:55:02 +0000 Subject: Add Aarch64 support to EdkCompatibilityPkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel Signed-off-by: Olivier Martin Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14533 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Pei/PeiLib/AArch64/PerformancePrimitives.c | 48 ++++++++++++++++++++++ .../Library/Pei/PeiLib/Arm/PerformancePrimitives.c | 20 ++++----- .../Foundation/Library/Pei/PeiLib/PeiLib.inf | 7 +++- 3 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/AArch64/PerformancePrimitives.c (limited to 'EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib') diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/AArch64/PerformancePrimitives.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/AArch64/PerformancePrimitives.c new file mode 100644 index 0000000000..9f820650bb --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/AArch64/PerformancePrimitives.c @@ -0,0 +1,48 @@ +/** @file + + Copyright (c) 2013, ARM Ltd. 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: + + PerformancePrimitives.c + +Abstract: + + Support for Performance library + +--*/ + +#include "TianoCommon.h" + +EFI_STATUS +GetTimerValue ( + OUT UINT64 *TimerValue + ) +/*++ + +Routine Description: + + Get timer value. + +Arguments: + + TimerValue - Pointer to the returned timer value + +Returns: + + EFI_SUCCESS - Successfully got timer value + +--*/ +{ + // CPU does not have a timer for AArch64 ... + ASSERT (FALSE); + return EFI_SUCCESS; +} diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c index 6b8995e0dd..aeb08713a3 100755 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c @@ -1,13 +1,14 @@ -/*++ +/** @file + + Copyright (c) 2013, ARM Ltd. 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 -Copyright (c) 2005, 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. + 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: @@ -20,7 +21,6 @@ Abstract: --*/ #include "TianoCommon.h" -#include "CpuIA32.h" EFI_STATUS GetTimerValue ( diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf index 16abf04b55..6ac8794fc2 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf @@ -71,10 +71,13 @@ COMPONENT_TYPE = LIBRARY Ipf/Ia_64Gen.h Ipf/HwAccess.s Ipf/PeiServicePointer.c - + [sources.ARM] Arm/PerformancePrimitives.c - + +[sources.AArch64] + AArch64/PerformancePrimitives.c + [libraries.common] EdkGuidLib EfiCommonLib -- cgit v1.2.3