]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/SecInternal.h
ArmPlatformPkg/Sec: Clean and Move all declaration into 'SecInternal.h' (2)
[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/BaseLib.h>
21 #include <Library/DebugLib.h>
22
23 #include <Chipset/ArmV7.h>
24
25 #define IS_ALIGNED(Address, Align) (((UINTN)Address & (Align-1)) == 0)
26
27 VOID
28 ArmSetupGicNonSecure (
29 IN INTN GicDistributorBase,
30 IN INTN GicInterruptInterfaceBase
31 );
32
33 // Vector Table for Sec Phase
34 VOID
35 SecVectorTable (
36 VOID
37 );
38
39 VOID
40 NonSecureWaitForFirmware (
41 VOID
42 );
43
44 VOID
45 enter_monitor_mode (
46 IN VOID* Stack
47 );
48
49 VOID
50 return_from_exception (
51 IN UINTN NonSecureBase
52 );
53
54 VOID
55 copy_cpsr_into_spsr (
56 VOID
57 );
58
59 VOID
60 SecCommonExceptionEntry (
61 IN UINT32 Entry,
62 IN UINT32 LR
63 );
64
65 #endif