]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
Check the return status of booting against EFI_SUCCESS instead of using EFI_ERROR...
[mirror_edk2.git] / ArmPlatformPkg / Sec / SecInternal.h
1 /** @file
2 * Main file supporting the SEC Phase on ARM PLatforms
3 *
4 * Copyright (c) 2011, 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/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 ArmSetupGicNonSecure (
31 IN INTN GicDistributorBase,
32 IN INTN GicInterruptInterfaceBase
33 );
34
35 // Vector Table for Sec Phase
36 VOID
37 SecVectorTable (
38 VOID
39 );
40
41 VOID
42 NonSecureWaitForFirmware (
43 VOID
44 );
45
46 VOID
47 enter_monitor_mode (
48 IN VOID* Stack
49 );
50
51 VOID
52 return_from_exception (
53 IN UINTN NonSecureBase
54 );
55
56 VOID
57 copy_cpsr_into_spsr (
58 VOID
59 );
60
61 VOID
62 set_non_secure_mode (
63 IN ARM_PROCESSOR_MODE Mode
64 );
65
66 VOID
67 SecCommonExceptionEntry (
68 IN UINT32 Entry,
69 IN UINT32 LR
70 );
71
72 #endif