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