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