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