]>
Commit | Line | Data |
---|---|---|
c8ece79c | 1 | /** @file |
2 | * | |
e314d564 | 3 | * Copyright (c) 2011-2012, ARM Limited. All rights reserved. |
c8ece79c | 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> | |
e314d564 | 16 | #include <Library/ArmLib.h> |
17 | #include <Library/ArmPlatformSecLib.h> | |
c8ece79c | 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 | |
e314d564 | 34 | ArmPlatformSecTrustzoneInit ( |
5e773144 | 35 | IN UINTN MpId |
c8ece79c | 36 | ) |
37 | { | |
f4ee7a82 | 38 | ASSERT(FALSE); |
c8ece79c | 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 | **/ | |
e314d564 | 48 | RETURN_STATUS |
c8ece79c | 49 | ArmPlatformSecInitialize ( |
e314d564 | 50 | IN UINTN MpId |
f4ee7a82 | 51 | ) |
52 | { | |
e314d564 | 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 | ||
c8ece79c | 58 | // Do nothing yet |
e314d564 | 59 | return RETURN_SUCCESS; |
c8ece79c | 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 ( | |
0787bc61 | 71 | IN UINTN MpId, |
c8ece79c | 72 | OUT UINTN* JumpAddress |
73 | ) | |
74 | { | |
f92b93c9 | 75 | *JumpAddress = PcdGet32(PcdFvBaseAddress); |
c8ece79c | 76 | } |