]> git.proxmox.com Git - mirror_edk2.git/blob - BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm
d4b7ae46bc03895a825275a5003e6673cec6767e
[mirror_edk2.git] / BeagleBoardPkg / Library / BeagleBoardLib / BeagleBoardHelper.asm
1 //
2 // Copyright (c) 2011, 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/PcdLib.h>
17 #include <BeagleBoard.h>
18 #include <AutoGen.h>
19
20 INCLUDE AsmMacroIoLib.inc
21
22 EXPORT ArmPlatformIsBootMemoryInitialized
23 EXPORT ArmPlatformInitializeBootMemory
24
25 PRESERVE8
26 AREA BeagleBoardHelper, CODE, READONLY
27
28 /**
29 Called at the early stage of the Boot phase to know if the memory has already been initialized
30
31 Running the code from the reset vector does not mean we start from cold boot. In some case, we
32 can go through this code with the memory already initialized.
33 Because this function is called at the early stage, the implementation must not use the stack.
34 Its implementation must probably done in assembly to ensure this requirement.
35
36 @return Return a non zero value if initialized
37
38 **/
39 ArmPlatformIsBootMemoryInitialized
40 // The system memory is initialized by the BeagleBoard firmware
41 mov r0, #1
42 bx lr
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 ArmPlatformInitializeBootMemory
55 // We must need to go into this function
56 bx lr
57
58 END