summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Library
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 20:13:32 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 20:13:32 +0000
commite314d564db4d52a9e904f6049dad7fc5dece5cb4 (patch)
treee135daade07ab9b9fba84ad088d4c115c75b9f41 /ArmPlatformPkg/Library
parent315649cda206bd439a09c02e82b683ab754df77a (diff)
downloadedk2-platforms-e314d564db4d52a9e904f6049dad7fc5dece5cb4.tar.xz
ArmPlatformPkg: Introduced 'ArmPlatformSecLib'
The function only used in Secure Firmware used to be mixed with the Non-Secure/Normal functions in ArmPlatformLib. When the Secure Firmware was not required for some platforms (eg: BeagleBoard), these functions were empty functions. This new interface has been created to clean the ArmPlatformLib interface between the SEC and PEI phases. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13260 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Library')
-rw-r--r--ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullBoot.S (renamed from ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullBoot.S)6
-rw-r--r--ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullBoot.asm (renamed from ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullBoot.asm)8
-rw-r--r--ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.c (renamed from ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.c)14
-rw-r--r--ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.inf (renamed from ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.inf)5
4 files changed, 19 insertions, 14 deletions
diff --git a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullBoot.S b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullBoot.S
index 83c9e30e94..a00fac4f81 100644
--- a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullBoot.S
+++ b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullBoot.S
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2011, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2012, ARM Limited. All rights reserved.
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -18,7 +18,7 @@
.align 3
GCC_ASM_EXPORT(ArmPlatformSecBootAction)
-GCC_ASM_EXPORT(ArmPlatformInitializeBootMemory)
+GCC_ASM_EXPORT(ArmPlatformSecBootMemoryInit)
/**
Call at the beginning of the platform boot up
@@ -42,6 +42,6 @@ ASM_PFX(ArmPlatformSecBootAction):
pointer is not used (probably required to use assembly language)
**/
-ASM_PFX(ArmPlatformInitializeBootMemory):
+ASM_PFX(ArmPlatformSecBootMemoryInit):
// The SMC does not need to be initialized for RTSM
bx lr
diff --git a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullBoot.asm b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullBoot.asm
index d99b86feba..0cd5e37c70 100644
--- a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullBoot.asm
+++ b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullBoot.asm
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2011, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2012, ARM Limited. All rights reserved.
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -15,10 +15,10 @@
#include <AutoGen.h>
EXPORT ArmPlatformSecBootAction
- EXPORT ArmPlatformInitializeBootMemory
+ EXPORT ArmPlatformSecBootMemoryInit
PRESERVE8
- AREA ArmPlatformLibBoot, CODE, READONLY
+ AREA ArmPlatformSecLibBoot, CODE, READONLY
/**
Call at the beginning of the platform boot up
@@ -42,6 +42,6 @@ ArmPlatformSecBootAction
pointer is not used (probably required to use assembly language)
**/
-ArmPlatformInitializeBootMemory
+ArmPlatformSecBootMemoryInit
// The SMC does not need to be initialized for RTSM
bx lr
diff --git a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.c b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.c
index 9622a32291..c548d8b3f9 100644
--- a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.c
+++ b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -24,7 +24,7 @@
**/
VOID
-ArmPlatformTrustzoneInit (
+ArmPlatformSecTrustzoneInit (
IN UINTN MpId
)
{
@@ -43,12 +43,18 @@ ArmPlatformTrustzoneInit (
For example, some L2x0 requires to be initialized in Secure World
**/
-VOID
+RETURN_STATUS
ArmPlatformSecInitialize (
- VOID
+ IN UINTN MpId
)
{
+ // If it is not the primary core then there is nothing to do
+ if (!IS_PRIMARY_CORE(MpId)) {
+ return RETURN_SUCCESS;
+ }
+
// Do nothing yet
+ return RETURN_SUCCESS;
}
/**
diff --git a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.inf b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.inf
index bd3dc4958c..46c803d20f 100644
--- a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.inf
+++ b/ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.inf
@@ -14,10 +14,10 @@
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = ArmPlatformLibSecNull
- FILE_GUID = 83333d9e-b00d-44cb-819c-e154c7efe79a
+ FILE_GUID = a2cf63c6-d44f-4cd0-8af6-722a0138c021
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = ArmPlatformLib
+ LIBRARY_CLASS = ArmPlatformSecLib
[Packages]
MdePkg/MdePkg.dec
@@ -30,7 +30,6 @@
DebugLib
[Sources.common]
- ArmPlatformLibNull.c
ArmPlatformLibNullSec.c
ArmPlatformLibNullBoot.asm | RVCT
ArmPlatformLibNullBoot.S | GCC