]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.asm
e8bc0cd0b4a54573ab0eb47437f3d7b12b4832b4
[mirror_edk2.git] / ArmPlatformPkg / ArmRealViewEbPkg / Library / ArmRealViewEbSecLibRTSM / ArmRealViewEbBoot.asm
1 //
2 // Copyright (c) 2011-2012, ARM Limited. All rights reserved.
3 //
4 // This program and the accompanying materials
5 // are licensed and made available under the terms and conditions of the BSD License
6 // which accompanies this distribution. The full text of the license may be found at
7 // http://opensource.org/licenses/bsd-license.php
8 //
9 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 //
12 //
13
14 #include <AsmMacroIoLib.h>
15 #include <Base.h>
16 #include <Library/ArmPlatformSecLib.h>
17 #include <ArmPlatform.h>
18 #include <AutoGen.h>
19
20 INCLUDE AsmMacroIoLib.inc
21
22 EXPORT ArmPlatformSecBootAction
23 EXPORT ArmPlatformSecBootMemoryInit
24
25 PRESERVE8
26 AREA ArmRealviewEbBootMode, CODE, READONLY
27
28 /**
29 Call at the beginning of the platform boot up
30
31 This function allows the firmware platform to do extra actions at the early
32 stage of the platform power up.
33
34 Note: This function must be implemented in assembler as there is no stack set up yet
35
36 **/
37 ArmPlatformSecBootAction
38 LoadConstantToReg (ARM_EB_SYS_FLAGS_NV_REG, r0)
39 ldr r0, [r0]
40 cmp r0, #0
41 bxeq lr
42 bxne r0
43
44 /**
45 Initialize the memory where the initial stacks will reside
46
47 This memory can contain the initial stacks (Secure and Secure Monitor stacks).
48 In some platform, this region is already initialized and the implementation of this function can
49 do nothing. This memory can also represent the Secure RAM.
50 This function is called before the satck has been set up. Its implementation must ensure the stack
51 pointer is not used (probably required to use assembly language)
52
53 **/
54 ArmPlatformSecBootMemoryInit
55 // The SMC does not need to be initialized for RTSM
56 bx lr
57
58 END