]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c
033c9d7ea082376e144a8c9dfb2b30d25ab0a574
[mirror_edk2.git] / ArmPlatformPkg / ArmRealViewEbPkg / Library / ArmRealViewEbSecLibRTSM / ArmRealViewEbSec.c
1 /** @file
2 *
3 * Copyright (c) 2011-2012, ARM Limited. All rights reserved.
4 *
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
9 *
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 *
13 **/
14
15 #include <Library/IoLib.h>
16 #include <Library/ArmLib.h>
17 #include <Library/ArmPlatformSecLib.h>
18 #include <Library/DebugLib.h>
19 #include <Library/PcdLib.h>
20
21 #include <Drivers/PL341Dmc.h>
22 #include <Drivers/SP804Timer.h>
23
24 #include <ArmPlatform.h>
25
26 /**
27 Initialize the Secure peripherals and memory regions
28
29 If Trustzone is supported by your platform then this function makes the required initialization
30 of the secure peripherals and memory regions.
31
32 **/
33 VOID
34 ArmPlatformSecTrustzoneInit (
35 IN UINTN MpId
36 )
37 {
38 ASSERT(FALSE);
39 }
40
41 /**
42 Initialize controllers that must setup at the early stage
43
44 Some peripherals must be initialized in Secure World.
45 For example, some L2x0 requires to be initialized in Secure World
46
47 **/
48 RETURN_STATUS
49 ArmPlatformSecInitialize (
50 IN UINTN MpId
51 )
52 {
53 // If it is not the primary core then there is nothing to do
54 if (!IS_PRIMARY_CORE(MpId)) {
55 return RETURN_SUCCESS;
56 }
57
58 // Do nothing yet
59 return RETURN_SUCCESS;
60 }
61
62 /**
63 Call before jumping to Normal World
64
65 This function allows the firmware platform to do extra actions before
66 jumping to the Normal World
67
68 **/
69 VOID
70 ArmPlatformSecExtraAction (
71 IN UINTN MpId,
72 OUT UINTN* JumpAddress
73 )
74 {
75 *JumpAddress = PcdGet32(PcdFvBaseAddress);
76 }