]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Include/Library/ArmPlatformSecLib.h
ArmPlatformPkg: Introduced 'ArmPlatformSecLib'
[mirror_edk2.git] / ArmPlatformPkg / Include / Library / ArmPlatformSecLib.h
1 /** @file
2 *
3 * Copyright (c) 2011-2012, ARM Limited. All rights reserved.
4 *
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
9 *
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 *
13 **/
14
15 #ifndef _ARMPLATFORMSECLIB_H_
16 #define _ARMPLATFORMSECLIB_H_
17
18 /**
19 Initialize the memory where the initial stacks will reside
20
21 This memory can contain the initial stacks (Secure and Secure Monitor stacks).
22 In some platform, this region is already initialized and the implementation of this function can
23 do nothing. This memory can also represent the Secure RAM.
24 This function is called before the satck has been set up. Its implementation must ensure the stack
25 pointer is not used (probably required to use assembly language)
26
27 **/
28 VOID
29 ArmPlatformSecBootMemoryInit (
30 VOID
31 );
32
33 /**
34 Call at the beginning of the platform boot up
35
36 This function allows the firmware platform to do extra actions at the early
37 stage of the platform power up.
38
39 Note: This function must be implemented in assembler as there is no stack set up yet
40
41 **/
42 VOID
43 ArmPlatformSecBootAction (
44 VOID
45 );
46
47 /**
48 Initialize controllers that must setup at the early stage
49
50 Some peripherals must be initialized in Secure World.
51 For example: Some L2 controller, interconnect, clock, DMC, etc
52
53 **/
54 RETURN_STATUS
55 ArmPlatformSecInitialize (
56 IN UINTN MpId
57 );
58
59 /**
60 Call before jumping to Normal World
61
62 This function allows the firmware platform to do extra actions before
63 jumping to the Normal World
64
65 **/
66 VOID
67 ArmPlatformSecExtraAction (
68 IN UINTN MpId,
69 OUT UINTN* JumpAddress
70 );
71
72 /**
73 Initialize the Secure peripherals and memory regions
74
75 If Trustzone is supported by your platform then this function makes the required initialization
76 of the secure peripherals and memory regions.
77
78 **/
79 VOID
80 ArmPlatformSecTrustzoneInit (
81 IN UINTN MpId
82 );
83
84 #endif