]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
ArmPlatformPkg/Sec: Added support for Non Cold Boot Paths
[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 IN UINTN SecBootMode
33 );
34
35 VOID
36 NonTrustedWorldTransition (
37 IN UINTN MpId,
38 IN UINTN JumpAddress
39 );
40
41 VOID
42 ArmSetupGicNonSecure (
43 IN INTN GicDistributorBase,
44 IN INTN GicInterruptInterfaceBase
45 );
46
47 // Vector Table for Sec Phase
48 VOID
49 SecVectorTable (
50 VOID
51 );
52
53 VOID
54 enter_monitor_mode (
55 IN UINTN MonitorEntryPoint,
56 IN UINTN MpId,
57 IN UINTN SecBootMode,
58 IN VOID* MonitorStackBase
59 );
60
61 VOID
62 return_from_exception (
63 IN UINTN NonSecureBase
64 );
65
66 VOID
67 copy_cpsr_into_spsr (
68 VOID
69 );
70
71 VOID
72 set_non_secure_mode (
73 IN ARM_PROCESSOR_MODE Mode
74 );
75
76 VOID
77 SecCommonExceptionEntry (
78 IN UINT32 Entry,
79 IN UINT32 LR
80 );
81
82 #endif