]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNullSec.c
ArmPlatformPkg/Sec: Allowed the Secondary Cores to set the Secure/Non Secure bits...
[mirror_edk2.git] / ArmPlatformPkg / Library / ArmPlatformLibNull / ArmPlatformLibNullSec.c
1 /** @file
2 *
3 * Copyright (c) 2011, 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/ArmPlatformLib.h>
16 #include <Library/DebugLib.h>
17 #include <Library/PcdLib.h>
18
19 /**
20 Initialize the Secure peripherals and memory regions
21
22 If Trustzone is supported by your platform then this function makes the required initialization
23 of the secure peripherals and memory regions.
24
25 **/
26 VOID
27 ArmPlatformTrustzoneInit (
28 IN UINTN MpId
29 )
30 {
31 // Secondary cores might have to set the Secure SGIs into the GICD_IGROUPR0
32 if (!IS_PRIMARY_CORE(MpId)) {
33 return;
34 }
35
36 ASSERT(FALSE);
37 }
38
39 /**
40 Initialize controllers that must setup at the early stage
41
42 Some peripherals must be initialized in Secure World.
43 For example, some L2x0 requires to be initialized in Secure World
44
45 **/
46 VOID
47 ArmPlatformSecInitialize (
48 VOID
49 )
50 {
51 // Do nothing yet
52 }
53
54 /**
55 Call before jumping to Normal World
56
57 This function allows the firmware platform to do extra actions before
58 jumping to the Normal World
59
60 **/
61 VOID
62 ArmPlatformSecExtraAction (
63 IN UINTN MpId,
64 OUT UINTN* JumpAddress
65 )
66 {
67 *JumpAddress = PcdGet32(PcdFvBaseAddress);
68 }