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