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 --- .../Library/CompilerStub/CompilerStubLib.inf | 6 +++ .../Library/Dxe/EfiDriverLib/EfiDriverLib.inf | 12 ++++-- .../Library/Dxe/Include/AArch64/ProcDep.h | 26 ++++++++++++ .../Library/EfiCommonLib/EfiCommonLib.inf | 12 +++++- .../Pei/PeiLib/AArch64/PerformancePrimitives.c | 48 ++++++++++++++++++++++ .../Library/Pei/PeiLib/Arm/PerformancePrimitives.c | 20 ++++----- .../Foundation/Library/Pei/PeiLib/PeiLib.inf | 7 +++- 7 files changed, 114 insertions(+), 17 deletions(-) create mode 100644 EdkCompatibilityPkg/Foundation/Library/Dxe/Include/AArch64/ProcDep.h create mode 100644 EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/AArch64/PerformancePrimitives.c (limited to 'EdkCompatibilityPkg/Foundation/Library') diff --git a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf index 4f15892447..afc72f1679 100644 --- a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf @@ -47,6 +47,9 @@ COMPONENT_TYPE = LIBRARY [sources.ARM] Dummy.c + +[sources.AARCH64] + Dummy.c [includes.common] $(EDK_SOURCE)/Foundation @@ -69,6 +72,9 @@ COMPONENT_TYPE = LIBRARY [libraries.ARM] CompilerIntrinsicsLib +[libraries.AArch64] + CompilerIntrinsicsLib + [nmake.common] [nmake.ia32,nmake.x64] diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf index de28353320..885e52cb20 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf @@ -58,6 +58,9 @@ COMPONENT_TYPE = LIBRARY [sources.ARM] Ebc/PerformancePrimitives.c +[sources.AArch64] + Ebc/PerformancePrimitives.c + [includes.common] $(EDK_SOURCE)/Foundation @@ -88,8 +91,11 @@ COMPONENT_TYPE = LIBRARY [libraries.ipf] CpuIA64Lib - -[libraries.ARM] - CompilerIntrinsicsLib + +[libraries.ARM] + CompilerIntrinsicsLib + +[libraries.AArch64] + CompilerIntrinsicsLib [nmake.common] diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/AArch64/ProcDep.h b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/AArch64/ProcDep.h new file mode 100644 index 0000000000..bd9b6cde1c --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/AArch64/ProcDep.h @@ -0,0 +1,26 @@ +/** @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: + + ProcDep.h + +Abstract: + + AArch64 specific Runtime Lib code. At this time there is none. + +--*/ + +#ifndef _PROC_DEP_H_ +#define _PROC_DEP_H_ + +#endif diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf index 722c9a9664..07b02b7656 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf @@ -74,6 +74,11 @@ COMPONENT_TYPE = LIBRARY EfiZeroMem.c Math.c +[sources.AArch64] + EfiCopyMem.c + EfiSetMem.c + EfiZeroMem.c + Math.c [includes.common] $(EDK_SOURCE)/Foundation @@ -94,7 +99,10 @@ COMPONENT_TYPE = LIBRARY [libraries.common] EdkFrameworkGuidLib -[libraries.ARM] - CompilerIntrinsicsLib +[libraries.ARM] + CompilerIntrinsicsLib + +[libraries.AArch64] + CompilerIntrinsicsLib [nmake.common] 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