]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Library/ArmSmcLib/ArmSmc.asm
ArmPkg/DebugPeCoffExtraActionLib: Checked the ImageContext->PdbPointer is not null
[mirror_edk2.git] / ArmPlatformPkg / Library / ArmSmcLib / ArmSmc.asm
1 //
2 // Copyright (c) 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 EXPORT ArmCallSmc
15 EXPORT ArmCallSmcArg1
16 EXPORT ArmCallSmcArg2
17 EXPORT ArmCallSmcArg3
18
19 AREA ArmSmc, CODE, READONLY
20
21 ArmCallSmc
22 push {r1}
23 mov r1, r0
24 ldr r0,[r1]
25 smc #0
26 str r0,[r1]
27 pop {r1}
28 blx lr
29
30 // Arg1 in R1
31 ArmCallSmcArg1
32 push {r2-r3}
33 mov r2, r0
34 mov r3, r1
35 ldr r0,[r2]
36 ldr r1,[r3]
37 smc #0
38 str r0,[r2]
39 str r1,[r3]
40 pop {r2-r3}
41 blx lr
42
43 ArmCallSmcArg2
44 push {r3-r5}
45 mov r3, r0
46 mov r4, r1
47 mov r5, r2
48 ldr r0,[r3]
49 ldr r1,[r4]
50 ldr r2,[r5]
51 smc #0
52 str r0,[r3]
53 str r1,[r4]
54 str r2,[r5]
55 pop {r3-r5}
56 blx lr
57
58 ArmCallSmcArg3
59 push {r4-r7}
60 mov r4, r0
61 mov r5, r1
62 mov r6, r2
63 mov r7, r3
64 ldr r0,[r4]
65 ldr r1,[r5]
66 ldr r2,[r6]
67 ldr r3,[r7]
68 smc #0
69 str r0,[r4]
70 str r1,[r5]
71 str r2,[r6]
72 str r3,[r7]
73 pop {r4-r7}
74 blx lr
75
76 END