]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
eeaf40c0c893101248f6d4b47d4f87bf308e2742
[mirror_edk2.git] / ArmPlatformPkg / Sec / SecInternal.h
1 /** @file
2 * Main file supporting the SEC Phase on ARM PLatforms
3 *
4 * Copyright (c) 2011-2013, 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 VOID
48 enter_monitor_mode (
49 IN UINTN MonitorEntryPoint,
50 IN UINTN MpId,
51 IN UINTN SecBootMode,
52 IN VOID* MonitorStackBase
53 );
54
55 VOID
56 return_from_exception (
57 IN UINTN NonSecureBase
58 );
59
60 VOID
61 copy_cpsr_into_spsr (
62 VOID
63 );
64
65 VOID
66 set_non_secure_mode (
67 IN ARM_PROCESSOR_MODE Mode
68 );
69
70 VOID
71 SecCommonExceptionEntry (
72 IN UINT32 Entry,
73 IN UINTN LR
74 );
75
76 #endif