]>
Commit | Line | Data |
---|---|---|
7f21c4a2 | 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> | |
da22bd61 | 17 | #include <BeagleBoard.h> |
7f21c4a2 | 18 | #include <AutoGen.h> |
19 | ||
20 | .text | |
21 | .align 3 | |
22 | ||
23 | GCC_ASM_EXPORT(ArmPlatformIsBootMemoryInitialized) | |
24 | GCC_ASM_EXPORT(ArmPlatformInitializeBootMemory) | |
25 | ||
26 | /** | |
27 | Called at the early stage of the Boot phase to know if the memory has already been initialized | |
28 | ||
29 | Running the code from the reset vector does not mean we start from cold boot. In some case, we | |
30 | can go through this code with the memory already initialized. | |
31 | Because this function is called at the early stage, the implementation must not use the stack. | |
32 | Its implementation must probably done in assembly to ensure this requirement. | |
33 | ||
34 | @return Return a non zero value if initialized | |
35 | ||
36 | **/ | |
37 | ASM_PFX(ArmPlatformIsBootMemoryInitialized): | |
38 | // The system memory is initialized by the BeagleBoard firmware | |
39 | mov r0, #1 | |
40 | bx lr | |
41 | ||
42 | ||
43 | /** | |
44 | Initialize the memory where the initial stacks will reside | |
45 | ||
46 | This memory can contain the initial stacks (Secure and Secure Monitor stacks). | |
47 | In some platform, this region is already initialized and the implementation of this function can | |
48 | do nothing. This memory can also represent the Secure RAM. | |
49 | This function is called before the satck has been set up. Its implementation must ensure the stack | |
50 | pointer is not used (probably required to use assembly language) | |
51 | ||
52 | **/ | |
53 | ASM_PFX(ArmPlatformInitializeBootMemory): | |
54 | // We must need to go into this function | |
55 | bx lr | |
56 | ||
57 | ASM_FUNCTION_REMOVE_IF_UNREFERENCED |