]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
9136db9b4628bd8341267ff0dd6911edff2a7850
[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/ArmPlatformLib.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 NonSecureWaitForFirmware (
54 VOID
55 );
56
57 VOID
58 enter_monitor_mode (
59 IN UINTN MonitorEntryPoint,
60 IN UINTN MpId,
61 IN VOID* Stack
62 );
63
64 VOID
65 return_from_exception (
66 IN UINTN NonSecureBase
67 );
68
69 VOID
70 copy_cpsr_into_spsr (
71 VOID
72 );
73
74 VOID
75 set_non_secure_mode (
76 IN ARM_PROCESSOR_MODE Mode
77 );
78
79 VOID
80 SecCommonExceptionEntry (
81 IN UINT32 Entry,
82 IN UINT32 LR
83 );
84
85 #endif