]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessEicr.s
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / AccessEicr.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: AccessEicr.s
11 ///
12 ///
13 /// IPF specific External Interrupt Control Registers accessing functions
14 ///
15
16 //---------------------------------------------------------------------------------
17 //++
18 // AsmReadLid
19 //
20 // This routine is used to read the value of Local Interrupt ID Register (LID).
21 //
22 // Arguments :
23 //
24 // On Entry :
25 //
26 // Return Value: The current value of LID.
27 //
28 //--
29 //----------------------------------------------------------------------------------
30 .text
31 .type AsmReadLid, @function
32 .proc AsmReadLid
33
34 AsmReadLid::
35 mov r8 = cr.lid;;
36 srlz.d;;
37 br.ret.dpnt b0;;
38 .endp AsmReadLid
39
40 //---------------------------------------------------------------------------------
41 //++
42 // AsmWriteLid
43 //
44 // This routine is used to write the value to Local Interrupt ID Register (LID).
45 //
46 // Arguments :
47 //
48 // On Entry : The value need to be written to LID.
49 //
50 // Return Value: The value written to LID.
51 //
52 //--
53 //----------------------------------------------------------------------------------
54 .text
55 .type AsmWriteLid, @function
56 .proc AsmWriteLid
57 .regstk 1, 0, 0, 0
58
59 AsmWriteLid::
60 mov cr.lid = in0
61 mov r8 = in0;;
62 srlz.d;;
63 br.ret.dpnt b0;;
64 .endp AsmWriteLid
65
66
67 //---------------------------------------------------------------------------------
68 //++
69 // AsmReadIvr
70 //
71 // This routine is used to read the value of External Interrupt Vector Register (IVR).
72 //
73 // Arguments :
74 //
75 // On Entry :
76 //
77 // Return Value: The current value of IVR.
78 //
79 //--
80 //----------------------------------------------------------------------------------
81 .text
82 .type AsmReadIvr, @function
83 .proc AsmReadIvr
84
85 AsmReadIvr::
86 mov r8 = cr.ivr;;
87 srlz.d;;
88 br.ret.dpnt b0;;
89 .endp AsmReadIvr
90
91
92 //---------------------------------------------------------------------------------
93 //++
94 // AsmReadTpr
95 //
96 // This routine is used to read the value of Task Priority Register (TPR).
97 //
98 // Arguments :
99 //
100 // On Entry :
101 //
102 // Return Value: The current value of TPR.
103 //
104 //--
105 //----------------------------------------------------------------------------------
106 .text
107 .type AsmReadTpr, @function
108 .proc AsmReadTpr
109
110 AsmReadTpr::
111 mov r8 = cr.tpr;;
112 br.ret.dpnt b0;;
113 .endp AsmReadTpr
114
115 //---------------------------------------------------------------------------------
116 //++
117 // AsmWriteTpr
118 //
119 // This routine is used to write the value to Task Priority Register (TPR).
120 //
121 // Arguments :
122 //
123 // On Entry : The value need to be written to TPR.
124 //
125 // Return Value: The value written to TPR.
126 //
127 //--
128 //----------------------------------------------------------------------------------
129 .text
130 .type AsmWriteTpr, @function
131 .proc AsmWriteTpr
132 .regstk 1, 0, 0, 0
133
134 AsmWriteTpr::
135 mov cr.tpr = in0
136 mov r8 = in0;;
137 srlz.d;;
138 br.ret.dpnt b0;;
139 .endp AsmWriteTpr
140
141
142 //---------------------------------------------------------------------------------
143 //++
144 // AsmWriteEoi
145 //
146 // This routine is used to write the value to End of External Interrupt Register (EOI).
147 //
148 // Arguments :
149 //
150 // On Entry : The value need to be written to EOI.
151 //
152 // Return Value: The value written to EOI.
153 //
154 //--
155 //----------------------------------------------------------------------------------
156 .text
157 .type AsmWriteEoi, @function
158 .proc AsmWriteEoi
159
160 AsmWriteEoi::
161 mov cr.eoi = r0;;
162 srlz.d;;
163 br.ret.dpnt b0;;
164 .endp AsmWriteEoi
165
166
167 //---------------------------------------------------------------------------------
168 //++
169 // AsmReadIrr0
170 //
171 // This routine is used to Read the value of External Interrupt Request Register 0 (IRR0).
172 //
173 // Arguments :
174 //
175 // On Entry :
176 //
177 // Return Value: The current value of IRR0.
178 //
179 //--
180 //----------------------------------------------------------------------------------
181 .text
182 .type AsmReadIrr0, @function
183 .proc AsmReadIrr0
184
185 AsmReadIrr0::
186 mov r8 = cr.irr0;;
187 br.ret.dpnt b0;;
188 .endp AsmReadIrr0
189
190
191 //---------------------------------------------------------------------------------
192 //++
193 // AsmReadIrr1
194 //
195 // This routine is used to Read the value of External Interrupt Request Register 1 (IRR1).
196 //
197 // Arguments :
198 //
199 // On Entry :
200 //
201 // Return Value: The current value of IRR1.
202 //
203 //--
204 //----------------------------------------------------------------------------------
205 .text
206 .type AsmReadIrr1, @function
207 .proc AsmReadIrr1
208
209 AsmReadIrr1::
210 mov r8 = cr.irr1;;
211 br.ret.dpnt b0;;
212 .endp AsmReadIrr1
213
214
215 //---------------------------------------------------------------------------------
216 //++
217 // AsmReadIrr2
218 //
219 // This routine is used to Read the value of External Interrupt Request Register 2 (IRR2).
220 //
221 // Arguments :
222 //
223 // On Entry :
224 //
225 // Return Value: The current value of IRR2.
226 //
227 //--
228 //----------------------------------------------------------------------------------
229 .text
230 .type AsmReadIrr2, @function
231 .proc AsmReadIrr2
232
233 AsmReadIrr2::
234 mov r8 = cr.irr2;;
235 br.ret.dpnt b0;;
236 .endp AsmReadIrr2
237
238
239 //---------------------------------------------------------------------------------
240 //++
241 // AsmReadIrr3
242 //
243 // This routine is used to Read the value of External Interrupt Request Register 3 (IRR3).
244 //
245 // Arguments :
246 //
247 // On Entry :
248 //
249 // Return Value: The current value of IRR3.
250 //
251 //--
252 //----------------------------------------------------------------------------------
253 .text
254 .type AsmReadIrr3, @function
255 .proc AsmReadIrr3
256
257 AsmReadIrr3::
258 mov r8 = cr.irr3;;
259 br.ret.dpnt b0;;
260 .endp AsmReadIrr3
261
262
263 //---------------------------------------------------------------------------------
264 //++
265 // AsmReadItv
266 //
267 // This routine is used to Read the value of Interval Timer Vector Register (ITV).
268 //
269 // Arguments :
270 //
271 // On Entry :
272 //
273 // Return Value: The current value of ITV.
274 //
275 //--
276 //----------------------------------------------------------------------------------
277 .text
278 .type AsmReadItv, @function
279 .proc AsmReadItv
280
281 AsmReadItv::
282 mov r8 = cr.itv;;
283 br.ret.dpnt b0;;
284 .endp AsmReadItv
285
286 //---------------------------------------------------------------------------------
287 //++
288 // AsmWriteItv
289 //
290 // This routine is used to write the value to Interval Timer Vector Register (ITV).
291 //
292 // Arguments :
293 //
294 // On Entry : The value need to be written to ITV
295 //
296 // Return Value: The value written to ITV.
297 //
298 //--
299 //----------------------------------------------------------------------------------
300 .text
301 .type AsmWriteItv, @function
302 .proc AsmWriteItv
303 .regstk 1, 0, 0, 0
304
305 AsmWriteItv::
306 mov cr.itv = in0
307 mov r8 = in0;;
308 srlz.d;;
309 br.ret.dpnt b0;;
310 .endp AsmWriteItv
311
312
313 //---------------------------------------------------------------------------------
314 //++
315 // AsmReadPmv
316 //
317 // This routine is used to Read the value of Performance Monitoring Vector Register (PMV).
318 //
319 // Arguments :
320 //
321 // On Entry :
322 //
323 // Return Value: The current value of PMV.
324 //
325 //--
326 //----------------------------------------------------------------------------------
327 .text
328 .type AsmReadPmv, @function
329 .proc AsmReadPmv
330
331 AsmReadPmv::
332 mov r8 = cr.pmv;;
333 br.ret.dpnt b0;;
334 .endp AsmReadPmv
335
336 //---------------------------------------------------------------------------------
337 //++
338 // AsmWritePmv
339 //
340 // This routine is used to write the value to Performance Monitoring Vector Register (PMV).
341 //
342 // Arguments :
343 //
344 // On Entry : The value need to be written to PMV
345 //
346 // Return Value: The value written to PMV.
347 //
348 //--
349 //----------------------------------------------------------------------------------
350 .text
351 .type AsmWritePmv, @function
352 .proc AsmWritePmv
353 .regstk 1, 0, 0, 0
354
355 AsmWritePmv::
356 mov cr.pmv = in0
357 mov r8 = in0;;
358 srlz.d;;
359 br.ret.dpnt b0;;
360 .endp AsmWritePmv
361
362
363 //---------------------------------------------------------------------------------
364 //++
365 // AsmReadCmcv
366 //
367 // This routine is used to Read the value of Corrected Machine Check Vector Register (CMCV).
368 //
369 // Arguments :
370 //
371 // On Entry :
372 //
373 // Return Value: The current value of CMCV.
374 //
375 //--
376 //----------------------------------------------------------------------------------
377 .text
378 .type AsmReadCmcv, @function
379 .proc AsmReadCmcv
380
381 AsmReadCmcv::
382 mov r8 = cr.cmcv;;
383 br.ret.dpnt b0;;
384 .endp AsmReadCmcv
385
386 //---------------------------------------------------------------------------------
387 //++
388 // AsmWriteCmcv
389 //
390 // This routine is used to write the value to Corrected Machine Check Vector Register (CMCV).
391 //
392 // Arguments :
393 //
394 // On Entry : The value need to be written to CMCV
395 //
396 // Return Value: The value written to CMCV.
397 //
398 //--
399 //----------------------------------------------------------------------------------
400 .text
401 .type AsmWriteCmcv, @function
402 .proc AsmWriteCmcv
403 .regstk 1, 0, 0, 0
404
405 AsmWriteCmcv::
406 mov cr.cmcv = in0
407 mov r8 = in0;;
408 srlz.d;;
409 br.ret.dpnt b0;;
410 .endp AsmWriteCmcv
411
412
413 //---------------------------------------------------------------------------------
414 //++
415 // AsmReadLrr0
416 //
417 // This routine is used to read the value of Local Redirection Register 0 (LRR0).
418 //
419 // Arguments :
420 //
421 // On Entry :
422 //
423 // Return Value: The current value of LRR0.
424 //
425 //--
426 //----------------------------------------------------------------------------------
427 .text
428 .type AsmReadLrr0, @function
429 .proc AsmReadLrr0
430
431 AsmReadLrr0::
432 mov r8 = cr.lrr0;;
433 br.ret.dpnt b0;;
434 .endp AsmReadLrr0
435
436 //---------------------------------------------------------------------------------
437 //++
438 // AsmWriteLrr0
439 //
440 // This routine is used to write the value to Local Redirection Register 0 (LRR0).
441 //
442 // Arguments :
443 //
444 // On Entry : The value need to be written to LRR0.
445 //
446 // Return Value: The value written to LRR0.
447 //
448 //--
449 //----------------------------------------------------------------------------------
450 .text
451 .type AsmWriteLrr0, @function
452 .proc AsmWriteLrr0
453 .regstk 1, 0, 0, 0
454
455 AsmWriteLrr0::
456 mov cr.lrr0 = in0
457 mov r8 = in0;;
458 srlz.d;;
459 br.ret.dpnt b0;;
460 .endp AsmWriteLrr0
461
462
463 //---------------------------------------------------------------------------------
464 //++
465 // AsmReadLrr1
466 //
467 // This routine is used to read the value of Local Redirection Register 1 (LRR1).
468 //
469 // Arguments :
470 //
471 // On Entry :
472 //
473 // Return Value: The current value of LRR1.
474 //
475 //--
476 //----------------------------------------------------------------------------------
477 .text
478 .type AsmReadLrr1, @function
479 .proc AsmReadLrr1
480
481 AsmReadLrr1::
482 mov r8 = cr.lrr1;;
483 br.ret.dpnt b0;;
484 .endp AsmReadLrr1
485
486 //---------------------------------------------------------------------------------
487 //++
488 // AsmWriteLrr1
489 //
490 // This routine is used to write the value to Local Redirection Register 1 (LRR1).
491 //
492 // Arguments :
493 //
494 // On Entry : The value need to be written to LRR1.
495 //
496 // Return Value: The value written to LRR1.
497 //
498 //--
499 //----------------------------------------------------------------------------------
500 .text
501 .type AsmWriteLrr1, @function
502 .proc AsmWriteLrr1
503 .regstk 1, 0, 0, 0
504
505 AsmWriteLrr1::
506 mov cr.lrr1 = in0
507 mov r8 = in0;;
508 srlz.d;;
509 br.ret.dpnt b0;;
510 .endp AsmWriteLrr1
511