]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
0d6daf993aabdc2c648f31b41cea33c5e228a91d
[mirror_edk2.git] / ArmPlatformPkg / Sec / SecInternal.h
1 /** @file
2 * Main file supporting the SEC Phase on ARM PLatforms
3 *
4 * Copyright (c) 2011-2012, ARM Limited. All rights reserved.
5 *
6 * This program and the accompanying materials
7 * are licensed and made available under the terms and conditions of the BSD License
8 * which accompanies this distribution. The full text of the license may be found at
9 * http://opensource.org/licenses/bsd-license.php
10 *
11 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 *
14 **/
15
16 #ifndef __SEC_H__
17 #define __SEC_H__
18
19 #include <Base.h>
20 #include <Library/ArmLib.h>
21 #include <Library/ArmCpuLib.h>
22 #include <Library/ArmPlatformSecLib.h>
23 #include <Library/BaseLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/PcdLib.h>
26
27 #define IS_ALIGNED(Address, Align) (((UINTN)Address & (Align-1)) == 0)
28
29 VOID
30 TrustedWorldInitialization (
31 IN UINTN MpId
32 );
33
34 VOID
35 NonTrustedWorldTransition (
36 IN UINTN MpId,
37 IN UINTN JumpAddress
38 );
39
40 VOID
41 ArmSetupGicNonSecure (
42 IN INTN GicDistributorBase,
43 IN INTN GicInterruptInterfaceBase
44 );
45
46 // Vector Table for Sec Phase
47 VOID
48 SecVectorTable (
49 VOID
50 );
51
52 VOID
53 enter_monitor_mode (
54 IN UINTN MonitorEntryPoint,
55 IN UINTN MpId,
56 IN VOID* Stack
57 );
58
59 VOID
60 return_from_exception (
61 IN UINTN NonSecureBase
62 );
63
64 VOID
65 copy_cpsr_into_spsr (
66 VOID
67 );
68
69 VOID
70 set_non_secure_mode (
71 IN ARM_PROCESSOR_MODE Mode
72 );
73
74 VOID
75 SecCommonExceptionEntry (
76 IN UINT32 Entry,
77 IN UINT32 LR
78 );
79
80 #endif