]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessGcr.s
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / AccessGcr.s
1 /// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
2 /// This program and the accompanying materials
3 /// are licensed and made available under the terms and conditions of the BSD License
4 /// which accompanies this distribution. The full text of the license may be found at
5 /// http://opensource.org/licenses/bsd-license.php
6 ///
7 /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
8 /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
9 ///
10 /// Module Name: AccessGcr.s
11 ///
12 ///
13 /// IPF specific Global Control Registers accessing functions
14 ///
15
16 //---------------------------------------------------------------------------------
17 //++
18 // AsmReadDcr
19 //
20 // This routine is used to Read the value of Default Control Register (DCR).
21 //
22 // Arguments :
23 //
24 // On Entry :
25 //
26 // Return Value: The current value of DCR.
27 //
28 //--
29 //----------------------------------------------------------------------------------
30 .text
31 .type AsmReadDcr, @function
32 .proc AsmReadDcr
33
34 AsmReadDcr::
35 mov r8 = cr.dcr;;
36 br.ret.dpnt b0;;
37 .endp AsmReadDcr
38
39 //---------------------------------------------------------------------------------
40 //++
41 // AsmWriteDcr
42 //
43 // This routine is used to write the value to Default Control Register (DCR).
44 //
45 // Arguments :
46 //
47 // On Entry : The value need to be written to DCR
48 //
49 // Return Value: The value written to DCR.
50 //
51 //--
52 //----------------------------------------------------------------------------------
53 .text
54 .type AsmWriteDcr, @function
55 .proc AsmWriteDcr
56 .regstk 1, 0, 0, 0
57
58 AsmWriteDcr::
59 mov cr.dcr = in0
60 mov r8 = in0;;
61 srlz.i;;
62 srlz.d;;
63 br.ret.dpnt b0;;
64 .endp AsmWriteDcr
65
66
67 //---------------------------------------------------------------------------------
68 //++
69 // AsmReadItc
70 //
71 // This routine is used to Read the value of Interval Timer Counter Register (ITC).
72 //
73 // Arguments :
74 //
75 // On Entry :
76 //
77 // Return Value: The current value of ITC.
78 //
79 //--
80 //----------------------------------------------------------------------------------
81 .text
82 .type AsmReadItc, @function
83 .proc AsmReadItc
84
85 AsmReadItc::
86 mov r8 = ar.itc;;
87 br.ret.dpnt b0;;
88 .endp AsmReadItc
89
90 //---------------------------------------------------------------------------------
91 //++
92 // AsmWriteItc
93 //
94 // This routine is used to write the value to Interval Timer Counter Register (ITC).
95 //
96 // Arguments :
97 //
98 // On Entry : The value need to be written to the ITC
99 //
100 // Return Value: The value written to the ITC.
101 //
102 //--
103 //----------------------------------------------------------------------------------
104 .text
105 .type AsmWriteItc, @function
106 .proc AsmWriteItc
107 .regstk 1, 0, 0, 0
108
109 AsmWriteItc::
110 mov ar.itc = in0
111 mov r8 = in0;;
112 br.ret.dpnt b0;;
113 .endp AsmWriteItc
114
115
116 //---------------------------------------------------------------------------------
117 //++
118 // AsmReadItm
119 //
120 // This routine is used to Read the value of Interval Timer Match Register (ITM).
121 //
122 // Arguments :
123 //
124 // On Entry :
125 //
126 // Return Value: The current value of ITM.
127 //
128 //--
129 //----------------------------------------------------------------------------------
130 .text
131 .type AsmReadItm, @function
132 .proc AsmReadItm
133
134 AsmReadItm::
135 mov r8 = cr.itm;;
136 br.ret.dpnt b0;;
137 .endp AsmReadItm
138
139 //---------------------------------------------------------------------------------
140 //++
141 // AsmWriteItm
142 //
143 // This routine is used to write the value to Interval Timer Match Register (ITM).
144 //
145 // Arguments :
146 //
147 // On Entry : The value need to be written to ITM
148 //
149 // Return Value: The value written to ITM.
150 //
151 //--
152 //----------------------------------------------------------------------------------
153 .text
154 .type AsmWriteItm, @function
155 .proc AsmWriteItm
156 .regstk 1, 0, 0, 0
157
158 AsmWriteItm::
159 mov cr.itm = in0
160 mov r8 = in0;;
161 srlz.d;
162 br.ret.dpnt b0;;
163 .endp AsmWriteItm
164
165
166 //---------------------------------------------------------------------------------
167 //++
168 // AsmReadIva
169 //
170 // This routine is used to read the value of Interruption Vector Address Register (IVA).
171 //
172 // Arguments :
173 //
174 // On Entry :
175 //
176 // Return Value: The current value of IVA.
177 //
178 //--
179 //----------------------------------------------------------------------------------
180 .text
181 .type AsmReadIva, @function
182 .proc AsmReadIva
183
184 AsmReadIva::
185 mov r8 = cr.iva;;
186 br.ret.dpnt b0;;
187 .endp AsmReadIva
188
189 //---------------------------------------------------------------------------------
190 //++
191 // AsmWriteIva
192 //
193 // This routine is used to write the value to Interruption Vector Address Register (IVA).
194 //
195 // Arguments :
196 //
197 // On Entry : The value need to be written to IVA
198 //
199 // Return Value: The value written to IVA.
200 //
201 //--
202 //----------------------------------------------------------------------------------
203 .text
204 .type AsmWriteIva, @function
205 .proc AsmWriteIva
206 .regstk 1, 0, 0, 0
207
208 AsmWriteIva::
209 mov cr.iva = in0
210 mov r8 = in0;;
211 br.ret.dpnt b0;;
212 .endp AsmWriteIva
213
214
215 //---------------------------------------------------------------------------------
216 //++
217 // AsmReadPta
218 //
219 // This routine is used to read the value of Page Table Address Register (PTA).
220 //
221 // Arguments :
222 //
223 // On Entry :
224 //
225 // Return Value: The current value of PTA.
226 //
227 //--
228 //----------------------------------------------------------------------------------
229 .text
230 .type AsmReadPta, @function
231 .proc AsmReadPta
232
233 AsmReadPta::
234 mov r8 = cr.pta;;
235 br.ret.dpnt b0;;
236 .endp AsmReadPta
237
238 //---------------------------------------------------------------------------------
239 //++
240 // AsmWritePta
241 //
242 // This routine is used to write the value to Page Table Address Register (PTA)).
243 //
244 // Arguments :
245 //
246 // On Entry : The value need to be written to PTA
247 //
248 // Return Value: The value written to PTA.
249 //
250 //--
251 //----------------------------------------------------------------------------------
252 .text
253 .type AsmWritePta, @function
254 .proc AsmWritePta
255 .regstk 1, 0, 0, 0
256
257 AsmWritePta::
258 mov cr.pta = in0
259 mov r8 = in0;;
260 srlz.i;;
261 srlz.d;;
262 br.ret.dpnt b0;;
263 .endp AsmWritePta