]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Sec/SecInternal.h
ArmPlatformPkg: Fixed unsigned type to be architecture independent
[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
d5cd447b 4* Copyright (c) 2011-2013, 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
e314d564 22#include <Library/ArmPlatformSecLib.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
a75568e9 31 IN UINTN MpId,\r
32 IN UINTN SecBootMode\r
a8530889 33 );\r
34\r
35VOID\r
36NonTrustedWorldTransition (\r
3d93aeae 37 IN UINTN MpId,\r
38 IN UINTN JumpAddress\r
a8530889 39 );\r
40\r
5b1928ff 41VOID\r
42ArmSetupGicNonSecure (\r
a8530889 43 IN INTN GicDistributorBase,\r
44 IN INTN GicInterruptInterfaceBase\r
5b1928ff 45);\r
46\r
5b1928ff 47VOID\r
48enter_monitor_mode (\r
a8530889 49 IN UINTN MonitorEntryPoint,\r
50 IN UINTN MpId,\r
a75568e9 51 IN UINTN SecBootMode,\r
52 IN VOID* MonitorStackBase\r
5b1928ff 53 );\r
54\r
55VOID\r
56return_from_exception (\r
a8530889 57 IN UINTN NonSecureBase\r
5b1928ff 58 );\r
59\r
60VOID\r
61copy_cpsr_into_spsr (\r
62 VOID\r
63 );\r
64\r
513aa349 65VOID\r
66set_non_secure_mode (\r
a8530889 67 IN ARM_PROCESSOR_MODE Mode\r
513aa349 68 );\r
69\r
5b1928ff 70VOID\r
71SecCommonExceptionEntry (\r
72 IN UINT32 Entry,\r
d5cd447b 73 IN UINTN LR\r
5b1928ff 74 );\r
75\r
76#endif\r