]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
MdeModulePkg/Ide: return correct status when DRQ is not ready for ATAPI
[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/ArmPlatformLib.h>
23 #include <Library/ArmPlatformSecLib.h>
24 #include <Library/BaseLib.h>
25 #include <Library/DebugLib.h>
26 #include <Library/PcdLib.h>
27
28 #define IS_ALIGNED(Address, Align) (((UINTN)Address & (Align-1)) == 0)
29
30 VOID
31 TrustedWorldInitialization (
32 IN UINTN MpId,
33 IN UINTN SecBootMode
34 );
35
36 VOID
37 NonTrustedWorldTransition (
38 IN UINTN MpId,
39 IN UINTN JumpAddress
40 );
41
42 VOID
43 ArmSetupGicNonSecure (
44 IN INTN GicDistributorBase,
45 IN INTN GicInterruptInterfaceBase
46 );
47
48 VOID
49 enter_monitor_mode (
50 IN UINTN MonitorEntryPoint,
51 IN UINTN MpId,
52 IN UINTN SecBootMode,
53 IN VOID* MonitorStackBase
54 );
55
56 VOID
57 return_from_exception (
58 IN UINTN NonSecureBase
59 );
60
61 VOID
62 copy_cpsr_into_spsr (
63 VOID
64 );
65
66 VOID
67 set_non_secure_mode (
68 IN ARM_PROCESSOR_MODE Mode
69 );
70
71 VOID
72 SecCommonExceptionEntry (
73 IN UINT32 Entry,
74 IN UINTN LR
75 );
76
77 VOID
78 EFIAPI
79 ArmSecArchTrustzoneInit (
80 VOID
81 );
82
83 #endif