From c14164f4f31eebf43bd92782112b9d4479a3a770 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Fri, 9 Jul 2010 00:07:30 +0000 Subject: Ported more of EdkCompatabilityPkg to ARM to support SCT port. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10641 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/Dxe/EfiDriverLib/EfiDriverLib.inf | 5 +++ .../Foundation/Library/Dxe/Include/Arm/CpuFuncs.h | 24 +++++++++++ .../Foundation/Library/Dxe/Include/Arm/ProcDep.h | 26 ++++++++++++ .../Foundation/Library/Dxe/Include/LinkedList.h | 2 + .../Library/EfiCommonLib/EfiCommonLib.inf | 7 ++++ .../Library/EfiCommonLib/ReportStatusCode.c | 6 ++- .../Library/Pei/PeiLib/Arm/PerformancePrimitives.c | 48 ++++++++++++++++++++++ .../Foundation/Library/Pei/PeiLib/PeiLib.inf | 4 +- 8 files changed, 120 insertions(+), 2 deletions(-) create mode 100755 EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/CpuFuncs.h create mode 100755 EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/ProcDep.h create mode 100755 EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c (limited to 'EdkCompatibilityPkg') diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf index 21140b6cb0..a7a3c65c36 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf @@ -55,6 +55,10 @@ COMPONENT_TYPE = LIBRARY [sources.ebc] Ebc/PerformancePrimitives.c +[sources.ARM] + Ebc/PerformancePrimitives.c + + [includes.common] $(EDK_SOURCE)/Foundation $(EDK_SOURCE)/Foundation/Framework @@ -84,5 +88,6 @@ COMPONENT_TYPE = LIBRARY [libraries.ipf] CpuIA64Lib + [nmake.common] diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/CpuFuncs.h b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/CpuFuncs.h new file mode 100755 index 0000000000..e030a7e73d --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/CpuFuncs.h @@ -0,0 +1,24 @@ +/*++ + +Copyright (c) 2004 - 2006, 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. + +Module Name: + + CpuFuncs.h + +Abstract: + +--*/ + +#ifndef _CPU_FUNCS_H_ +#define _CPU_FUNCS_H_ + + +#endif diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/ProcDep.h b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/ProcDep.h new file mode 100755 index 0000000000..70f33754af --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/Arm/ProcDep.h @@ -0,0 +1,26 @@ +/*++ + +Copyright (c) 2004, 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. + +Module Name: + + ProcDep.h + +Abstract: + + IA-32 specific Runtime Lib code. At this time there is non. + IPF has different code due to extra API requirements. + +--*/ + +#ifndef _PROC_DEP_H_ +#define _PROC_DEP_H_ + +#endif diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/LinkedList.h b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/LinkedList.h index ba8e2929bc..debaf30e79 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/LinkedList.h +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/LinkedList.h @@ -27,6 +27,7 @@ Abstract: #ifndef _LINKED_LIST_H_ #define _LINKED_LIST_H_ +#ifndef _SHELL_LINKED_LIST_H_ typedef struct _EFI_LIST_ENTRY { struct _EFI_LIST_ENTRY *ForwardLink; @@ -308,3 +309,4 @@ Returns: ; #endif +#endif diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf index aa93c56b3f..934954bbc7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf @@ -68,6 +68,13 @@ COMPONENT_TYPE = LIBRARY # X64/EfiZeroMem.asm Math.c +[sources.ARM] + EfiCopyMem.c + EfiSetMem.c + EfiZeroMem.c + Math.c + + [includes.common] $(EDK_SOURCE)/Foundation $(EDK_SOURCE)/Foundation/Framework diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/ReportStatusCode.c b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/ReportStatusCode.c index bf142162ad..4f79ecd173 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/ReportStatusCode.c +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/ReportStatusCode.c @@ -332,8 +332,12 @@ Returns: // The first 12 * UINTN bytes of the string are really an // arguement stack to support varargs on the Format string. // +#ifdef EFIARM + // It is not legal C code to case VA_LIST to a pointer. VA_LIST can + // be a structure. +#else *Marker = (VA_LIST) (DebugInfo + 1); *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12); - +#endif return TRUE; } diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c new file mode 100755 index 0000000000..6b8995e0dd --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Arm/PerformancePrimitives.c @@ -0,0 +1,48 @@ +/*++ + +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. + +Module Name: + + PerformancePrimitives.c + +Abstract: + + Support for Performance library + +--*/ + +#include "TianoCommon.h" +#include "CpuIA32.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 ARM.... + ASSERT (FALSE); + return EFI_SUCCESS; +} diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf index 7724415a14..16abf04b55 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf @@ -72,7 +72,9 @@ COMPONENT_TYPE = LIBRARY Ipf/HwAccess.s Ipf/PeiServicePointer.c - +[sources.ARM] + Arm/PerformancePrimitives.c + [libraries.common] EdkGuidLib EfiCommonLib -- cgit v1.2.3