]>
Commit | Line | Data |
---|---|---|
1bfda055 | 1 | //\r |
2 | // Copyright (c) 2011, ARM Limited. All rights reserved.\r | |
3 | // \r | |
4 | // This program and the accompanying materials \r | |
5 | // are licensed and made available under the terms and conditions of the BSD License \r | |
6 | // which accompanies this distribution. The full text of the license may be found at \r | |
7 | // http://opensource.org/licenses/bsd-license.php \r | |
8 | //\r | |
9 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | //\r | |
12 | //\r | |
13 | \r | |
14 | #include <AsmMacroIoLib.h>\r | |
15 | #include <Base.h>\r | |
16 | #include <Library/PcdLib.h>\r | |
17 | #include <Chipset/ArmV7.h>\r | |
18 | #include <AutoGen.h>\r | |
19 | \r | |
20 | INCLUDE AsmMacroIoLib.inc\r | |
21 | \r | |
22 | EXPORT ArmIsScuEnable\r | |
23 | EXPORT ArmGetScuBaseAddress\r | |
24 | \r | |
25 | AREA ArmV7MPCore, CODE, READONLY\r | |
26 | \r | |
27 | // IN None\r | |
28 | // OUT r0 = SCU Base Address\r | |
29 | ArmGetScuBaseAddress\r | |
30 | // Read Configuration Base Address Register. ArmCBar cannot be called to get\r | |
31 | // the Configuration BAR as a stack is not necessary setup. The SCU is at the\r | |
32 | // offset 0x0000 from the Private Memory Region.\r | |
33 | mrc p15, 4, r0, c15, c0, 0\r | |
58b5d037 | 34 | bx\s\slr\r |
1bfda055 | 35 | \r |
36 | // IN None\r | |
37 | // OUT r1 = SCU enabled (boolean)\r | |
38 | ArmIsScuEnable\r | |
39 | // Read Configuration Base Address Register. ArmCBar cannot be called to get\r | |
40 | // the Configuration BAR as a stack is not necessary setup. The SCU is at the\r | |
41 | // offset 0x0000 from the Private Memory Region.\r | |
42 | mrc p15, 4, r0, c15, c0, 0\r | |
43 | add r1, r0, #SCU_CONTROL_OFFSET\r | |
44 | ldr r1, [r1]\r | |
45 | and r1, r1, #1\r | |
46 | bx lr\r | |
47 | \r | |
48 | END\r |